- Timestamp:
- 08/08/05 14:39:15 (19 years ago)
- Location:
- trunk/VUT/GtpVisibilityPreprocessor
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/include/Preprocessor.h
r74 r221 68 68 SceneGraph *mSceneGraph; 69 69 /// BSP tree representing the viewcells 70 B SPTree *mViewCellBSPTree;70 BspTree *mViewCellBspTree; 71 71 /// kD-tree organizing the scene graph (occluders + occludees) + viewcells 72 72 KdTree *mKdTree; -
trunk/VUT/GtpVisibilityPreprocessor/scripts/Preprocessor.vcproj
r219 r221 256 256 </File> 257 257 <File 258 RelativePath="..\src\ViewCellB SP.h">258 RelativePath="..\src\ViewCellBsp.h"> 259 259 </File> 260 260 <File … … 315 315 </File> 316 316 <File 317 RelativePath="..\include\ViewCellB SP.h">317 RelativePath="..\include\ViewCellBsp.h"> 318 318 </File> 319 319 </Filter> -
trunk/VUT/GtpVisibilityPreprocessor/src/Preprocessor.h
r176 r221 79 79 SceneGraph *mSceneGraph; 80 80 /// BSP tree representing the viewcells 81 B SPTree *mViewCellBSPTree;81 BspTree *mViewCellBspTree; 82 82 /// kD-tree organizing the scene graph (occluders + occludees) + viewcells 83 83 KdTree *mKdTree; -
trunk/VUT/GtpVisibilityPreprocessor/src/Rectangle3.h
r209 r221 38 38 Rectangle3 &r1, 39 39 Rectangle3 &r2 40 ) const ;40 ) const 41 41 42 42 {//TODO 43 } 43 44 44 45 }; -
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCell.h
r220 r221 6 6 //namespace GtpVisibilityPreprocessor { 7 7 8 class B SPInterior;8 class BspInterior; 9 9 class BspPvs; 10 10 /** -
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBsp.cpp
r202 r221 8 8 //namespace GtpVisibilityPreprocessor { 9 9 /****************************************************************/ 10 /* class B SPNode implementation */10 /* class BspNode implementation */ 11 11 /****************************************************************/ 12 bool B SPNode::IsRoot() const12 bool BspNode::IsRoot() const 13 13 { 14 14 return mParent == NULL; … … 16 16 17 17 /****************************************************************/ 18 /* class B SPInterior implementation */18 /* class BspInterior implementation */ 19 19 /****************************************************************/ 20 20 21 bool B SPInterior::IsLeaf() const21 bool BspInterior::IsLeaf() const 22 22 { 23 23 return false; 24 24 } 25 25 26 void B SPInterior::ReplaceChildLink(BSPNode *oldChild, BSPNode *newChild)26 void BspInterior::ReplaceChildLink(BspNode *oldChild, BspNode *newChild) 27 27 { 28 28 if (mBack == oldChild) … … 36 36 } 37 37 38 void B SPInterior::SetupChildLinks(BSPNode *b, BSPNode *f)38 void BspInterior::SetupChildLinks(BspNode *b, BspNode *f) 39 39 { 40 40 mBack = b; … … 43 43 44 44 /****************************************************************/ 45 /* class B SPLeaf implementation */45 /* class BspLeaf implementation */ 46 46 /****************************************************************/ 47 47 48 B SPLeaf::BSPLeaf(ViewCell *viewCell): mViewCell(viewCell)48 BspLeaf::BspLeaf(ViewCell *viewCell): mViewCell(viewCell) 49 49 { 50 50 } 51 51 52 bool B SPLeaf::IsLeaf() const52 bool BspLeaf::IsLeaf() const 53 53 { 54 54 return true; … … 56 56 57 57 /****************************************************************/ 58 /* class B SPTree implementation */58 /* class BspTree implementation */ 59 59 /****************************************************************/ 60 60 61 B SPTree::BSPTree(ViewCell *cell)61 BspTree::BspTree(ViewCell *cell) 62 62 { 63 63 mRootCell = cell; 64 mRoot = new B SPLeaf(mRootCell);64 mRoot = new BspLeaf(mRootCell); 65 65 } 66 66 67 67 68 void B SPTree::Subdivide()68 void BspTree::Subdivide() 69 69 { 70 B SPNode *currentNode = mRoot;70 BspNode *currentNode = mRoot; 71 71 72 std::stack<B SPTraversalData> tStack;72 std::stack<BspTraversalData> tStack; 73 73 // stack<STraversalData> tStack; 74 74 … … 77 77 while (!tStack.empty()) 78 78 { 79 B SPTraversalData data = tStack.top();79 BspTraversalData data = tStack.top(); 80 80 tStack.pop(); 81 81 … … 83 83 Mesh frontPolys; 84 84 85 B SPNode *node = SubdivideNode(dynamic_cast<BSPLeaf *>(data.mNode),85 BspNode *node = SubdivideNode(dynamic_cast<BspLeaf *>(data.mNode), 86 86 data.mParent, 87 87 &data.mViewCell, … … 92 92 if (!node->IsLeaf()) 93 93 { 94 B SPInterior *interior = dynamic_cast<BSPInterior *>(node);94 BspInterior *interior = dynamic_cast<BspInterior *>(node); 95 95 96 96 // push the children on the stack 97 97 if (interior->GetBack()) 98 tStack.push(B SPTraversalData(interior->GetBack(), interior, backPolys, data.mDepth+1));98 tStack.push(BspTraversalData(interior->GetBack(), interior, backPolys, data.mDepth+1)); 99 99 if (interior->GetFront()) 100 tStack.push(B SPTraversalData(interior->GetFront(), interior, frontPolys, data.mDepth+1));100 tStack.push(BspTraversalData(interior->GetFront(), interior, frontPolys, data.mDepth+1)); 101 101 } 102 102 } 103 103 } 104 104 105 Plane3 *B SPTree::SelectPlane(Mesh *viewcell)105 Plane3 *BspTree::SelectPlane(Mesh *viewcell) 106 106 { 107 107 return &viewcell->GetFacePlane(0); 108 108 } 109 109 110 B SPNode *BSPTree::SubdivideNode(BSPLeaf *leaf, BSPInterior *parent,110 BspNode *BspTree::SubdivideNode(BspLeaf *leaf, BspInterior *parent, 111 111 Mesh *viewCell, const int depth, 112 112 Mesh &frontPolys, Mesh &backPolys) … … 119 119 // add the new nodes to the tree + select subdivision plane 120 120 Plane3 *plane = SelectPlane(viewCell); 121 B SPInterior *node = new BSPInterior(*plane); // ERROR!!121 BspInterior *node = new BspInterior(*plane); // ERROR!! 122 122 123 123 … … 128 128 } 129 129 130 B SPLeaf *back = new BSPLeaf(mRootCell);131 B SPLeaf *front = new BSPLeaf(mRootCell);130 BspLeaf *back = new BspLeaf(mRootCell); 131 BspLeaf *front = new BspLeaf(mRootCell); 132 132 133 133 // replace a link from node's parent
Note: See TracChangeset
for help on using the changeset viewer.