Ignore:
Timestamp:
06/14/08 19:04:01 (16 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/CHC_revisited/Bvh.h

    r2756 r2760  
    1414 
    1515//////// 
    16 // Forward declarations 
     16//-- Forward declarations 
    1717 
    1818class SceneEntity; 
    1919class Camera; 
     20class RenderState; 
    2021 
    2122 
     
    210211        /// the bounding box 
    211212        AxisAlignedBox3 mBox; 
    212  
    213213}; 
    214214 
     
    347347        /** Returns split axis of this interior node. 
    348348        */ 
    349         inline int GetAxis() { return (int)mAxis; } 
     349        //inline int GetAxis() { return (int)mAxis; } 
    350350        /** Returns position of the split axis. 
    351351        */ 
    352         inline float GetPosition() {return (float)mPosition;} 
     352        //inline float GetPosition() {return (float)mPosition;} 
    353353 
    354354 
     
    356356 
    357357        /// the position of the split plane 
    358         float mPosition; 
     358        //float mPosition; 
    359359         
    360360        BvhNode *mBack; 
     
    407407                mInteriorVol(0), 
    408408                mLeafVol(0), 
    409                 mBoundsInteriorSA(0), 
    410                 mBoundsLeafSA(0), 
    411                 mBoundsInteriorVol(0), 
    412                 mBoundsLeafVol(0), 
    413                 mBoundsLeavesCount(0), 
    414409                mTriangles(0), 
    415410                mTriangleRatio(0), 
     
    423418                float mInteriorVol; 
    424419                float mLeafVol;  
    425                 float mBoundsInteriorSA; 
    426                 float mBoundsLeafSA; 
    427                 float mBoundsInteriorVol; 
    428                 float mBoundsLeafVol; 
    429                 int mBoundsLeavesCount; 
     420                 
    430421                int mTriangles; 
    431422 
     
    479470        int RenderBoundingBoxes(const BvhNodeContainer &nodes); 
    480471 
     472        /** Returns the bounding box of this bvh. 
     473        */ 
     474        inline const AxisAlignedBox3 &GetBox() { return mBox; } 
    481475 
    482476 
     
    535529        const BvhStats &GetBvhStats() const {return mBvhStats;} 
    536530         
     531        int Render(BvhNode *node, RenderState *state); 
     532 
    537533 
    538534protected: 
     
    543539        */ 
    544540        Bvh(); 
     541 
     542        /** Protected constructor taking scene geometry into account 
     543        */ 
     544        const Bvh(const SceneEntityContainer &entities); 
    545545         
    546546 
     
    574574        */ 
    575575        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 
    582584        //////////////////////// 
    583585 
     
    619621        int mNumNodes; 
    620622 
     623        /// the bounding box 
     624        AxisAlignedBox3 mBox; 
    621625 
    622626        ////////////// 
Note: See TracChangeset for help on using the changeset viewer.