Changeset 2091 for GTP/trunk/Lib
- Timestamp:
- 02/05/07 14:33:28 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/Exporter.h
r1920 r2091 118 118 119 119 virtual void 120 ExportGeometry( 121 const ObjectContainer &objects, 122 const bool exportSingleMesh = false, 123 AxisAlignedBox3 *bbox = NULL); 120 ExportGeometry(const ObjectContainer &objects, 121 const bool exportSingleMesh = false, 122 AxisAlignedBox3 *bbox = NULL); 124 123 125 virtual void 124 virtual void 126 125 ExportMesh(Mesh *mesh) = 0; 127 126 … … 137 136 void SetFilled() { mWireframe = false; } 138 137 139 void SetForcedMaterial(const Material &m) { 140 mForcedMaterial = m; 141 mUseForcedMaterial = true; 138 void SetForcedMaterial(const Material &m) 139 { 140 mForcedMaterial = m; 141 mUseForcedMaterial = true; 142 142 } 143 void ResetForcedMaterial() { 144 mUseForcedMaterial = false; 143 144 void ResetForcedMaterial() 145 { 146 mUseForcedMaterial = false; 145 147 } 146 148 … … 152 154 void ExportKdIntersectable(const KdIntersectable &kdObj); 153 155 154 bool ExportBvHierarchy( 155 const BvHierarchy &bvHierarchy, 156 const float maxPvs, 157 AxisAlignedBox3 *box = NULL, 158 const bool exportBoundingBoxes = true); 156 bool ExportBvHierarchy(const BvHierarchy &bvHierarchy, 157 const float maxPvs, 158 AxisAlignedBox3 *box = NULL, 159 const bool exportBoundingBoxes = true); 159 160 160 161 virtual void ExportMeshInstance(MeshInstance *mi); 161 162 162 virtual void 163 ExportTransformedMeshInstance(TransformedMeshInstance *mi); 163 virtual void ExportTransformedMeshInstance(TransformedMeshInstance *mi); 164 164 165 virtual void ExportPolygon(Polygon3 *poly) = 0; 165 virtual void 166 ExportPolygon(Polygon3 *poly) = 0; 167 168 169 /////////////////////////// 166 170 167 171 bool mClampToBox; -
GTP/trunk/Lib/Vis/Preprocessing/src/KdTree.cpp
r2066 r2091 1380 1380 1381 1381 // sort objects by their id 1382 s td::stable_sort(objects.begin(), objects.end(), ilt);1382 sort(objects.begin(), objects.end(), ilt); 1383 1383 1384 1384 mBox.Initialize(); -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r2073 r2091 6591 6591 /////////////// 6592 6592 //-- export bounding boxes 6593 //-- The bounding boxes are used to identify 6594 //-- the objects in the rendering engine 6595 mHierarchyManager->ExportBoundingBoxes(stream, objects); 6593 //-- we need the boxes to identify objects in the target engine 6594 6595 if (mUseKdPvs) 6596 { 6597 vector<KdIntersectable *>::const_iterator kit, kit_end = mPreprocessor->mKdTree->mKdIntersectables.end(); 6598 6599 int id = 0; 6600 6601 for (kit = mPreprocessor->mKdTree->mKdIntersectables.begin(); kit != kit_end; ++ kit, ++ id) 6602 { 6603 Intersectable *obj = (*kit); 6604 const AxisAlignedBox3 box = obj->GetBox(); 6605 6606 // set kd id 6607 obj->SetId(id); 6608 6609 stream << "<BoundingBox" << " id=\"" << id << "\"" 6610 << " min=\"" << box.Min().x << " " << box.Min().y << " " << box.Min().z << "\"" 6611 << " max=\"" << box.Max().x << " " << box.Max().y << " " << box.Max().z << "\" />" << endl; 6612 } 6613 } 6614 else 6615 { 6616 mHierarchyManager->ExportBoundingBoxes(stream, objects); 6617 } 6596 6618 } 6597 6619
Note: See TracChangeset
for help on using the changeset viewer.