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