[59] | 1 | #include "CullingManager.h" |
---|
| 2 | |
---|
[2280] | 3 | |
---|
[59] | 4 | namespace GtpVisibility { |
---|
| 5 | |
---|
[2280] | 6 | |
---|
| 7 | |
---|
[59] | 8 | //----------------------------------------------------------------------- |
---|
[74] | 9 | CullingManager::CullingManager(): |
---|
[2280] | 10 | mHierarchyInterface(NULL), |
---|
| 11 | mVisibilityThreshold(0), |
---|
| 12 | mNumQueryCulledNodes(0), |
---|
| 13 | mNumFrustumCulledNodes(0), |
---|
| 14 | mNumQueriesIssued(0), |
---|
[112] | 15 | mVisualizeCulledNodes(false) |
---|
[59] | 16 | { |
---|
| 17 | } |
---|
| 18 | //----------------------------------------------------------------------- |
---|
| 19 | void CullingManager::SetHierarchyInterface(HierarchyInterface *hierarchyInterface) |
---|
| 20 | { |
---|
| 21 | mHierarchyInterface = hierarchyInterface; |
---|
| 22 | } |
---|
[74] | 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 | } |
---|
[87] | 38 | //-----------------------------------------------------------------------
|
---|
| 39 | unsigned int CullingManager::GetNumQueriesIssued()
|
---|
| 40 | {
|
---|
| 41 | return mNumQueriesIssued;
|
---|
| 42 | } |
---|
[112] | 43 | //----------------------------------------------------------------------- |
---|
| 44 | void CullingManager::SetVisualizeCulledNodes(bool visualizeCulledNodes) |
---|
| 45 | { |
---|
| 46 | mVisualizeCulledNodes = visualizeCulledNodes; |
---|
| 47 | } |
---|
[87] | 48 | //-----------------------------------------------------------------------
|
---|
[112] | 49 | void CullingManager::InitFrame(bool visualizeCulledNodes) |
---|
[87] | 50 | { |
---|
| 51 | mNumFrustumCulledNodes = mNumQueryCulledNodes = mNumQueriesIssued = 0; |
---|
[112] | 52 | mVisualizeCulledNodes = visualizeCulledNodes; |
---|
[87] | 53 | } |
---|
[59] | 54 | } // namespace GtpVisibility |
---|