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