Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[Manta] r1660 - in trunk/Model: Cameras Primitives


Chronological Thread 
  • From: boulos@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [Manta] r1660 - in trunk/Model: Cameras Primitives
  • Date: Fri, 17 Aug 2007 00:17:53 -0600 (MDT)

Author: boulos
Date: Fri Aug 17 00:17:52 2007
New Revision: 1660

Modified:
   trunk/Model/Cameras/PinholeCamera.cc
   trunk/Model/Primitives/WaldTriangle.cc
Log:
Removing warnings from scalar build as well.



Modified: trunk/Model/Cameras/PinholeCamera.cc
==============================================================================
--- trunk/Model/Cameras/PinholeCamera.cc        (original)
+++ trunk/Model/Cameras/PinholeCamera.cc        Fri Aug 17 00:17:52 2007
@@ -108,7 +108,7 @@
   }
 
   if (createCornerRays) {
-    os << " -createCornerRays"; 
+    os << " -createCornerRays";
   }
 
   os << " )" << std::endl;
@@ -173,16 +173,19 @@
 template <bool NORMALIZE_RAYS, bool CREATE_CORNER_RAYS>
 void PinholeCamera::makeRaysSpecialized(RayPacket& rays) const
 {
+#ifdef MANTA_SSE
   //we need to find the max ray extents so that we can calculate the
   //corner rays.  These are used by the WaldTriangle intersector and
   //CGT acceleration structure to do frustum culling/traversal, and
   //possibly elsewhere.
+
+  // NOTE(boulos): Unless the corner rays code is also available to
+  // the scalar section, these should only be declared in this path.
   float min_v = std::numeric_limits<float>::max();
   float max_v = -std::numeric_limits<float>::max();
   float min_u = std::numeric_limits<float>::max();
   float max_u = -std::numeric_limits<float>::max();
 
-#ifdef MANTA_SSE
 
     int b = (rays.rayBegin + 3) & (~3);
     int e = rays.rayEnd & (~3);

Modified: trunk/Model/Primitives/WaldTriangle.cc
==============================================================================
--- trunk/Model/Primitives/WaldTriangle.cc      (original)
+++ trunk/Model/Primitives/WaldTriangle.cc      Fri Aug 17 00:17:52 2007
@@ -467,13 +467,13 @@
 
    const bool RaysConstantOrigin = rays.getAllFlags() & 
RayPacket::ConstantOrigin;
 
-   if (RaysConstantOrigin)
-   {
-      org_k  = data->origin[axis][rays.begin()];
-      org_ku = data->origin[ku][rays.begin()];
-      org_kv = data->origin[kv][rays.begin()];
-      f0 = n_d - (org_k + n_u * org_ku + n_v * org_kv);
-   }
+   //if (RaysConstantOrigin) { NOTE(boulos): Lame compiler can't tell
+   //it's one or the other, so this has to always happen (not a big
+   //deal though) to avoid warnings.
+   org_k  = data->origin[axis][rays.begin()];
+   org_ku = data->origin[ku][rays.begin()];
+   org_kv = data->origin[kv][rays.begin()];
+   f0 = n_d - (org_k + n_u * org_ku + n_v * org_kv);
 
    for (int i = rays.begin(); i < rays.end(); i++ )
    {




  • [Manta] r1660 - in trunk/Model: Cameras Primitives, boulos, 08/17/2007

Archive powered by MHonArc 2.6.16.

Top of page