Changeset 2760 for GTP/trunk/App/Demos/Vis/CHC_revisited/Bvh.h
- Timestamp:
- 06/14/08 19:04:01 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/CHC_revisited/Bvh.h
r2756 r2760 14 14 15 15 //////// 16 // Forward declarations16 //-- Forward declarations 17 17 18 18 class SceneEntity; 19 19 class Camera; 20 class RenderState; 20 21 21 22 … … 210 211 /// the bounding box 211 212 AxisAlignedBox3 mBox; 212 213 213 }; 214 214 … … 347 347 /** Returns split axis of this interior node. 348 348 */ 349 inline int GetAxis() { return (int)mAxis; }349 //inline int GetAxis() { return (int)mAxis; } 350 350 /** Returns position of the split axis. 351 351 */ 352 inline float GetPosition() {return (float)mPosition;}352 //inline float GetPosition() {return (float)mPosition;} 353 353 354 354 … … 356 356 357 357 /// the position of the split plane 358 float mPosition;358 //float mPosition; 359 359 360 360 BvhNode *mBack; … … 407 407 mInteriorVol(0), 408 408 mLeafVol(0), 409 mBoundsInteriorSA(0),410 mBoundsLeafSA(0),411 mBoundsInteriorVol(0),412 mBoundsLeafVol(0),413 mBoundsLeavesCount(0),414 409 mTriangles(0), 415 410 mTriangleRatio(0), … … 423 418 float mInteriorVol; 424 419 float mLeafVol; 425 float mBoundsInteriorSA; 426 float mBoundsLeafSA; 427 float mBoundsInteriorVol; 428 float mBoundsLeafVol; 429 int mBoundsLeavesCount; 420 430 421 int mTriangles; 431 422 … … 479 470 int RenderBoundingBoxes(const BvhNodeContainer &nodes); 480 471 472 /** Returns the bounding box of this bvh. 473 */ 474 inline const AxisAlignedBox3 &GetBox() { return mBox; } 481 475 482 476 … … 535 529 const BvhStats &GetBvhStats() const {return mBvhStats;} 536 530 531 int Render(BvhNode *node, RenderState *state); 532 537 533 538 534 protected: … … 543 539 */ 544 540 Bvh(); 541 542 /** Protected constructor taking scene geometry into account 543 */ 544 const Bvh(const SceneEntityContainer &entities); 545 545 546 546 … … 574 574 */ 575 575 void RecomputeBounds(); 576 /** Does some postprocessing on the leaves. 577 @returns #leaves that were chosen for tighter bounds. 578 */ 579 int PostProcessLeaves(BvhLeafContainer &leaves); 580 581 576 /** Does some postprocessing on the nodes. 577 */ 578 //void PostProcess(); 579 /** Helper method that updates the number of leaves in the subtree under 580 this node. 581 */ 582 void UpdateNumLeaves(BvhNode *node) const; 583 582 584 //////////////////////// 583 585 … … 619 621 int mNumNodes; 620 622 623 /// the bounding box 624 AxisAlignedBox3 mBox; 621 625 622 626 //////////////
Note: See TracChangeset
for help on using the changeset viewer.