Changeset 308 for trunk/VUT/GtpVisibilityPreprocessor/src/Preprocessor.cpp
- Timestamp:
- 10/05/05 02:19:15 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/Preprocessor.cpp
r304 r308 16 16 Preprocessor::~Preprocessor() 17 17 { 18 CLEAR_CONTAINER(mViewCells); 19 DEL_PTR(mBspTree); 20 DEL_PTR(mKdTree); 21 DEL_PTR(mRootViewCell); 18 DeleteViewCells(); 19 20 DEL_PTR(mBspTree); 21 DEL_PTR(mKdTree); 22 DEL_PTR(mRootViewCell); 22 23 } 23 24 … … 26 27 { 27 28 return X3dParser().ParseFile(filename, mViewCells); 29 } 30 31 void Preprocessor::DeleteViewCells() 32 { 33 for (int i = 0; i < mViewCells.size(); ++ i) 34 delete mViewCells[i]->GetMesh(); 35 36 CLEAR_CONTAINER(mViewCells); 28 37 } 29 38 … … 90 99 DEL_PTR(mBspTree); 91 100 DEL_PTR(mRootViewCell); 92 mRootViewCell = new ViewCell( );101 mRootViewCell = new ViewCell(NULL); 93 102 mBspTree = new BspTree(mRootViewCell); 94 103 95 104 ObjectContainer objects; 96 105 RayContainer rays; 97 ViewCellContainer dummy; 106 98 107 switch (BspTree::sConstructionMethod) 99 108 { … … 102 111 break; 103 112 case BspTree::SCENE_GEOMETRY: 104 CLEAR_CONTAINER(mViewCells); // we generate new view cells113 DeleteViewCells(); // we generate new view cells 105 114 mSceneGraph->CollectObjects(&objects); 106 115 mBspTree->Construct(objects, &mViewCells); 107 116 break; 108 117 case BspTree::RAYS: 109 CLEAR_CONTAINER(mViewCells); // we generate new view cells118 DeleteViewCells(); // we generate new view cells 110 119 mBspTree->Construct(rays, &mViewCells); 111 120 break;
Note: See TracChangeset
for help on using the changeset viewer.