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 | |
---|
20 | //----------------------------------------------------------------------- |
---|
21 | void CullingManager::SetHierarchyInterface(HierarchyInterface *hierarchyInterface) |
---|
22 | { |
---|
23 | mHierarchyInterface = hierarchyInterface; |
---|
24 | } |
---|
25 | //----------------------------------------------------------------------- |
---|
26 | void CullingManager::SetVisibilityThreshold(unsigned int visibilityThreshold) |
---|
27 | { |
---|
28 | mVisibilityThreshold = visibilityThreshold; |
---|
29 | } |
---|
30 | //-----------------------------------------------------------------------
|
---|
31 | unsigned int CullingManager::GetNumFrustumCulledNodes()
|
---|
32 | {
|
---|
33 | return mNumFrustumCulledNodes;
|
---|
34 | }
|
---|
35 | //-----------------------------------------------------------------------
|
---|
36 | unsigned int CullingManager::GetNumQueryCulledNodes()
|
---|
37 | {
|
---|
38 | return mNumQueryCulledNodes;
|
---|
39 | } |
---|
40 | //-----------------------------------------------------------------------
|
---|
41 | unsigned int CullingManager::GetNumQueriesIssued()
|
---|
42 | {
|
---|
43 | return mNumQueriesIssued;
|
---|
44 | } |
---|
45 | //----------------------------------------------------------------------- |
---|
46 | void CullingManager::SetVisualizeCulledNodes(bool visualizeCulledNodes) |
---|
47 | { |
---|
48 | mVisualizeCulledNodes = visualizeCulledNodes; |
---|
49 | } |
---|
50 | //-----------------------------------------------------------------------
|
---|
51 | void CullingManager::InitFrame(bool visualizeCulledNodes) |
---|
52 | { |
---|
53 | mNumFrustumCulledNodes = mNumQueryCulledNodes = mNumQueriesIssued = 0; |
---|
54 | mVisualizeCulledNodes = visualizeCulledNodes; |
---|
55 | } |
---|
56 | } // namespace GtpVisibility |
---|