Rev | Line | |
---|
[59] | 1 | #include "FrustumCullingManager.h" |
---|
[2289] | 2 | #include "CullingLogManager.h" |
---|
[59] | 3 | |
---|
[2280] | 4 | |
---|
[59] | 5 | namespace GtpVisibility { |
---|
| 6 | |
---|
| 7 | //----------------------------------------------------------------------- |
---|
| 8 | void FrustumCullingManager::RenderScene() |
---|
[2280] | 9 | { |
---|
[2292] | 10 | if (0) CullingLogManager::GetSingleton()->LogMessage("vfc"); |
---|
[2289] | 11 | |
---|
[74] | 12 | while (!mHierarchyInterface->GetQueue()->empty()) |
---|
[2289] | 13 | { |
---|
[59] | 14 | HierarchyNode *node = mHierarchyInterface->GetQueue()->top(); |
---|
| 15 | mHierarchyInterface->GetQueue()->pop(); |
---|
[726] | 16 | |
---|
[59] | 17 | // interesting for visualization purpose |
---|
| 18 | mHierarchyInterface->SetNodeVisible(node, false); |
---|
| 19 | mHierarchyInterface->SetLastVisited(node, mHierarchyInterface->GetFrameId()); |
---|
| 20 | |
---|
[74] | 21 | if (!mHierarchyInterface->CheckFrustumVisible(node)) |
---|
[147] | 22 | { |
---|
| 23 | ++ mNumFrustumCulledNodes; |
---|
[113] | 24 | |
---|
[115] | 25 | if (mVisualizeCulledNodes) |
---|
[113] | 26 | { |
---|
| 27 | mHierarchyInterface->VisualizeCulledNode(node, FRUSTUM_CULLED); |
---|
| 28 | } |
---|
[59] | 29 | } |
---|
[74] | 30 | else |
---|
[259] | 31 | { |
---|
[74] | 32 | mHierarchyInterface->SetNodeVisible(node, true); |
---|
[158] | 33 | mHierarchyInterface->TraverseNode(node); |
---|
[59] | 34 | } |
---|
| 35 | } |
---|
| 36 | } |
---|
| 37 | } // namespace GtpVisibility |
---|
Note: See
TracBrowser
for help on using the repository browser.