Changeset 1614 for GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp
- Timestamp:
- 10/12/06 01:05:47 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp
r1610 r1614 1103 1103 } 1104 1104 1105 } 1105 1106 void HierarchyManager::ExportBoundingBoxes(OUT_STREAM &stream, const ObjectContainer &objects) 1107 { 1108 stream << "<BoundingBoxes>" << endl; 1109 1110 if (mObjectSpaceSubdivisionType == KD_BASED_OBJ_SUBDIV) 1111 { 1112 KdIntersectableMap::const_iterator kit, kit_end = mOspTree->mKdIntersectables.end(); 1113 1114 int id = 0; 1115 for (kit = mOspTree->mKdIntersectables.begin(); kit != kit_end; ++ kit, ++ id) 1116 { 1117 Intersectable *obj = (*kit).second; 1118 const AxisAlignedBox3 box = obj->GetBox(); 1119 1120 obj->SetId(id); 1121 1122 stream << "<BoundingBox" << " id=\"" << id << "\"" 1123 << " min=\"" << box.Min().x << " " << box.Min().y << " " << box.Min().z << "\"" 1124 << " max=\"" << box.Max().x << " " << box.Max().y << " " << box.Max().z << "\" />" << endl; 1125 } 1126 } 1127 else 1128 { 1129 ObjectContainer::const_iterator oit, oit_end = objects.end(); 1130 1131 for (oit = objects.begin(); oit != oit_end; ++ oit) 1132 { 1133 const AxisAlignedBox3 box = (*oit)->GetBox(); 1134 1135 stream << "<BoundingBox" << " id=\"" << (*oit)->GetId() << "\"" 1136 << " min=\"" << box.Min().x << " " << box.Min().y << " " << box.Min().z << "\"" 1137 << " max=\"" << box.Max().x << " " << box.Max().y << " " << box.Max().z << "\" />" << endl; 1138 } 1139 } 1140 1141 stream << "</BoundingBoxes>" << endl; 1142 } 1143 1144 }
Note: See TracChangeset
for help on using the changeset viewer.