#ifndef _RandomUpdateCullingManager_H__ #define _RandomUpdateCullingManager_H__ #include "CullingManager.h" #include "HierarchyInterface.h" namespace GtpVisibility { /** Renders the scene with the coherent hierarchical culling algorithm. */ class RandomUpdateCullingManager : public CullingManager { public: RandomUpdateCullingManager(); /** Constructor taking the #random candidates tested per subtree into account. */ RandomUpdateCullingManager(const unsigned int randomCandidates); void RenderScene(); /** Sets #random candidates tested per subtree. */ void SetRandomCandidates(const unsigned int randomCandidates); /** This is an optimization when issuing the occlusion test. The test is done with actual geometry rather than the bounding box of leave nodes previously marked as visible. @param testGeometry if this optimization should be used @remark this option is only useful for the coherent hierarchical culling algorithm */ void SetTestGeometryForVisibleLeaves(const bool testGeometry); /** See TestGeometryForVisibleLeaves */ bool GetTestGeometryForVisibleLeaves(); protected: /** Skip query for this node. */ void SkipQuery(HierarchyNode *node) const; //////////// /// number of candidates that are tested per subtree unsigned int mRandomCandidates; bool mTestGeometryForVisibleLeaves; }; } // namespace GtpVisibility #endif // RandomUpdateCullingManager_H