- Timestamp:
- 08/03/05 17:02:22 (19 years ago)
- Location:
- trunk/VUT
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/include/ViewCellBSP.h
r190 r194 1 1 #ifndef _ViewCellBsp_H__ 2 2 #define _ViewCellBsp_H__ 3 4 #include "Containers.h" 3 5 4 6 class ViewCell; … … 15 17 { 16 18 public: 17 18 @return true if leaf19 20 19 /** Determines whether this node is a leaf or not 20 @return true if leaf 21 */ 22 virtual bool IsLeaf() const = 0; 21 23 22 /** Determines whether this node is a root 23 @return true if root 24 */ 25 virtual bool IsRoot(); 24 /** Determines whether this node is a root 25 @return true if root 26 */ 27 virtual bool IsRoot(); 28 29 protected: 26 30 27 protected: 28 /// parent of this node 29 BSPInterior *mParent; 31 void SplitPoly(Plane3 *plane, Mesh *viewcell); 32 33 /// parent of this node 34 BSPInterior *mParent; 30 35 }; 31 36 … … 33 38 class BSPInterior : public BSPNode 34 39 { 35 36 40 /** @return false since it is an interior node */ 41 bool IsLeaf() const; 37 42 38 39 40 41 42 43 44 43 protected: 44 /// Splitting plane corresponding to this node 45 Plane3 mPlane; 46 /// back node 47 BSPNode *mBack; 48 /// front node 49 BSPNode *mFront; 45 50 }; 46 51 … … 50 55 { 51 56 public: 52 BSPLeaf(ViewCell *viewCell = NULL);53 54 57 BSPLeaf(ViewCell *viewCell = NULL); 58 /** @return true since it is an interior node */ 59 virtual bool IsLeaf(); 55 60 56 61 protected: 57 58 59 62 /// polygonal representation of this viewcell 63 /// if NULL this note does not correspond to feasible viewcell 64 ViewCell *mViewCell; 60 65 }; 61 66 … … 64 69 { 65 70 public: 66 67 viewspace */68 71 /** Constructor takes a pointer to the cell corresponding to the whole 72 viewspace */ 73 BSPTree(ViewCell *cell); 69 74 70 75 protected: 71 72 73 74 76 /// Pointer to the root of the tree 77 BSPNode *mRoot; 78 /// Pointer to the root cell of the viewspace */ 79 ViewCell *mRootCell; 75 80 }; 76 81 -
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBSP.h
r190 r194 4 4 class ViewCell; 5 5 class Plane3; 6 class Mesh; 6 7 7 8 //namespace GtpVisibilityPreprocessor { 8 9 9 10 class BSPInterior; 10 11 11 12 13 14 15 16 17 12 /** 13 BSPNode abstract class serving for interior and leaf node implementation 14 */ 15 class BSPNode 16 { 17 public: 18 /** Determines whether this node is a leaf or not 18 19 @return true if leaf 19 20 */ … … 25 26 virtual bool IsRoot() const; 26 27 27 protected: 28 protected: 29 30 void SplitPoly(Plane3 *plane, Mesh *viewcell); 31 28 32 /// parent of this node 29 33 BSPInterior *mParent; -
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBsp.cpp
r190 r194 1 1 #include "Plane3.h" 2 2 #include "ViewCellBsp.h" 3 #include "Mesh.h" 3 4 4 5 class ViewCell; … … 9 10 { 10 11 return mParent == NULL; 12 } 13 14 void BSPNode::SplitPoly(Plane3 *plane, Mesh *viewcell) 15 { 11 16 } 12 17
Note: See TracChangeset
for help on using the changeset viewer.