source: trunk/VUT/GtpVisibility/src/FrustumCullingManager.cpp @ 139

Revision 139, 939 bytes checked in by mattausch, 19 years ago (diff)

fixed bug with tight octree boxes
added more flexible renderqueue (can delete per flag)
reordered functions in visibility terrain scene manager

Line 
1#include "FrustumCullingManager.h"
2#include <OgreLogManager.h>
3
4namespace GtpVisibility {
5
6//-----------------------------------------------------------------------
7void 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                {//if (mHierarchyInterface->mIsShadowPass)
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.