-
Notifications
You must be signed in to change notification settings - Fork 0
/
ShadableObject.hpp
35 lines (28 loc) · 940 Bytes
/
ShadableObject.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//
// Shadable.hpp
// Curvature
//
// Created by Simon Demeule on 2019-03-20.
// Copyright © 2019 Simon Demeule. All rights reserved.
//
#pragma once
#include <glm/glm.hpp>
#include "ShadableAttributes.hpp"
#include "ShadableObjectIntersection.hpp"
#include "DistanceMeasure.hpp"
#include "Ray.hpp"
#include "BoundedObject.hpp"
// shadable object class
class ShadableObject : public BoundedObject {
public:
// shading attributes (ambient, diffuse, specular, etc)
ShadableAttributes* shadableAttributes;
// constructor
ShadableObject(ShadableAttributes* shadableAttributesNew) : shadableAttributes(shadableAttributesNew) {}
// intersection function
virtual ShadableObjectIntersection intersection(Ray ray) = 0;
// distance function
virtual DistanceMeasure distance(glm::vec3 point) = 0;
// primitive count for bounded hierarchy construction optimisation
int primitiveCount;
};