Changeset 2800 for GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Bvh.h
- Timestamp:
- 06/27/08 01:43:45 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Bvh.h
r2792 r2800 52 52 /// if the node is newly processed with no prior history available 53 53 bool mIsNew; 54 /// the frame this node was last queried 55 int mLastQueriedFrame; 54 56 }; 55 57 … … 113 115 inline void SetTurnedVisibleFrame(int turnedVisibleFrame); 114 116 115 inline int GetLast TestedFrame();116 inline void SetLast TestedFrame(int lastTested);117 inline int GetLastQueriedFrame() const; 118 inline void SetLastQueriedFrame(int lastTested); 117 119 118 120 inline bool IsViewFrustumCulled() const; … … 155 157 ///////////// 156 158 157 /// some flags158 //int mFlags;159 159 /// the depth of this node 160 160 unsigned char mDepth; … … 217 217 218 218 219 219 220 ///////////////// 220 221 //-- public inline functions 221 222 223 222 224 int BvhNode::GetLastVisitedFrame() const 223 225 { … … 268 270 269 271 270 void BvhNode::SetViewFrustumCulled( constbool frustumCulled)272 void BvhNode::SetViewFrustumCulled(bool frustumCulled) 271 273 { 272 274 mVisibility.mIsFrustumCulled = frustumCulled; … … 280 282 281 283 282 void BvhNode::SetIsNew( constbool isNew)284 void BvhNode::SetIsNew(bool isNew) 283 285 { 284 286 mVisibility.mIsNew = isNew; … … 320 322 return mVisibility.mAssumedVisibleFrameId; 321 323 } 324 325 326 int BvhNode::GetLastQueriedFrame() const 327 { 328 return mVisibility.mLastQueriedFrame; 329 } 330 331 332 void BvhNode::SetLastQueriedFrame(int lastTested) 333 { 334 mVisibility.mLastQueriedFrame = lastTested; 335 } 336 322 337 323 338 … … 429 444 */ 430 445 inline int GetNumLeaves() const { return mNumNodes / 2 + 1;} 446 /** Returns number of 'virtual' nodes in the hierarchy, i.e. 447 the number of nodes actually used for traversal. 448 */ 449 int GetNumVirtualNodes() const { return mNumVirtualNodes; } 450 /** Returns number of bvh leaves. 451 */ 452 inline int GetNumVirtualLeaves() const { return mNumVirtualNodes / 2 + 1;} 431 453 /** Returns root node of the bvh. 432 454 */ … … 512 534 */ 513 535 void SetVirtualLeaves(int numTriangles); 514 536 515 537 516 538 //////// … … 526 548 void SetAreaRatioThresholdForTestingChildren(float ratio); 527 549 550 551 //////////////////////////// 552 528 553 /** Returns stats. 529 554 */ 530 555 const BvhStats &GetBvhStats() const { return mBvhStats; } 531 /** Returns number of 'virtual' nodes in the hierarchy, i.e.532 the number of nodes actually used for traversal.533 */534 int GetNumVirtualNodes() const { return mNumVirtualNodes; }535 556 /** Render wireframe bvh for visualization purpose. 536 557 */
Note: See TracChangeset
for help on using the changeset viewer.