Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[MANTA] r1003 - trunk/scenes


Chronological Thread 
  • From: bigler@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [MANTA] r1003 - trunk/scenes
  • Date: Fri, 7 Apr 2006 11:40:32 -0600 (MDT)

Author: bigler
Date: Fri Apr  7 11:40:31 2006
New Revision: 1003

Modified:
   trunk/scenes/iwviewer.cc
Log:

Added None_Build (-nobvh) which uses no accelaration structure.


Modified: trunk/scenes/iwviewer.cc
==============================================================================
--- trunk/scenes/iwviewer.cc    (original)
+++ trunk/scenes/iwviewer.cc    Fri Apr  7 11:40:31 2006
@@ -63,16 +63,17 @@
 
 enum {
   DynBVH_Build,
-  KDTree2_Build
+  KDTree2_Build,
+  None_Build
 };
 
 static string iw_file_name;
 static string bsp_file_name;
 static int tri_type = WaldTri;
+static int build_type = DynBVH_Build;
 static bool use_default_color = false;
 static int material_type = Lambertian_Material;
 static BBox bounds;
-static int build_type = DynBVH_Build;
 
 static Object* buildDynBVH(IWObject* iw);
 static Object* buildKDTree2(IWObject* iw);
@@ -94,6 +95,8 @@
       build_type = KDTree2_Build;
     } else if (args[i] == "-tri" ) {
       tri_type = Tri;
+    } else if (args[i] == "-nobvh" ) {
+      build_type = None_Build;
     } else if (args[i] == "-flat" ) {
       material_type = Flat_Material;
     } else if (args[i] == "-normal" ) {
@@ -119,7 +122,10 @@
 
   // Add the bvh to the scene.
   switch(build_type) {
-  case DynBVH_Build: scene->setObject( buildDynBVH(iw) ); break;
+  case DynBVH_Build:
+  case None_Build:
+    scene->setObject( buildDynBVH(iw) );
+    break;
   case KDTree2_Build:
     {
       Object* kdtree = buildKDTree2(iw);
@@ -163,7 +169,14 @@
   
   Group* bvh_group = 0;
 
-  bvh_group = new DynBVH();
+  switch (build_type) {
+  case DynBVH_Build:
+    bvh_group = new DynBVH();
+    break;
+  case None_Build:
+    bvh_group = new Group();
+    break;
+  }
 
   // Iterate over all the triangles and make them
   switch (tri_type) {




  • [MANTA] r1003 - trunk/scenes, bigler, 04/07/2006

Archive powered by MHonArc 2.6.16.

Top of page