Change Ray to use the generic Tuple instead of Point/Vector (but you still should use Point/Vector for initialisation)

This commit is contained in:
Godzil
2020-02-17 13:54:07 +00:00
parent 17aebe6538
commit cabe7ff147

View File

@@ -14,10 +14,10 @@
class Ray
{
public:
Vector direction;
Point origin;
Tuple direction;
Tuple origin;
Ray(Point origin, Vector direction) : origin(origin), direction(direction) { };
Ray(Tuple origin, Tuple direction) : origin(origin), direction(direction) { };
Tuple position(double t) { return this->origin + this->direction * t; };
};