source: trunk/VUT/GtpVisibility/include/VisibilityManager.h @ 130

Revision 130, 2.5 KB checked in by mattausch, 19 years ago (diff)

added visibility queries

Line 
1#ifndef _VisibilityManager_H__
2#define _VisibilityManager_H__
3
4#include "CullingManager.h"
5#include "VisibilityEnvironment.h"
6
7/** This namespace includes all classes which are created by the VUT (Vienna University
8        of Technology for the Visibility module of the GTP (GameTools Project) (www.gametools.org),
9        and are not directly derived from an Ogre class.
10*/
11namespace GtpVisibility {
12
13  class QueryManager;
14  class PreprocessingManager;
15 
16/** This class manages all forms of visibility. It is the main
17        class of our visibility module and manages online occlusion culling,
18        offline culling, and visibility queries.
19*/
20class VisibilityManager
21{
22public:
23        /** Constructor taking the visibility environment object as parameter
24                @param visEnvironment the visibility environment
25        */
26        VisibilityManager(VisibilityEnvironment *visEnvironment);
27       
28        ~VisibilityManager();
29        /** Sets the current online occlusion culling manager, e.g.,
30                the stop and wait algorithm or coherent hierarchical culling.
31                @param ocmType the online occlusion culling manager type
32        */
33        void SetCullingManager(VisibilityEnvironment::CullingManagerType ocmType);
34        /** Returns the current online occlusion culling manager.
35        */
36        CullingManager *GetCullingManager();
37        /** Returns the current online occlusion culling manager type. See set
38        */
39        VisibilityEnvironment::CullingManagerType GetCullingManagerType();
40
41        /** Applies the online visibility culling algorithm on a scene.
42                @remark the algorithm depends on the current culling manager.
43        */
44        void ApplyVisibilityCulling();
45
46        /** Sets the threshold for the visibiliy culling algorithm.
47                @param visibilityThreshold number of visible pixels where an object
48                is still considered invisible.
49                @remark automatically sets the threshold of the current and of
50                new culling managers to this value.
51        */
52        void SetVisibilityCullingThreshold(unsigned int threshold);
53
54        /** Determines if optimization for coherent hierarchical culling is used.
55        */
56        void SetUseChcOptimization(bool useOptimization);
57        /** Sets pointer to a query manager.
58        */
59        void SetQueryManager(QueryManager *queryManager);
60        /** see set
61        */
62        QueryManager *GetQueryManager();
63
64protected:
65       
66        CullingManager *mCullingManager;
67        QueryManager *mQueryManager;
68        PreprocessingManager *mPreprocessingManager;
69        VisibilityEnvironment *mVisibilityEnvironment;
70        VisibilityEnvironment::CullingManagerType mCullingManagerType;
71
72        unsigned int mVisibilityThreshold;
73
74};
75} // namespace GtpVisibility
76
77#endif // VisibilityManager
Note: See TracBrowser for help on using the repository browser.