Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[Manta] r2004 - trunk/Model/Primitives


Chronological Thread 
  • From: boulos@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [Manta] r2004 - trunk/Model/Primitives
  • Date: Thu, 24 Jan 2008 17:29:33 -0700 (MST)

Author: boulos
Date: Thu Jan 24 17:29:32 2008
New Revision: 2004

Modified:
   trunk/Model/Primitives/Sphere.cc
Log:
Model/Primitives/Sphere.cc

 When trying to help Roni, I found that the constant origin cases in Sphere 
had a severe bug...


Modified: trunk/Model/Primitives/Sphere.cc
==============================================================================
--- trunk/Model/Primitives/Sphere.cc    (original)
+++ trunk/Model/Primitives/Sphere.cc    Thu Jan 24 17:29:32 2008
@@ -84,7 +84,7 @@
   case RayPacket::ConstantOrigin|RayPacket::NormalizedDirections:
     {
       // Rays of constant origin and normalized directions
-      Vector O(rays.getOrigin(0)-center);
+      Vector O(rays.getOrigin(rays.begin())-center);
       Real C = Dot(O, O) - radius*radius;
 #ifdef MANTA_SSE
       int b = (rays.rayBegin + 3) & (~3);
@@ -189,7 +189,7 @@
   case RayPacket::ConstantOrigin:
     {
       // Rays of constant origin for not normalized directions
-      Vector O(rays.getOrigin(0)-center);
+      Vector O(rays.getOrigin(rays.begin())-center);
       Real C = Dot(O, O) - radius*radius;
       for(int i = rays.begin();i<rays.end();i++){
         Vector D(rays.getDirection(i));




  • [Manta] r2004 - trunk/Model/Primitives, boulos, 01/24/2008

Archive powered by MHonArc 2.6.16.

Top of page