Changeset 1614 for GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
- Timestamp:
- 10/12/06 01:05:47 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r1613 r1614 660 660 //-- export bounding boxes 661 661 stream << "<BoundingBoxes>" << endl; 662 ObjectContainer::const_iterator oit, oit_end = objects.end(); 662 #if USE_KD_PVS 663 KdIntersectableMap::const_iterator kit, kit_end = GetPreprocessor()->mKdTree->mKdIntersectables.end(); 664 665 int id = 0; 666 for (kit = GetPreprocessor()->mKdTree->mKdIntersectables.begin(); kit != kit_end; ++ kit, ++ id) 667 { 668 Intersectable *obj = (*kit).second; 669 const AxisAlignedBox3 box = obj->GetBox(); 670 671 obj->SetId(id); 672 673 stream << "<BoundingBox" << " id=\"" << id << "\"" 674 << " min=\"" << box.Min().x << " " << box.Min().y << " " << box.Min().z << "\"" 675 << " max=\"" << box.Max().x << " " << box.Max().y << " " << box.Max().z << "\" />" << endl; 676 } 677 #else 678 ObjectContainer::const_iterator oit, oit_end = objects.end(); 663 679 664 680 for (oit = objects.begin(); oit != oit_end; ++ oit) … … 672 688 << " max=\"" << box.Max().x << " " << box.Max().y << " " << box.Max().z << "\" />" << endl; 673 689 } 674 690 #endif 675 691 stream << "</BoundingBoxes>" << endl; 676 692 } … … 5339 5355 //-- The bounding boxes are used to identify 5340 5356 //-- the objects in the rendering engine 5341 5342 stream << "<BoundingBoxes>" << endl; 5343 ObjectContainer::const_iterator oit, oit_end = objects.end(); 5344 5345 for (oit = objects.begin(); oit != oit_end; ++ oit) 5346 { 5347 const AxisAlignedBox3 box = (*oit)->GetBox(); 5348 stream << "<BoundingBox" << " id=\"" << (*oit)->GetId() << "\"" 5349 << " min=\"" << box.Min().x << " " << box.Min().y << " " << box.Min().z << "\"" 5350 5351 << " max=\"" << box.Max().x << " " << box.Max().y << " " << box.Max().z << "\" />" << endl; 5352 } 5353 5354 stream << "</BoundingBoxes>" << endl; 5357 mHierarchyManager->ExportBoundingBoxes(stream, objects); 5355 5358 } 5356 5359
Note: See TracChangeset
for help on using the changeset viewer.