From 20b88f6dac91dd6b9b9371b2699d81076ea396fa Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sat, 2 Aug 2014 10:39:29 -0700 Subject: [PATCH] Clarify some notation in plane intersection --- src/objectPlane.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/objectPlane.cc b/src/objectPlane.cc index 7e32b69..8e09b22 100644 --- a/src/objectPlane.cc +++ b/src/objectPlane.cc @@ -91,16 +91,16 @@ Plane::DoesIntersect(const Ray &ray, */ /* The denominator for the t equation above. */ - Double ndotd = mNormal.dot(ray.direction); - if (ndotd == 0.0) { + Double vd = mNormal.dot(ray.direction); + if (vd == 0.0) { /* The ray is parallel to the plane. */ return false; } /* The numerator of the equation for t above. */ - Double ndoto = -(mNormal.dot(ray.origin) + mDistance); + Double vo = -(mNormal.dot(ray.origin) + mDistance); - Double t0 = ndoto / ndotd; + Double t0 = vo / vd; if (t0 < 0.0) { /* The plane is behind the ray's origin. */ return false;