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

Revision 2280, 2.8 KB checked in by mattausch, 18 years ago (diff)

removed dependency on ogre in gtpvisibility

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);
60       
[130]61        /** Sets pointer to a query manager.
62        */
63        void SetQueryManager(QueryManager *queryManager);
64        /** see set
65        */
66        QueryManager *GetQueryManager();
[114]67
[925]68        VisibilityEnvironment *GetVisibilityEnvironment();
69
[2280]70
[59]71protected:
72       
[114]73        CullingManager *mCullingManager;
74        QueryManager *mQueryManager;
75        PreprocessingManager *mPreprocessingManager;
76        VisibilityEnvironment *mVisibilityEnvironment;
77        VisibilityEnvironment::CullingManagerType mCullingManagerType;
[74]78
[114]79        unsigned int mVisibilityThreshold;
[155]80        unsigned int mAssumedVisibilityForChc;
[59]81};
82} // namespace GtpVisibility
[71]83
[130]84#endif // VisibilityManager
Note: See TracBrowser for help on using the repository browser.