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