Changeset 1027 for GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellBsp.cpp
- Timestamp:
- 06/21/06 09:44:39 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellBsp.cpp
r1016 r1027 60 60 61 61 62 bool BspNode::IsRoot() const63 {64 return mParent == NULL;65 }66 67 68 BspInterior *BspNode::GetParent()69 {70 return mParent;71 }72 73 74 void BspNode::SetParent(BspInterior *parent)75 {76 mParent = parent;77 }78 79 80 62 bool BspNode::IsSibling(BspNode *n) const 81 63 { … … 127 109 } 128 110 129 bool BspInterior::IsLeaf() const130 {131 return false;132 }133 134 BspNode *BspInterior::GetBack()135 {136 return mBack;137 }138 139 BspNode *BspInterior::GetFront()140 {141 return mFront;142 }143 144 Plane3 BspInterior::GetPlane() const145 {146 return mPlane;147 }148 149 void BspInterior::ReplaceChildLink(BspNode *oldChild, BspNode *newChild)150 {151 if (mBack == oldChild)152 mBack = newChild;153 else154 mFront = newChild;155 }156 111 157 112 void BspInterior::SetupChildLinks(BspNode *b, BspNode *f) … … 193 148 BspNode(parent), mViewCell(viewCell), mPvs(NULL) 194 149 { 195 }196 197 ViewCellLeaf *BspLeaf::GetViewCell() const198 {199 return mViewCell;200 }201 202 void BspLeaf::SetViewCell(ViewCellLeaf *viewCell)203 {204 mViewCell = viewCell;205 }206 207 208 bool BspLeaf::IsLeaf() const209 {210 return true;211 150 } 212 151 … … 1010 949 // generate new view cell for each leaf 1011 950 if (mGenerateViewCells) 951 { 1012 952 viewCell = new BspViewCell(); 953 } 1013 954 else 955 { 1014 956 // add view cell to leaf 1015 957 viewCell = dynamic_cast<BspViewCell *>(tData.mViewCell); 1016 958 } 959 1017 960 leaf->SetViewCell(viewCell); 1018 961 viewCell->mLeaf = leaf; … … 1036 979 } 1037 980 1038 EvaluateLeafStats(tData); 981 if (1) 982 EvaluateLeafStats(tData); 1039 983 1040 984 //-- clean up … … 1045 989 CLEAR_CONTAINER(*tData.mRays); 1046 990 1047 DEL_PTR(tData.mPolygons);1048 DEL_PTR(tData.mRays);1049 DEL_PTR(tData.mGeometry);991 delete tData.mPolygons; 992 delete tData.mRays; 993 delete tData.mGeometry; 1050 994 1051 995 return leaf;
Note: See TracChangeset
for help on using the changeset viewer.