Ignore:
Timestamp:
05/01/05 23:29:27 (19 years ago)
Author:
mattausch
Message:

added support for release mode

Location:
trunk/VUT/GtpVisibility/include
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/GtpVisibility/include/CoherentHierarchicalCullingManager.h

    r59 r74  
    1717{ 
    1818public: 
    19         CoherentHierarchicalCullingManager(HierarchyInterface *hierarchyInterface); 
    2019        void RenderScene(); 
    2120}; 
  • trunk/VUT/GtpVisibility/include/CullingManager.h

    r59 r74  
    1212{ 
    1313public: 
    14         /** Constructor taking a scene traverser for a specific type of hierarchy as argument.  
     14        /** Default constructor.  
     15                @remark an appropriate hierarchy interface must be provided for the algorithms to 
     16                work on specific hierarchy 
    1517        */ 
    16         CullingManager(HierarchyInterface *hierarchyInterface); 
     18        CullingManager(); 
    1719        /** Renders the scene using a specific occlusion culling algorithm, e.g., coherent 
    1820                hierarchical culling or stop and wait. 
     
    2426        */ 
    2527        void SetHierarchyInterface(HierarchyInterface *hierarchyInterface); 
     28        /** Sets the threshold for the visibiliy culling algorithm. 
     29                @param visibilityThreshold number of visible pixels where an object  
     30                is still considered invisible. 
     31        */ 
     32        void SetVisibilityThreshold(unsigned int visibilityThreshold); 
     33 
     34        /** Returns number of frustum culled nodes. 
     35        */ 
     36        unsigned int GetNumFrustumCulledNodes(); 
     37        /** Returns number of occlusion query culled nodes. 
     38        */ 
     39        unsigned int GetNumQueryCulledNodes(); 
    2640 
    2741protected: 
     
    2943        unsigned int mNumQueryCulledNodes; 
    3044        unsigned int mNumFrustumCulledNodes; 
     45        unsigned int mVisibilityThreshold; 
    3146 
    32         unsigned int mVisibilityThreshold; 
    3347        HierarchyInterface *mHierarchyInterface; 
    3448}; 
  • trunk/VUT/GtpVisibility/include/FrustumCullingManager.h

    r59 r74  
    1212{ 
    1313public: 
    14         FrustumCullingManager(HierarchyInterface *hierarchyInterface); 
    1514        void RenderScene(); 
    1615}; 
  • trunk/VUT/GtpVisibility/include/HierarchyInterface.h

    r65 r74  
    1919                @returns true if node is leaf 
    2020        */ 
    21     virtual bool IsLeaf(HierarchyNode *node) = 0; 
     21    virtual bool IsLeaf(HierarchyNode *node) const = 0; 
    2222        /** Traverses the given node.  
    2323                @param node the hierarchy node 
     
    4141        */ 
    4242        void SetSceneRoot(HierarchyNode *root); 
    43   /** Get the root of the scene hierarchy. 
    44       @return the hierarchy root 
    45   */ 
    46   HierarchyNode *GetSceneRoot() const { 
    47     return mSceneRoot; 
    48   } 
     43    /** Get the root of the scene hierarchy. 
     44                @return the hierarchy root 
     45        */ 
     46        HierarchyNode *GetSceneRoot() const; 
    4947        /** Sets the scene root and initialises this scene traverser for a traversal. 
    5048                @param root current scene root 
     
    5250        */ 
    5351        void InitFrame(HierarchyNode *root); 
    54          
    5552        /** Returns current frame id. 
    5653                @returns frame id 
    5754        */ 
    58         int GetFrameId(); 
     55        unsigned int GetFrameId() const; 
    5956        /** Returns the current distance queue. 
    6057                @returns current distance queue 
     
    6663                @param node2 the second node to be compared 
    6764        */                       
    68         virtual bool HasGreaterDistance(HierarchyNode *node1, HierarchyNode *node2) = 0; 
     65        virtual bool HasGreaterDistance(HierarchyNode *node1, HierarchyNode *node2) const = 0; 
    6966        /** Checks if the node is visible from the current view frustum. 
    7067                @param node the current node 
     
    7269        */ 
    7370        virtual bool CheckFrustumVisible(HierarchyNode *node, bool &intersects) = 0; 
     71        /** Checks if the node is visible from the current view frustum. 
     72                @param node the current node 
     73        */ 
     74        bool CheckFrustumVisible(HierarchyNode *node); 
    7475        /** Returns next available occlusion query or creates new one. 
    7576                @return the next occlusion query 
     
    8081                @returns if the node has renderable geometry 
    8182        */ 
    82     virtual bool HasGeometry(HierarchyNode *node) = 0; 
     83    virtual bool HasGeometry(HierarchyNode *node) const = 0; 
    8384        /** Sets the visible flag for this node. 
    8485                @param node the current node 
     
    8889        /** Returns true if node has the visible flag set. See set 
    8990        */ 
    90         virtual bool IsNodeVisible(HierarchyNode *node) = 0; 
     91        virtual bool IsNodeVisible(HierarchyNode *node) const = 0; 
    9192        /** Sets the last visited frame id for this node. 
    9293                @param node the current node 
    9394                @param frameId the current frame id 
    9495        */ 
    95         virtual void SetLastVisited(HierarchyNode *node, const int frameId) = 0; 
     96        virtual void SetLastVisited(HierarchyNode *node,  
     97                                                                const unsigned int frameId) = 0; 
    9698        /** Returns frame id when this node was last visited by the traverser. See set 
    9799        */ 
    98         virtual int LastVisited(HierarchyNode *node) = 0; 
     100        virtual unsigned int LastVisited(HierarchyNode *node) const = 0; 
     101        /** Returns number of traversed nodes. 
     102        */ 
     103        unsigned int GetNumTraversedNodes(); 
     104        /** Returns number of rendered nodes. 
     105        */ 
     106        unsigned int GetNumRenderedNodes(); 
    99107 
    100108protected: 
     
    105113         
    106114        //--- statistics 
    107         unsigned int mNumSceneNodes; 
    108115        unsigned int mNumTraversedNodes; 
    109         unsigned int mNumRenderedGeometry; 
    110116        unsigned int mNumRenderedNodes; 
    111117 
  • trunk/VUT/GtpVisibility/include/StopAndWaitCullingManager.h

    r59 r74  
    1111{ 
    1212public: 
    13         StopAndWaitCullingManager(HierarchyInterface *hierarchyInterface); 
    1413        void RenderScene(); 
    1514}; 
  • trunk/VUT/GtpVisibility/include/VisibilityEnvironment.h

    r71 r74  
    1313        /** Different types of occlusion culling algorithms  
    1414        */ 
    15         enum CullingManagerType {FRUSTUM_CULLING, STOP_AND_WAIT, COHERENT_HIERARCHICAL_CULLING}; 
     15        enum CullingManagerType {FRUSTUM_CULLING,  
     16                                                         STOP_AND_WAIT_CULLING,  
     17                                                         COHERENT_HIERARCHICAL_CULLING,  
     18                                                         NUM_CULLING_MANAGERS}; 
    1619 
    1720        /** Loads an environment from disk. 
     
    2124} // namespace GtpVisibility 
    2225 
    23 /** @}*/ // end of group Visibility 
    24  
    2526#endif // VisibilityEnvironment_H 
  • trunk/VUT/GtpVisibility/include/VisibilityManager.h

    r71 r74  
    4141        void ApplyVisibilityCulling(); 
    4242 
     43        /** Sets the threshold for the visibiliy culling algorithm. 
     44                @param visibilityThreshold number of visible pixels where an object  
     45                is still considered invisible. 
     46                @remark automatically sets the threshold of the current and of  
     47                new culling managers to this value. 
     48        */ 
     49        void SetVisibilityCullingThreshold(unsigned int threshold); 
     50 
    4351protected: 
    4452         
     
    4856  VisibilityEnvironment *mVisibilityEnvironment; 
    4957  VisibilityEnvironment::CullingManagerType mCullingManagerType; 
     58 
     59  unsigned int mVisibilityThreshold; 
     60 
    5061}; 
    5162} // namespace GtpVisibility 
Note: See TracChangeset for help on using the changeset viewer.