Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[MANTA] r1303 - trunk/Model/Primitives


Chronological Thread 
  • From: sparker@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [MANTA] r1303 - trunk/Model/Primitives
  • Date: Wed, 14 Mar 2007 15:10:00 -0700 (MST)

Author: sparker
Date: Wed Mar 14 15:09:59 2007
New Revision: 1303

Modified:
   trunk/Model/Primitives/GridSpheres.cc
Log:
Update for new shadow algorithm interface


Modified: trunk/Model/Primitives/GridSpheres.cc
==============================================================================
--- trunk/Model/Primitives/GridSpheres.cc       (original)
+++ trunk/Model/Primitives/GridSpheres.cc       Wed Mar 14 15:09:59 2007
@@ -565,10 +565,7 @@
   // Normalize directions for proper dot product computation
   rays.normalizeDirections();
 
-  ShadowAlgorithm::StateBuffer stateBuffer;
-  bool firstTime=true;
-  bool done;
-  int count=0;
+  ShadowAlgorithm::StateBuffer shadowState;
   do {
     RayPacketData shadowData;
     RayPacket shadowRays(shadowData, RayPacket::UnknownShape, 0, 0,
@@ -579,9 +576,8 @@
     // object to store it's state.  The firstTime flag tells the SA to fill
     // in the state rather than using anything in the state buffer.  Most
     // SAs will only need to store an int or two in the statebuffer.
-    done=context.shadowAlgorithm->computeShadows(context, activeLights,
-                                                 rays, shadowRays,
-                                                 firstTime, stateBuffer);
+    context.shadowAlgorithm->computeShadows(context, shadowState, 
activeLights,
+                                            rays, shadowRays);
 
     // Normalize directions for proper dot product computation
     shadowRays.normalizeDirections();
@@ -597,9 +593,7 @@
           totalLight[j][i] += light[j]*cos_theta;
       }
     }
-
-    firstTime=false;
-  } while(!done);
+  } while(!shadowState.done());
 
   // Sum up diffuse/specular contributions
   for (int i=rays.begin(); i < rays.end(); ++i) {




  • [MANTA] r1303 - trunk/Model/Primitives, sparker, 03/14/2007

Archive powered by MHonArc 2.6.16.

Top of page