mmh, there was something missing for assignment 3
[MicroTrace.git] / InfinitePlane.cxx
index 442da19..f73d835 100644 (file)
@@ -17,14 +17,17 @@ InfinitePlane::Intersect(Ray& ray)
 {
   Vec3f diff = m_a - ray.origin();
   float t = diff.dot(m_n) / ray.direction().dot(m_n);
-  if (t < 1e-5 || t > ray.t()) 
+  if (t < Epsilon || t > ray.t()) 
     return false;
+  
   ray.setT(t);
+  ray.setHit(this);
+
   return true;
 }
 
 Vec3f
 InfinitePlane::GetNormal(Ray& ray)
 {
-  return Vec3f();
+  return m_n;
 }
This page took 0.020726 seconds and 4 git commands to generate.