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

Revision 2455, 1.7 KB checked in by mattausch, 17 years ago (diff)
Line 
1#ifndef _CoherentHierarchicalCullingManager2_H__
2#define _CoherentHierarchicalCullingManager2_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 with
12        some additional features
13*/
14class CoherentHierarchicalCullingManager2: public CullingManager
15{
16public:
17        CoherentHierarchicalCullingManager2();
18
19        /** Constructor taking the assumed visibility into account, i.e., the estimation
20                for how many frames the current visibility is considered to be valid
21        */
22        CoherentHierarchicalCullingManager2(const unsigned int assumedVisibility);
23
24        /** The main render routine.
25        */
26        void RenderScene();
27
28        /** Sets assumed visibility (i.e., an estimation for
29                how many frames the visibility is considered to be valid).
30                @param assumedVisibility indicates for how many frames the
31                same visibility is be assumed.
32                if 0, the visibility is tested deterministically for each frame.
33        */
34        void SetAssumedVisibility(const unsigned int assumedVisibility);
35
36protected:
37
38        /** Decides if node is considered to be visible depeding on the
39                assumed visibility factor.
40                @returns if node is considered to be visible
41        */
42        bool DecideVisible(HierarchyNode *node) const;
43
44        /** Skip query for this node.
45        */
46        void SkipQuery(HierarchyNode *node) const;
47
48        /** number of steps the visibility is assumed to be valid.
49        */
50        unsigned int mAssumedVisibility;
51
52        /** Threshold for rand function to return positive result with respect to
53                mAssumedVisibility.
54        */
55        int mThreshold;
56};
57
58} // namespace GtpVisibility
59
60#endif // CoherentHierarchicalCullingManager2_H
Note: See TracBrowser for help on using the repository browser.