#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(); void RenderScene(); /** Sets assumed visibility which is a an estimation for e how many frames the visibility is considered to be valied @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(unsigned int assumedVisibility); protected: /** Decides wether occlusion query should be issued depending on some assumed visibility factor. @returns if occlusion query should be issued */ bool DecideQueryTest(HierarchyNode *node) const; unsigned int mAssumedVisibility; /** Threshold for rand function to return positive result with respect to mAssumedVisibility. */ unsigned int mThreshold; }; } // namespace GtpVisibility #endif // CoherentHierarchicalCullingManager_H