Working on refraction & transparency.

Lots of work left to do!
This commit is contained in:
Godzil
2020-02-21 18:59:14 +00:00
parent 89dd74fa7c
commit df52cb36db
9 changed files with 219 additions and 9 deletions

View File

@@ -25,11 +25,14 @@ public:
double specular;
double shininess;
double reflective;
double transparency;
double refractiveIndex;
Pattern *pattern;
public:
Material() : colour(Colour(1, 1, 1)), ambient(0.1), diffuse(0.9), specular(0.9), shininess(200), reflective(0.0), pattern(nullptr) {};
Material() : colour(Colour(1, 1, 1)), ambient(0.1), diffuse(0.9), specular(0.9), shininess(200),
reflective(0.0), transparency(0.0), refractiveIndex(1.0), pattern(nullptr) {};
Colour lighting(Light light, Tuple point, Tuple eyeVector, Tuple normalVector, Shape *hitObject, bool inShadow = false);
@@ -40,4 +43,5 @@ public:
(this->colour == b.colour); };
};
#endif /* DORAYME_MATERIAL_H */