Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[MANTA] r501 - trunk/Model/Primitives


Chronological Thread 
  • From: vpegorar@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [MANTA] r501 - trunk/Model/Primitives
  • Date: Thu, 25 Aug 2005 15:30:14 -0600 (MDT)

Author: vpegorar
Date: Thu Aug 25 15:30:13 2005
New Revision: 501

Modified:
   trunk/Model/Primitives/Cube.cc
Log:
Fixed cube intersect to also hit if the ray starts from inside the object. 

Modified: trunk/Model/Primitives/Cube.cc
==============================================================================
--- trunk/Model/Primitives/Cube.cc      (original)
+++ trunk/Model/Primitives/Cube.cc      Thu Aug 25 15:30:13 2005
@@ -70,7 +70,10 @@
       tfar = Min(t2, tfar);
 
       if(tnear <= tfar)
+      {
        e.hitInfo.hit(tnear, material, this, tex);
+        e.hitInfo.hit(tfar , material, this, tex);
+      }
     }
   }
   else {
@@ -111,7 +114,10 @@
       tfar = Min(t2, tfar);
 
       if(tnear <= tfar)
+      {
        e.hitInfo.hit(tnear, material, this, tex);
+        e.hitInfo.hit(tfar , material, this, tex);
+      }
     }
   }
 }




  • [MANTA] r501 - trunk/Model/Primitives, vpegorar, 08/25/2005

Archive powered by MHonArc 2.6.16.

Top of page