Ignore:
Timestamp:
09/15/08 10:13:33 (16 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r2897 r2947  
    8585        bool IsVirtualLeaf() const { return mIsVirtualLeaf; } 
    8686 
     87        /** Returns the stored distance to the near plane. 
     88        */ 
     89        float GetDistance() const  { return mDistance; } 
     90 
    8791 
    8892        //////////////// 
     
    405409        bool operator() (BvhNode *v1, BvhNode *v2) const 
    406410    { 
    407                 return (v1->mDistance > v2->mDistance); 
     411                return (v1->GetDistance() > v2->GetDistance()); 
    408412    } 
    409413}; 
     
    520524        */ 
    521525        void InitFrame(Camera *camera); 
    522         /** This gives the orthogonal distance from the viewpoint to the nearest bounding box vertex 
    523                 note that negative values can appear because culling is done only afterwards 
    524         */ 
    525         void CalcDistance(BvhNode *node) const; 
    526         /** Returns the stored distance. 
    527         */ 
    528         float GetDistance(BvhNode *node) const  { return node->mDistance; } 
     526        /** Stores the orthogonal distance from the viewpoint  
     527                to the nearest bounding box vertex with the node.  
     528                Note that negative values can appear because culling is done only afterwards 
     529        */ 
     530        void UpdateMinDistance(BvhNode *node) const; 
     531        /** Returns the maximum distance from the near plane to this node. 
     532        */ 
     533        float CalcMaxDistance(BvhNode *node) const; 
    529534        /** Pulls up the last visited classification in the bvh. 
    530535        */ 
Note: See TracChangeset for help on using the changeset viewer.