#ifndef _CullingManager_H__ #define _CullingManager_H__ #include "HierarchyInterface.h" namespace GtpVisibility { /** This abstract class implements an interface for a specific culling algorithm. The algorithm is either used to render a scene or to make a visibility query. */ class CullingManager { public: /** Default constructor. @remark an appropriate hierarchy interface must be provided for the algorithms to work on specific hierarchy */ CullingManager(); /** Renders the scene using a specific occlusion culling algorithm, e.g., coherent hierarchical culling or stop and wait. */ virtual void RenderScene() = 0; /** Sets the hierarchy interface. @param hierarchyInterface @remark the hierarchy interface encapsulates the hierarchy we are working on */ void SetHierarchyInterface(HierarchyInterface *hierarchyInterface); /** Sets the threshold for the visibiliy culling algorithm. @param visibilityThreshold number of visible pixels where an object is still considered invisible. */ void SetVisibilityThreshold(unsigned int visibilityThreshold); /** Returns number of frustum culled nodes. */ unsigned int GetNumFrustumCulledNodes(); /** Returns number of occlusion query culled nodes. */ unsigned int GetNumQueryCulledNodes(); protected: unsigned int mNumQueryCulledNodes; unsigned int mNumFrustumCulledNodes; unsigned int mVisibilityThreshold; HierarchyInterface *mHierarchyInterface; }; } // namespace GtpVisibility #endif // CullingManager