Revision 158,
898 bytes
checked in by mattausch, 19 years ago
(diff) |
removed node visibility for item buffer
|
Line | |
---|
1 | #include "FrustumCullingManager.h" |
---|
2 | #include <OgreLogManager.h> |
---|
3 | |
---|
4 | namespace GtpVisibility { |
---|
5 | |
---|
6 | //----------------------------------------------------------------------- |
---|
7 | void FrustumCullingManager::RenderScene() |
---|
8 | { |
---|
9 | while (!mHierarchyInterface->GetQueue()->empty()) |
---|
10 | { |
---|
11 | HierarchyNode *node = mHierarchyInterface->GetQueue()->top(); |
---|
12 | mHierarchyInterface->GetQueue()->pop(); |
---|
13 | |
---|
14 | // interesting for visualization purpose |
---|
15 | mHierarchyInterface->SetNodeVisible(node, false); |
---|
16 | mHierarchyInterface->SetLastVisited(node, mHierarchyInterface->GetFrameId()); |
---|
17 | |
---|
18 | if (!mHierarchyInterface->CheckFrustumVisible(node)) |
---|
19 | { |
---|
20 | ++ mNumFrustumCulledNodes; |
---|
21 | |
---|
22 | if (mVisualizeCulledNodes) |
---|
23 | { |
---|
24 | mHierarchyInterface->VisualizeCulledNode(node, FRUSTUM_CULLED); |
---|
25 | } |
---|
26 | } |
---|
27 | else |
---|
28 | { |
---|
29 | mHierarchyInterface->SetNodeVisible(node, true); |
---|
30 | mHierarchyInterface->TraverseNode(node); |
---|
31 | } |
---|
32 | } |
---|
33 | } |
---|
34 | |
---|
35 | } // namespace GtpVisibility |
---|
Note: See
TracBrowser
for help on using the repository browser.