source: GTP/trunk/Lib/Vis/OnlineCullingCHC/include/VisibilityManager.h @ 2455

Revision 2455, 3.4 KB checked in by mattausch, 17 years ago (diff)
RevLine 
[71]1#ifndef _VisibilityManager_H__
2#define _VisibilityManager_H__
[59]3
4#include "CullingManager.h"
5#include "VisibilityEnvironment.h"
6
[2278]7
[59]8/** This namespace includes all classes which are created by the VUT (Vienna University
9        of Technology for the Visibility module of the GTP (GameTools Project) (www.gametools.org),
10        and are not directly derived from an Ogre class.
11*/
12namespace GtpVisibility {
13
[65]14  class QueryManager;
15  class PreprocessingManager;
16 
[59]17/** This class manages all forms of visibility. It is the main
18        class of our visibility module and manages online occlusion culling,
19        offline culling, and visibility queries.
20*/
21class VisibilityManager
22{
23public:
24        /** Constructor taking the visibility environment object as parameter
25                @param visEnvironment the visibility environment
26        */
27        VisibilityManager(VisibilityEnvironment *visEnvironment);
28       
29        ~VisibilityManager();
30        /** Sets the current online occlusion culling manager, e.g.,
31                the stop and wait algorithm or coherent hierarchical culling.
32                @param ocmType the online occlusion culling manager type
33        */
34        void SetCullingManager(VisibilityEnvironment::CullingManagerType ocmType);
[92]35        /** Returns the current online occlusion culling manager.
[59]36        */
37        CullingManager *GetCullingManager();
[92]38        /** Returns the current online occlusion culling manager type. See set
39        */
40        VisibilityEnvironment::CullingManagerType GetCullingManagerType();
[59]41
42        /** Applies the online visibility culling algorithm on a scene.
43                @remark the algorithm depends on the current culling manager.
44        */
45        void ApplyVisibilityCulling();
46
[74]47        /** Sets the threshold for the visibiliy culling algorithm.
[897]48                @param threshold number of visible pixels where an object
[74]49                is still considered invisible.
50                @remark automatically sets the threshold of the current and of
51                new culling managers to this value.
52        */
53        void SetVisibilityCullingThreshold(unsigned int threshold);
54
[146]55        /** Indicates for how long a frame is considered to be visible.
56                @param assumedVisibility estimation for how long visibility is assumed to be valid.
[155]57                @remark this option is only valid for the coherent hierarchical culling algorithm
[146]58        */
[155]59        void SetAssumedVisibilityForChc(unsigned int assumedVisibility);
[2455]60        /** Random candidates per subtree for random update manager.
61                @note these options should rather be given by general parameter system using void *
62                and strings.
63        */
64        void SetRandomUpdateCandidatesForRuc(unsigned int randomCandidatesForRuc);
65        /** See get
66        */
67        unsigned int GetAssumedVisibilityForChc();
68        /* See get
69        */
70        unsigned int GetRandomUpdateCandidatesForRuc();
[130]71        /** Sets pointer to a query manager.
72        */
73        void SetQueryManager(QueryManager *queryManager);
74        /** see set
75        */
76        QueryManager *GetQueryManager();
[114]77
[2455]78        void SetTestGeometryForVisibleLeaves(bool testGeometryForLeaves);
79        bool GetTestGeometryForVisibleLeaves();
80
81        /** Returns the visibility environment.
82        */
[925]83        VisibilityEnvironment *GetVisibilityEnvironment();
84
[2280]85
[59]86protected:
87       
[114]88        CullingManager *mCullingManager;
89        QueryManager *mQueryManager;
[2455]90
[114]91        PreprocessingManager *mPreprocessingManager;
92        VisibilityEnvironment *mVisibilityEnvironment;
93        VisibilityEnvironment::CullingManagerType mCullingManagerType;
[74]94
[114]95        unsigned int mVisibilityThreshold;
[155]96        unsigned int mAssumedVisibilityForChc;
[2455]97        unsigned int mRandomCandidatesForRuc;
98
99        bool mTestGeometryForVisibleLeaves;
[59]100};
[2455]101
[59]102} // namespace GtpVisibility
[71]103
[130]104#endif // VisibilityManager
Note: See TracBrowser for help on using the repository browser.