Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[MANTA] r325 - in trunk: Core/Geometry Model/Primitives scenes


Chronological Thread 
  • From: vpegorar@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [MANTA] r325 - in trunk: Core/Geometry Model/Primitives scenes
  • Date: Mon, 16 May 2005 15:42:01 -0600 (MDT)

Author: vpegorar
Date: Mon May 16 15:42:00 2005
New Revision: 325

Modified:
   trunk/Core/Geometry/PointVector.h
   trunk/Model/Primitives/CMakeLists.txt
   trunk/scenes/primtest.cc
Log:
fdja


Modified: trunk/Core/Geometry/PointVector.h
==============================================================================
--- trunk/Core/Geometry/PointVector.h   (original)
+++ trunk/Core/Geometry/PointVector.h   Mon May 16 15:42:00 2005
@@ -165,7 +165,7 @@
     T maxComponent() const {
       T max = data[0];
       for(int i=1;i<Dim;i++)
-        if(data[i] < max)
+        if(data[i] > max)
           max = data[i];
       return max;
     }

Modified: trunk/Model/Primitives/CMakeLists.txt
==============================================================================
--- trunk/Model/Primitives/CMakeLists.txt       (original)
+++ trunk/Model/Primitives/CMakeLists.txt       Mon May 16 15:42:00 2005
@@ -11,6 +11,7 @@
      Primitives/TexTriangle.cc
      Primitives/Disk.cc
      Primitives/Hemisphere.cc
+     Primitives/Heightfield.cc
 )
 
 # Should be include known broken objects?

Modified: trunk/scenes/primtest.cc
==============================================================================
--- trunk/scenes/primtest.cc    (original)
+++ trunk/scenes/primtest.cc    Mon May 16 15:42:00 2005
@@ -24,6 +24,7 @@
 #include <Model/Primitives/Parallelogram.h>
 #include <Model/Primitives/Sphere.h>
 #include <Model/Primitives/SuperEllipsoid.h>
+#include <Model/Primitives/Heightfield.h>
 #include <Model/TexCoordMappers/LinearMapper.h>
 #include <Model/TexCoordMappers/SphericalMapper.h>
 #include <Model/TexCoordMappers/UniformMapper.h>
@@ -247,7 +248,12 @@
     if (!readPlyFile(modelName, t, model, 0, matl))
         printf("error loading or reading ply file: %s\n", modelName); 
//would be better to throw an error.
     group->add(model);
-  } else { 
+  } else if (primtype == "heightfield") {
+    Primitive* prim = new Heightfield(matl, "../sinc200x200.hf", Point(-0.2, 
-0.2, 0.2), Point(0.2, 0.2, 0.4));
+    if ( mapr )
+        prim->setTexCoordMapper( mapr );
+    group->add(prim);
+  } else {
     throw IllegalArgument("Unknown primitive type for primtest: "+primtype, 
0, args);
   }
 




  • [MANTA] r325 - in trunk: Core/Geometry Model/Primitives scenes, vpegorar, 05/16/2005

Archive powered by MHonArc 2.6.16.

Top of page