source: GTP/trunk/Lib/Vis/OnlineCullingCHC/include/RandomUpdateCullingManager.h @ 2455

Revision 2455, 1.4 KB checked in by mattausch, 17 years ago (diff)
Line 
1#ifndef _RandomUpdateCullingManager_H__
2#define _RandomUpdateCullingManager_H__
3
4#include "CullingManager.h"
5#include "HierarchyInterface.h"
6
7
8namespace GtpVisibility
9{
10
11/** Renders the scene with the coherent hierarchical culling algorithm.
12*/
13class RandomUpdateCullingManager : public CullingManager
14{
15public:
16       
17        RandomUpdateCullingManager();
18
19        /** Constructor taking the #random candidates tested per subtree into account.
20        */
21        RandomUpdateCullingManager(const unsigned int randomCandidates);
22
23        void RenderScene();
24
25        /** Sets #random candidates tested per subtree.
26        */
27        void SetRandomCandidates(const unsigned int randomCandidates);
28
29        /** This is an optimization when issuing the occlusion test.
30                The test is done with actual geometry rather than the bounding
31                box of leave nodes previously marked as visible.
32
33                @param testGeometry if this optimization should be used
34                @remark this option is only useful for the coherent hierarchical culling algorithm
35        */
36        void SetTestGeometryForVisibleLeaves(const bool testGeometry);
37        /** See TestGeometryForVisibleLeaves
38        */
39        bool GetTestGeometryForVisibleLeaves();
40
41protected:
42
43        /** Skip query for this node.
44        */
45        void SkipQuery(HierarchyNode *node) const;
46
47
48        ////////////
49
50        /// number of candidates that are tested per subtree
51        unsigned int mRandomCandidates;
52
53        bool mTestGeometryForVisibleLeaves;
54
55};
56
57} // namespace GtpVisibility
58
59#endif // RandomUpdateCullingManager_H
Note: See TracBrowser for help on using the repository browser.