[71] | 1 | #ifndef _VisibilityManager_H__
|
---|
| 2 | #define _VisibilityManager_H__
|
---|
[59] | 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 | */
|
---|
| 11 | namespace GtpVisibility {
|
---|
| 12 |
|
---|
[65] | 13 | class QueryManager;
|
---|
| 14 | class PreprocessingManager;
|
---|
| 15 |
|
---|
[59] | 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 | */
|
---|
| 20 | class VisibilityManager
|
---|
| 21 | {
|
---|
| 22 | public:
|
---|
| 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. See set
|
---|
| 35 | */
|
---|
| 36 | CullingManager *GetCullingManager();
|
---|
| 37 |
|
---|
| 38 | /** Applies the online visibility culling algorithm on a scene.
|
---|
| 39 | @remark the algorithm depends on the current culling manager.
|
---|
| 40 | */
|
---|
| 41 | void ApplyVisibilityCulling();
|
---|
| 42 |
|
---|
[74] | 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 |
|
---|
[59] | 51 | protected:
|
---|
| 52 |
|
---|
[65] | 53 | CullingManager *mCullingManager;
|
---|
| 54 | QueryManager *mQueryManager;
|
---|
| 55 | PreprocessingManager *mPreprocessingManager;
|
---|
| 56 | VisibilityEnvironment *mVisibilityEnvironment;
|
---|
| 57 | VisibilityEnvironment::CullingManagerType mCullingManagerType;
|
---|
[74] | 58 |
|
---|
| 59 | unsigned int mVisibilityThreshold;
|
---|
| 60 |
|
---|
[59] | 61 | };
|
---|
| 62 | } // namespace GtpVisibility
|
---|
[71] | 63 |
|
---|
[65] | 64 | #endif // VisibilityManager
|
---|