Changeset 1405 for GTP/trunk/Lib/Vis/Preprocessing
- Timestamp:
- 09/18/06 02:33:26 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.cpp
r1404 r1405 309 309 //-- create front and back leaf 310 310 311 AxisAlignedBox3 fbox = ComputeBoundingBox(sc.mFrontObjects, &parentBox);312 AxisAlignedBox3 bbox = ComputeBoundingBox(sc.mBackObjects, &parentBox);311 AxisAlignedBox3 fbox = EvalBoundingBox(sc.mFrontObjects, &parentBox); 312 AxisAlignedBox3 bbox = EvalBoundingBox(sc.mBackObjects, &parentBox); 313 313 314 314 BvhLeaf *back = … … 1272 1272 //-- surface area heuristics 1273 1273 1274 const AxisAlignedBox3 box = ComputeBoundingBox(objects);1274 const AxisAlignedBox3 box = EvalBoundingBox(objects); 1275 1275 const float area = box.SurfaceArea(); 1276 1276 … … 1290 1290 1291 1291 1292 AxisAlignedBox3 BvHierarchy::ComputeBoundingBox(const ObjectContainer &objects, 1293 const AxisAlignedBox3 *parentBox) const 1294 { 1292 AxisAlignedBox3 BvHierarchy::EvalBoundingBox(const ObjectContainer &objects, 1293 const AxisAlignedBox3 *parentBox) const 1294 { 1295 // if there are no objects in this box, box size is set to parent box size. 1296 // Question: Invalidate box instead? 1295 1297 if (parentBox && objects.empty()) 1296 1298 return *parentBox; … … 1304 1306 { 1305 1307 Intersectable *obj = *oit; 1306 1307 1308 // grow bounding box to include all objects 1308 1309 box.Include(obj->GetBox()); … … 1607 1608 { 1608 1609 //-- create new root 1609 AxisAlignedBox3 box = ComputeBoundingBox(objects);1610 AxisAlignedBox3 box = EvalBoundingBox(objects); 1610 1611 BvhLeaf *bvhleaf = new BvhLeaf(box, NULL, (int)objects.size()); 1611 1612 bvhleaf->mObjects = objects; -
GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.h
r1379 r1405 700 700 /** Prepares construction for vsp and osp trees. 701 701 */ 702 AxisAlignedBox3 ComputeBoundingBox(702 AxisAlignedBox3 EvalBoundingBox( 703 703 const ObjectContainer &objects, 704 704 const AxisAlignedBox3 *parentBox = NULL) const; -
GTP/trunk/Lib/Vis/Preprocessing/src/Exporter.cpp
r1404 r1405 123 123 { 124 124 BvhLeaf *leaf = *it; 125 if (leaf->mObjects.empty()) 126 continue; 125 127 126 128 SetWireframe(); 127 129 SetForcedMaterial(white); 128 130 ExportBox(leaf->GetBoundingBox()); 129 130 131 SetFilled(); 131 132 … … 238 239 239 240 //-- all objects exported as one mesh 240 //-- hack: currently itworks only for triangles241 //-- hack: currently works only for triangles 241 242 PolygonContainer polys; 242 243 -
GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp
r1404 r1405 404 404 405 405 if (exporter) { 406 if ( scene)406 if (0 && scene) 407 407 exporter->ExportScene(mSceneGraph->GetRoot()); 408 408 409 if ( kdtree) {409 if (0 && kdtree) { 410 410 exporter->SetWireframe(); 411 411 exporter->ExportKdTree(*mKdTree); 412 412 } 413 413 414 if ( bsptree) {414 if (0 && bsptree) { 415 415 //exporter->SetWireframe(); 416 416 exporter->ExportBspTree(*mBspTree);
Note: See TracChangeset
for help on using the changeset viewer.