Changeset 1415 for GTP/trunk/Lib/Vis/Preprocessing/src/Exporter.cpp
- Timestamp:
- 09/18/06 18:57:34 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/Exporter.cpp
r1405 r1415 33 33 34 34 35 bool Exporter::ExportOspTree(const OspTree &ospTree, const int maxPvs) 35 bool Exporter::ExportOspTree(const OspTree &ospTree, 36 const int maxPvs 37 ) 36 38 { 37 39 vector<KdLeaf *> leaves; 38 40 ospTree.CollectLeaves(leaves); 39 40 41 mUseForcedMaterial = true; 41 42 … … 69 70 SetForcedMaterial(RandomMaterial()); 70 71 } 71 72 72 if (0) ExportGeometry(leaf->mObjects); 73 73 } … … 80 80 { 81 81 KdNode *node = kdObj.GetItem(); 82 83 82 Intersectable::NewMail(); 84 83 … … 106 105 107 106 bool Exporter::ExportBvHierarchy(const BvHierarchy &bvHierarchy, 108 const int maxPvs) 107 const int maxPvs, 108 AxisAlignedBox3 *box) 109 109 { 110 110 vector<BvhLeaf *> leaves; … … 112 112 113 113 mUseForcedMaterial = true; 114 115 114 vector<BvhLeaf *>::const_iterator it, it_end = leaves.end(); 116 115 … … 126 125 continue; 127 126 127 if (box && !Overlap(*box, leaf->GetBoundingBox())) 128 continue; 129 128 130 SetWireframe(); 129 131 SetForcedMaterial(white); … … 223 225 224 226 void Exporter::ExportGeometry(const ObjectContainer &objects, 225 const bool exportSingleMesh) 227 const bool exportSingleMesh, 228 AxisAlignedBox3 *bbox) 226 229 { 227 230 ObjectContainer::const_iterator oit, oit_end = objects.end(); … … 231 234 for (oit = objects.begin(); oit != oit_end; ++ oit) 232 235 { 233 if (0) SetForcedMaterial(RandomMaterial()); 234 ExportIntersectable(*oit); 236 if (bbox && Overlap(*bbox, (*oit)->GetBox())) 237 { 238 if (0) SetForcedMaterial(RandomMaterial()); 239 ExportIntersectable(*oit); 240 } 235 241 } 236 242 … … 238 244 } 239 245 246 247 /////////////////////////////////////////// 240 248 //-- all objects exported as one mesh 241 249 //-- hack: currently works only for triangles 250 242 251 PolygonContainer polys; 243 252 … … 245 254 { 246 255 Intersectable *obj = *oit; 256 257 if (bbox && !Overlap(*bbox, (*oit)->GetBox())) 258 continue; 259 247 260 switch (obj->Type()) 248 261 {
Note: See TracChangeset
for help on using the changeset viewer.