Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[MANTA] r799 - in branches/vertical: Core/Color Core/XUtils Interface Model/Materials SCIRun/include/sci_defs StandAlone


Chronological Thread 
  • From: sparker@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [MANTA] r799 - in branches/vertical: Core/Color Core/XUtils Interface Model/Materials SCIRun/include/sci_defs StandAlone
  • Date: Tue, 20 Dec 2005 22:47:10 -0700 (MST)

Author: sparker
Date: Tue Dec 20 22:47:08 2005
New Revision: 799

Modified:
   branches/vertical/Core/Color/ColorSpace.h
   branches/vertical/Core/XUtils/XHelper.cc
   branches/vertical/Interface/RayPacket.h
   branches/vertical/Model/Materials/Phong.cc
   branches/vertical/SCIRun/include/sci_defs/error_defs.h
   branches/vertical/StandAlone/manta.cc
Log:
Vertical ray packets with horizontal interface now work for benchmark scene
Performance impact: ~8%



Modified: branches/vertical/Core/Color/ColorSpace.h
==============================================================================
--- branches/vertical/Core/Color/ColorSpace.h   (original)
+++ branches/vertical/Core/Color/ColorSpace.h   Tue Dec 20 22:47:08 2005
@@ -163,6 +163,20 @@
       return *this;
     }
 
+    bool operator==(const ColorSpace<Traits>& c) {
+      for(int i=0;i<NumComponents;i++)
+        if(data[i] != c.data[i])
+          return false;
+      return true;
+    }
+    bool operator!=(const ColorSpace<Traits>& c) {
+      for(int i=0;i<NumComponents;i++)
+        if(data[i] != c.data[i])
+          return false;
+      return true;
+    }
+
+
     ComponentType Mean() const
     {
       ComponentType sum = 0;

Modified: branches/vertical/Core/XUtils/XHelper.cc
==============================================================================
--- branches/vertical/Core/XUtils/XHelper.cc    (original)
+++ branches/vertical/Core/XUtils/XHelper.cc    Tue Dec 20 22:47:08 2005
@@ -16,8 +16,6 @@
 XFontStruct* XHelper::getX11Font(Display* dpy,
                                  const char* fontstring) {
   // Should we lock X?
-  cerr << "XHelper::getX11Font: Trying to load in font:\n"
-       << fontstring << "\n";
   return XLoadQueryFont(dpy, fontstring);
 }
 

Modified: branches/vertical/Interface/RayPacket.h
==============================================================================
--- branches/vertical/Interface/RayPacket.h     (original)
+++ branches/vertical/Interface/RayPacket.h     Tue Dec 20 22:47:08 2005
@@ -242,7 +242,7 @@
     void setTexCoords(int which, const Point& tc)
     {
       for(int i=0;i<3;i++)
-        data->texCoords[i][which+start] - tc[i];
+        data->texCoords[i][which+start] = tc[i];
     }
 
     Point getTexCoords(int which) const
@@ -307,7 +307,7 @@
 #     else
       ASSERT(sizeof(T) <= RayPacketData::MaxScratchpadSize);
 #     endif
-      return *(T*)data->scratchpad_data[which];
+      return *(T*)data->scratchpad_data[which+start];
     }
     Color getResult(int which) const
     {
@@ -436,7 +436,7 @@
         int tend = i+1;
         while(tend < end && data->hitPrim[tend] == prim)
           tend++;
-        RayPacket subPacket(*this, i, tend);
+        RayPacket subPacket(*this, i-start, tend-start);
         prim->computeNormal(context, subPacket);
         i=tend;
       }

Modified: branches/vertical/Model/Materials/Phong.cc
==============================================================================
--- branches/vertical/Model/Materials/Phong.cc  (original)
+++ branches/vertical/Model/Materials/Phong.cc  Tue Dec 20 22:47:08 2005
@@ -12,6 +12,7 @@
 #include <Interface/ShadowAlgorithm.h>
 #include <Model/Textures/Constant.h>
 #include <Core/Util/NotFinished.h>
+#include <Core/Color/ColorSpace_fancy.h>
 
 using namespace Manta;
 

Modified: branches/vertical/SCIRun/include/sci_defs/error_defs.h
==============================================================================
--- branches/vertical/SCIRun/include/sci_defs/error_defs.h      (original)
+++ branches/vertical/SCIRun/include/sci_defs/error_defs.h      Tue Dec 20 
22:47:08 2005
@@ -1,7 +1,7 @@
 #ifndef SCI_ERROR_DEFS_H
 #define SCI_ERROR_DEFS_H
 
-#define SCI_ASSERTION_LEVEL 3
+#define SCI_ASSERTION_LEVEL 0
 #define USE_SCI_THROW 0
 
 #endif

Modified: branches/vertical/StandAlone/manta.cc
==============================================================================
--- branches/vertical/StandAlone/manta.cc       (original)
+++ branches/vertical/StandAlone/manta.cc       Tue Dec 20 22:47:08 2005
@@ -361,26 +361,7 @@
   // please do not change it.  Please create a new scene instead
   Scene* scene = new Scene();
 
-  // Set only one of these #ifs to 1.
-#if 1
   scene->setBackground(new 
ConstantBackground(ColorDB::getNamedColor("SkyBlue3")*0.5));
-#elif 0
-  scene->setBackground(new TextureBackground(new 
Constant<Color>(Color(RGBColor(.2,1,1))), Vector(0,1,0)));
-#elif 0
-   scene->setBackground(new TextureBackground
-                        (new MarbleTexture<Color>(Color(RGB(0.1,0.2,0.5)),
-                                                  Color(RGB(0.7,0.8,1.0)),
-                                                  1.0, 1.0, 15.0,
-                                                  6, 2.0, 0.6 ),
-                         Vector(0,1,0)));
-#elif 0
-   scene->setBackground(new TextureBackground
-                        (new CheckerTexture<Color>(Color(RGBColor(1,0,0)),
-                                                   Color(RGBColor(0,0,1)),
-                                                   Vector(10,0,0),
-                                                   Vector(0,10,0)),
-                         Vector(0,1,0)));
-#endif
 
   Material* red=new Phong(Color(RGBColor(.6,0,0)),
                           Color(RGBColor(.6,.6,.6)), 32, 
(ColorComponent)0.4);
@@ -405,7 +386,6 @@
   UniformMapper* uniformmap = new UniformMapper();
   floor->setTexCoordMapper(uniformmap);
   world->add(floor);
-  //  red = new Flat(Color(RGBColor(1,0.1,0.2)));
   world->add(new Sphere(red, Point(0,0,1.2), 1.0));
   scene->setObject(world);
        




  • [MANTA] r799 - in branches/vertical: Core/Color Core/XUtils Interface Model/Materials SCIRun/include/sci_defs StandAlone, sparker, 12/20/2005

Archive powered by MHonArc 2.6.16.

Top of page