Changeset 261 for trunk/VUT/GtpVisibilityPreprocessor/src/Preprocessor.cpp
- Timestamp:
- 09/08/05 18:45:51 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/Preprocessor.cpp
r260 r261 7 7 #include "Environment.h" 8 8 9 10 bool 11 Preprocessor::LoadViewcells(const string filename) 9 10 Preprocessor::~Preprocessor() 12 11 { 13 14 return true; 12 // delete view cells 13 while (!mViewCells.empty()) 14 { 15 DEL_PTR(mViewCells.back()); 16 mViewCells.pop_back(); 17 } 18 19 // delete psp tree 20 DEL_PTR(mBspTree); 15 21 } 16 22 17 23 bool 18 Preprocessor::GenerateViewcells() 24 Preprocessor::LoadViewCells(const string filename) 25 { 26 X3dParser *parser = new X3dParser; 27 28 delete parser; 29 30 bool result = parser->ParseFile(filename, mViewCells); 31 32 if (result) 33 { 34 Exporter *exporter = Exporter::GetExporter(filename); 35 36 if (exporter) 37 exporter->ExportViewCells(&mViewCells); 38 39 GenerateViewCells(); 40 } 41 return result; 42 } 43 44 bool 45 Preprocessor::GenerateViewCells() 19 46 { 20 47 return BuildBspTree(); … … 38 65 bool result = parser->ParseFile(filename, &mSceneGraph->mRoot); 39 66 67 delete parser; 68 40 69 return result; 41 70 } … … 90 119 { 91 120 case BspTree::VIEWCELLS: 92 93 mViewcells.clear();121 // derive view cells from the scene objects 122 //ViewCell::DeriveViewCells(objects, mViewCells, maxViewCells); 94 123 95 // derive viewcells from the scene objects 96 ViewCell::DeriveViewCells(objects, mViewcells, maxViewCells); 97 98 mBspTree->Construct(mViewcells); 124 mBspTree->Construct(mViewCells); 99 125 break; 100 126 case BspTree::SCENE_GEOMETRY: 101 mBspTree->Construct(objects); 127 CLEAR_CONTAINER(mViewCells); 128 mBspTree->Construct(objects, &mViewCells); 129 break; 130 case BspTree::RAYS: 131 CLEAR_CONTAINER(mViewCells); 132 mBspTree->Construct(objects, &mViewCells); 102 133 break; 103 134 default:
Note: See TracChangeset
for help on using the changeset viewer.