New way of handling lights and materials.
This commit is contained in:
11
figure.hpp
11
figure.hpp
@@ -11,23 +11,12 @@ using glm::vec3;
|
||||
|
||||
class Figure {
|
||||
public:
|
||||
vec3 color;
|
||||
Material m_mat;
|
||||
float rho;
|
||||
|
||||
virtual ~Figure() { }
|
||||
|
||||
virtual bool intersect(Ray & r, float & t) const = 0;
|
||||
|
||||
virtual vec3 normal_at_int(Ray & r, float & t) const = 0;
|
||||
|
||||
virtual void set_color(float r, float g, float b) {
|
||||
color = vec3(r, g, b);
|
||||
}
|
||||
|
||||
virtual void set_color(vec3 rgb) {
|
||||
color = vec3(rgb);
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user