1 | #include "CullingManager.h" |
---|
2 | |
---|
3 | |
---|
4 | namespace GtpVisibility { |
---|
5 | |
---|
6 | |
---|
7 | |
---|
8 | //----------------------------------------------------------------------- |
---|
9 | CullingManager::CullingManager(): |
---|
10 | mHierarchyInterface(NULL), |
---|
11 | mVisibilityThreshold(0), |
---|
12 | mNumQueryCulledNodes(0), |
---|
13 | mNumFrustumCulledNodes(0), |
---|
14 | mNumQueriesIssued(0), |
---|
15 | mVisualizeCulledNodes(false) |
---|
16 | { |
---|
17 | } |
---|
18 | //----------------------------------------------------------------------- |
---|
19 | void CullingManager::SetHierarchyInterface(HierarchyInterface *hierarchyInterface) |
---|
20 | { |
---|
21 | mHierarchyInterface = hierarchyInterface; |
---|
22 | } |
---|
23 | //----------------------------------------------------------------------- |
---|
24 | void CullingManager::SetVisibilityThreshold(unsigned int visibilityThreshold) |
---|
25 | { |
---|
26 | mVisibilityThreshold = visibilityThreshold; |
---|
27 | } |
---|
28 | //-----------------------------------------------------------------------
|
---|
29 | unsigned int CullingManager::GetNumFrustumCulledNodes()
|
---|
30 | {
|
---|
31 | return mNumFrustumCulledNodes;
|
---|
32 | }
|
---|
33 | //-----------------------------------------------------------------------
|
---|
34 | unsigned int CullingManager::GetNumQueryCulledNodes()
|
---|
35 | {
|
---|
36 | return mNumQueryCulledNodes;
|
---|
37 | } |
---|
38 | //-----------------------------------------------------------------------
|
---|
39 | unsigned int CullingManager::GetNumQueriesIssued()
|
---|
40 | {
|
---|
41 | return mNumQueriesIssued;
|
---|
42 | } |
---|
43 | //----------------------------------------------------------------------- |
---|
44 | void CullingManager::SetVisualizeCulledNodes(bool visualizeCulledNodes) |
---|
45 | { |
---|
46 | mVisualizeCulledNodes = visualizeCulledNodes; |
---|
47 | } |
---|
48 | //-----------------------------------------------------------------------
|
---|
49 | void CullingManager::InitFrame(bool visualizeCulledNodes) |
---|
50 | { |
---|
51 | mNumFrustumCulledNodes = mNumQueryCulledNodes = mNumQueriesIssued = 0; |
---|
52 | mVisualizeCulledNodes = visualizeCulledNodes; |
---|
53 | } |
---|
54 | } // namespace GtpVisibility |
---|