#ifndef _CoherentHierarchicalCullingManager_H__ #define _CoherentHierarchicalCullingManager_H__ #include "CullingManager.h" #include "HierarchyInterface.h" namespace GtpVisibility { /** Renders the scene with the coherent hierarchical culling algorithm. */ class CoherentHierarchicalCullingManager : public CullingManager { public: CoherentHierarchicalCullingManager(); /** Constructor taking the assumed visibility into account, i.e., the estimation for how many frames the current visibility is considered to be valid */ CoherentHierarchicalCullingManager(const unsigned int assumedVisibility); void RenderScene(); /** Sets assumed visibility (i.e., an estimation for how many frames the visibility is considered to be valid). @param assumedVisibility indicates for how many frames the same visibility is be assumed. if 0, the visibility is tested deterministically for each frame. */ void SetAssumedVisibility(const unsigned int assumedVisibility); protected: /** Decides if node is considered to be visible depeding on the assumed visibility factor. @returns if node is considered to be visible */ bool DecideVisible(HierarchyNode *node) const; unsigned int mAssumedVisibility; /** Skip query for this node. */ void SkipQuery(HierarchyNode *node) const; /** Threshold for rand function to return positive result with respect to mAssumedVisibility. */ int mThreshold; }; } // namespace GtpVisibility #endif // CoherentHierarchicalCullingManager_H