From cabe7ff147120642a741644c8438a67c6f43397c Mon Sep 17 00:00:00 2001 From: Godzil Date: Mon, 17 Feb 2020 13:54:07 +0000 Subject: [PATCH] Change Ray to use the generic Tuple instead of Point/Vector (but you still should use Point/Vector for initialisation) --- source/include/ray.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/include/ray.h b/source/include/ray.h index d66db0c..f962e53 100644 --- a/source/include/ray.h +++ b/source/include/ray.h @@ -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; }; };