Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[Manta] r1711 - in trunk: Model/Groups include


Chronological Thread 
  • From: boulos@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [Manta] r1711 - in trunk: Model/Groups include
  • Date: Tue, 4 Sep 2007 17:35:02 -0600 (MDT)

Author: boulos
Date: Tue Sep  4 17:35:01 2007
New Revision: 1711

Modified:
   trunk/Model/Groups/ObjGroup.cc
   trunk/include/CMakeLists.txt
   trunk/include/DynBVH_Parameters.h.CMakeTemplate
Log:
include/CMakeLists.txt
include/DynBVH_Parameters.h.CMakeTemplate

 Making approximate build controlled by a CMake variable that is on by
 default (5% rendering performance difference even for a complex scene
 involving reflections and area lights).  If you don't want it, you
 can turn it off.


Model/Groups/ObjGroup.cc
 
 Formatting a comment.


Modified: trunk/Model/Groups/ObjGroup.cc
==============================================================================
--- trunk/Model/Groups/ObjGroup.cc      (original)
+++ trunk/Model/Groups/ObjGroup.cc      Tue Sep  4 17:35:01 2007
@@ -20,7 +20,8 @@
 using namespace Manta;
 using namespace Glm;
 
-// Check to see if the specified file can be loaded, otherwise use the 
specified color.
+// Check to see if the specified file can be loaded, otherwise use the
+// specified color.
 static Texture<Color> *check_for_texture( const string &path_name,
                                    const string &file_name,
                                    const Color &constant_color,
@@ -127,9 +128,9 @@
 
           // Constant textures for refraction parameters.
           //Texture<Real> *n  = new Constant<Real>( 1.6 );
-          //Texture<Real> *nt = new Constant<Real>( 1.0 );          
+          //Texture<Real> *nt = new Constant<Real>( 1.0 );
           Texture<Color> *diffuse_map = check_for_texture( model_path, 
diffuse_map_name, diffuse , diffuse_map_scaling);
-          
+
           // Create a dielectric shader.
           material_array[index] = new Dielectric(new Constant<Real>(1), new 
Constant<Real>(1), diffuse_map);
 
@@ -162,7 +163,7 @@
 
 
 
-ObjGroup::ObjGroup( const char *filename, 
+ObjGroup::ObjGroup( const char *filename,
                     Material *defaultMaterial) throw (InputError)
 {
 
@@ -221,7 +222,7 @@
       for (int v=0;v<3;++v) {
         int index = model->triangles[ group->triangles[i] ].vindices[v];
         vertex_indices.push_back(index-1);
-        
+
         index = model->triangles[ group->triangles[i] ].nindices[v];
         if (index > 0) {
           normal_indices.push_back(index-1);
@@ -239,7 +240,7 @@
           normal_indices.push_back(vertexNormals.size());
           vertexNormals.push_back(normal);
         }
-        
+
         index = model->triangles[ group->triangles[i] ].tindices[v];
         if (index > 0) {
           texture_indices.push_back(index-1);
@@ -259,11 +260,11 @@
       face_material.push_back(material_index);
       addTriangle(&triangles[objs.size()]);
     }
-    
+
     // Move to the next group.
     group = group->next;
   }
-  
+
   // std::cerr << "Total triangles added: " << tri << std::endl;
   removeDegenerateTriangles();
 }
@@ -275,7 +276,7 @@
      if (material_array[i])
        delete material_array[i];
    }
-   
+
    // Delete the array.
    delete [] material_array;
  }

Modified: trunk/include/CMakeLists.txt
==============================================================================
--- trunk/include/CMakeLists.txt        (original)
+++ trunk/include/CMakeLists.txt        Tue Sep  4 17:35:01 2007
@@ -89,12 +89,19 @@
 ## Configure DynBVH_Parameters.h
 
 SET(MANTA_USE_DYNBVH_PORTS OFF CACHE BOOL "Use templated DynBVH Code")
+SET(MANTA_USE_DYNBVH_APPROXIMATE ON CACHE BOOL "Use approximate DynBVH 
Build")
 
 IF(MANTA_USE_DYNBVH_PORTS)
   SET(MANTA_USE_DYNBVH_PORTS_DEF "1")
 ELSE(MANTA_USE_DYNBVH_PORTS)
   SET(MANTA_USE_DYNBVH_PORTS_DEF "0")
 ENDIF(MANTA_USE_DYNBVH_PORTS)
+
+IF(MANTA_USE_DYNBVH_APPROXIMATE)
+  SET(MANTA_USE_DYNBVH_APPROXIMATE_DEF "1")
+ELSE(MANTA_USE_DYNBVH_APPROXIMATE)
+  SET(MANTA_USE_DYNBVH_APPROXIMATE_DEF "0")
+ENDIF(MANTA_USE_DYNBVH_APPROXIMATE)
 
 CONFIGURE_FILE(
   ${CMAKE_CURRENT_SOURCE_DIR}/DynBVH_Parameters.h.CMakeTemplate

Modified: trunk/include/DynBVH_Parameters.h.CMakeTemplate
==============================================================================
--- trunk/include/DynBVH_Parameters.h.CMakeTemplate     (original)
+++ trunk/include/DynBVH_Parameters.h.CMakeTemplate     Tue Sep  4 17:35:01 
2007
@@ -39,6 +39,8 @@
 #define USE_DYNBVH_PORTS 0
 #endif
 
+#define USE_APPROXIMATE_BUILD ${MANTA_USE_DYNBVH_APPROXIMATE_DEF}
+
 #endif
 
 




  • [Manta] r1711 - in trunk: Model/Groups include, boulos, 09/04/2007

Archive powered by MHonArc 2.6.16.

Top of page