source: trunk/VUT/GtpVisibility/include/CullingManager.h @ 87

Revision 87, 1.7 KB checked in by mattausch, 20 years ago (diff)
Line 
1#ifndef _CullingManager_H__
2#define _CullingManager_H__
3
4#include "HierarchyInterface.h"
5
6namespace GtpVisibility {
7
8/** This abstract class implements an interface for a specific culling
9        algorithm. The algorithm is either used to render a scene or to make a visibility query.
10*/
11class CullingManager
12{
13public:
14        /** Default constructor.
15                @remark an appropriate hierarchy interface must be provided for the algorithms to
16                work on specific hierarchy
17        */
18        CullingManager();
19        /** Renders the scene using a specific occlusion culling algorithm, e.g., coherent
20                hierarchical culling or stop and wait.
21        */
22        virtual void RenderScene() = 0;
23        /** Sets the hierarchy interface.
24                @param hierarchyInterface
25                @remark the hierarchy interface encapsulates the hierarchy we are working on
26        */
27        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();
40        /** Returns number of issued occlusion queries.
41        */
42        unsigned int GetNumQueriesIssued();
43        /** basic initializations on beginning of each frame, e.g.,
44                resets statistics.
45        */
46        void InitFrame();
47
48protected:
49       
50        unsigned int mNumQueryCulledNodes;
51        unsigned int mNumFrustumCulledNodes;
52        unsigned int mVisibilityThreshold;
53        unsigned int mNumQueriesIssued;
54
55        HierarchyInterface *mHierarchyInterface;
56};
57} // namespace GtpVisibility
58#endif // CullingManager
Note: See TracBrowser for help on using the repository browser.