Text archives Help
- From: bigler@sci.utah.edu
- To: manta@sci.utah.edu
- Subject: [MANTA] r1118 - in trunk: Model/Groups scenes
- Date: Thu, 15 Jun 2006 17:44:53 -0600 (MDT)
Author: bigler
Date: Thu Jun 15 17:44:53 2006
New Revision: 1118
Modified:
trunk/Model/Groups/GriddedGroup.cc
trunk/scenes/objviewer.cc
Log:
Model/Groups/GriddedGroup.cc
When a ray doesn't hit the bounding box "continue" to the next ray
instead of exiting the function.
scenes/objviewer.cc
Added GriddedGroup build. Use "-grid" to enable.
Modified: trunk/Model/Groups/GriddedGroup.cc
==============================================================================
--- trunk/Model/Groups/GriddedGroup.cc (original)
+++ trunk/Model/Groups/GriddedGroup.cc Thu Jun 15 17:44:53 2006
@@ -176,9 +176,9 @@
Real tnear = vmin.maxComponent();
Real tfar = vmax.minComponent();
if(tnear >= tfar)
- return;
+ continue;
if(tfar < (Real)1.e-6)
- return;
+ continue;
if(tnear < 0)
tnear = 0;
Modified: trunk/scenes/objviewer.cc
==============================================================================
--- trunk/scenes/objviewer.cc (original)
+++ trunk/scenes/objviewer.cc Thu Jun 15 17:44:53 2006
@@ -55,6 +55,7 @@
#include <Model/Groups/RealisticBvh.h>
#include <Model/Groups/BVH.h>
#include <Model/Groups/DynBVH.h>
+#include <Model/Groups/GriddedGroup.h>
#include <Model/Lights/HeadLight.h>
#include <Model/AmbientLights/ConstantAmbient.h>
#include <Model/Backgrounds/ConstantBackground.h>
@@ -106,7 +107,8 @@
enum {
RealisticBvh_Build,
DynBVH_Build,
- BVH_Build
+ BVH_Build,
+ GriddedGroup_Build
};
int which_BVH = RealisticBvh_Build;
vector<string> BVH_args;
@@ -150,6 +152,10 @@
std::cout << "Doing DynBVH build\n";
which_BVH = DynBVH_Build;
}
+ else if (args[i] == "-grid") {
+ std::cout << "Doing GriddedGroup build\n";
+ which_BVH = GriddedGroup_Build;
+ }
else if (args[i] == "-bvh-build") {
string build;
if (!getStringArg(i, args, build))
@@ -427,6 +433,14 @@
case BVH_Build:
bvh_group = new BVH(BVH_args);
break;
+ case GriddedGroup_Build:
+ {
+ vector<string> args;
+ args.push_back("-cellfactor");
+ args.push_back("1");
+ bvh_group = new GriddedGroup(args);
+ }
+ break;
}
create_materials( model );
@@ -513,7 +527,8 @@
break;
case DynBVH_Build:
case BVH_Build:
- // both cases just add
+ case GriddedGroup_Build:
+ // these cases just add
bvh_group->add(triangle);
break;
}
@@ -546,6 +561,7 @@
break;
case DynBVH_Build:
case BVH_Build:
+ case GriddedGroup_Build:
bvh = bvh_group;
// Preprocesing will be done during the preprocessing phase
break;
- [MANTA] r1118 - in trunk: Model/Groups scenes, bigler, 06/15/2006
Archive powered by MHonArc 2.6.16.