#ifndef _VisibilityManager_H__ #define _VisibilityManager_H__ #include "CullingManager.h" #include "VisibilityEnvironment.h" /** This namespace includes all classes which are created by the VUT (Vienna University of Technology for the Visibility module of the GTP (GameTools Project) (www.gametools.org), and are not directly derived from an Ogre class. */ namespace GtpVisibility { class QueryManager; class PreprocessingManager; /** This class manages all forms of visibility. It is the main class of our visibility module and manages online occlusion culling, offline culling, and visibility queries. */ class VisibilityManager { public: /** Constructor taking the visibility environment object as parameter @param visEnvironment the visibility environment */ VisibilityManager(VisibilityEnvironment *visEnvironment); ~VisibilityManager(); /** Sets the current online occlusion culling manager, e.g., the stop and wait algorithm or coherent hierarchical culling. @param ocmType the online occlusion culling manager type */ void SetCullingManager(VisibilityEnvironment::CullingManagerType ocmType); /** Returns the current online occlusion culling manager. */ CullingManager *GetCullingManager(); /** Returns the current online occlusion culling manager type. See set */ VisibilityEnvironment::CullingManagerType GetCullingManagerType(); /** Applies the online visibility culling algorithm on a scene. @remark the algorithm depends on the current culling manager. */ void ApplyVisibilityCulling(); /** Sets the threshold for the visibiliy culling algorithm. @param visibilityThreshold number of visible pixels where an object is still considered invisible. @remark automatically sets the threshold of the current and of new culling managers to this value. */ void SetVisibilityCullingThreshold(unsigned int threshold); /** Determines if optimization for coherent hierarchical culling is used. */ void SetUseChcOptimization(bool useOptimization); protected: CullingManager *mCullingManager; QueryManager *mQueryManager; PreprocessingManager *mPreprocessingManager; VisibilityEnvironment *mVisibilityEnvironment; VisibilityEnvironment::CullingManagerType mCullingManagerType; unsigned int mVisibilityThreshold; }; } // namespace GtpVisibility #endif // VisibilityManager