Ignore:
Timestamp:
04/02/07 11:50:36 (17 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/include/HierarchyInterface.h

    r2292 r2306  
    5858        virtual OcclusionQuery *IssueNodeOcclusionQuery(HierarchyNode *node,  
    5959                                                                                                        const bool wasVisible = false) = 0; 
    60         /** Sets the root of the scene hierarchy. 
    61                 @param root the hierarchy root 
    62         */ 
    63         void SetHierarchyRoot(HierarchyNode *root); 
    64     /** Get the root of the scene hierarchy. 
    65                 @return the hierarchy root 
    66         */ 
    67         HierarchyNode *GetHierarchyRoot() const; 
    68         /** Sets the scene root and initialises this hierarchy interface for a traversal.                
    69                 @remark also resets the statistics evaluated in the last traversal 
    70         */ 
    71         void InitTraversal(); 
    72         /** Returns current frame id. 
    73                 @returns frame id 
    74         */ 
    75         unsigned int GetFrameId() const; 
    76         /** Returns a pointer to the distance queue. 
    77                 @returns current distance queue. 
    78                 @remark the distance queue stores hierarchy nodes in a front-to-back order 
    79         */ 
    80         DistanceQueue *GetQueue(); 
    81          
    8260        /** Returns distance of the node to the view plane. 
    8361                @param node the hierarchy node 
     
    9068        virtual bool CheckFrustumVisible(HierarchyNode *node,  
    9169                                                                         bool &intersects) = 0; 
    92         /** Checks if the node is visible from the current view frustum. 
    93                 @param node the current node 
    94         */ 
    95         bool CheckFrustumVisible(HierarchyNode *node); 
    96         /** Returns next available occlusion query or creates new one. 
    97                 @return the next occlusion query 
    98         */ 
    99         virtual OcclusionQuery *GetNextOcclusionQuery() = 0; 
     70         
    10071        /** Returns true if there is renderable geometry attached to this node 
    10172                @param node the current node 
     
    11889        virtual void SetLastVisited(HierarchyNode *node,  
    11990                                                                const unsigned int frameId) const = 0; 
     91         
     92 
     93        virtual void DetermineFullVisibility(GtpVisibility::HierarchyNode *node) const = 0; 
     94 
     95        virtual HierarchyNode *GetRandomLeaf(HierarchyNode *root) = 0; 
     96        virtual bool IsNodeFullyVisible(GtpVisibility::HierarchyNode *node) const = 0; 
     97 
     98        virtual void CollectLeaves(HierarchyNode *root, HierarchyNodeContainer &nodes) = 0; 
     99 
     100        virtual void RenderNodeRecursive(HierarchyNode *node) = 0; 
     101 
    120102        /** Returns frame id when this node was last visited by the traverser. See set 
    121103        */ 
    122104        virtual unsigned int LastVisited(HierarchyNode *node) const = 0; 
    123         /** Returns number of traversed nodes. 
    124         */ 
    125         unsigned int GetNumTraversedNodes(); 
    126         /** Returns number of rendered nodes. 
    127         */ 
    128         unsigned int GetNumRenderedNodes(); 
    129105                 
    130         //bool mIsShadowPass; 
    131  
    132106        /** Visualization of a culled node, dependent on the culling type.  
    133107                @param node the hierarchy node to be visualized 
     
    137111                                                                         CullingType type) const = 0; 
    138112 
    139         /** Returns vector of visible hierarchy nodes from previous render. 
     113        /** Sets the root of the scene hierarchy. 
     114                @param root the hierarchy root 
    140115        */ 
    141         std::vector<HierarchyNode *> *GetVisibleNodes(); 
    142         /** Returns vector of previoulsy rendered geometry. 
     116        void SetHierarchyRoot(HierarchyNode *root); 
     117    /** Get the root of the scene hierarchy. 
     118                @return the hierarchy root 
    143119        */ 
    144          
     120        HierarchyNode *GetHierarchyRoot() const; 
    145121         
    146122        /** This is an optimization when issuing the occlusion test.  
     
    153129        void TestGeometryForVisibleLeaves(bool testGeometry); 
    154130 
     131        /** Sets the scene root and initialises this hierarchy interface for a traversal.                
     132                @remark also resets the statistics evaluated in the last traversal 
     133        */ 
     134        void InitTraversal(); 
     135        /** Returns current frame id. 
     136                @returns frame id 
     137        */ 
     138        unsigned int GetFrameId() const; 
     139        /** Returns a pointer to the distance queue. 
     140                @returns current distance queue. 
     141                @remark the distance queue stores hierarchy nodes in a front-to-back order 
     142        */ 
     143        DistanceQueue *GetQueue(); 
    155144 
    156         virtual void DetermineFullVisibility(GtpVisibility::HierarchyNode *node) const = 0; 
     145        /** Checks if the node is visible from the current view frustum. 
     146                @param node the current node 
     147        */ 
     148        bool CheckFrustumVisible(HierarchyNode *node); 
    157149 
    158         virtual HierarchyNode *GetRandomLeaf(HierarchyNode *root) = 0; 
    159         virtual bool IsNodeFullyVisible(GtpVisibility::HierarchyNode *node) const = 0; 
     150        /** Returns number of traversed nodes. 
     151        */ 
     152        unsigned int GetNumTraversedNodes(); 
     153        /** Returns number of rendered nodes. 
     154        */ 
     155        unsigned int GetNumRenderedNodes(); 
    160156 
    161         virtual void CollectLeaves(HierarchyNode *root, HierarchyNodeContainer &nodes) = 0; 
     157        /** Returns vector of visible hierarchy nodes from previous render. 
     158        */ 
     159        std::vector<HierarchyNode *> *GetVisibleNodes(); 
    162160 
    163         virtual void RenderNodeRecursive(HierarchyNode *node) = 0; 
     161        virtual void PullUpLastVisited(GtpVisibility::HierarchyNode *node, const int frameId) const = 0; 
     162        virtual void DetermineVisibilityRatio(GtpVisibility::HierarchyNode *node) const = 0; 
     163        virtual float GetNodeVisibilityRatio(GtpVisibility::HierarchyNode *node) const = 0; 
    164164 
    165165protected: 
     
    185185        /// buffer for a node pointer 
    186186        HierarchyNode *mSavedNode; 
     187 
    187188        /// list of rendered hierarchy nodes (e.g., useful for exact visibility queries) 
    188189        std::vector<HierarchyNode *> mVisibleNodes; 
Note: See TracChangeset for help on using the changeset viewer.