source: GTP/trunk/Lib/Vis/OnlineCullingCHC/src/FrustumCullingManager.cpp @ 2555

Revision 2555, 999 bytes checked in by mattausch, 17 years ago (diff)

added partial implementation of chc++. problem: bounding box rendering in Ogre is VERY slow

RevLine 
[59]1#include "FrustumCullingManager.h"
[2289]2#include "CullingLogManager.h"
[59]3
[2280]4
[59]5namespace GtpVisibility {
6
7//-----------------------------------------------------------------------
8void 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);
[2555]33                        mHierarchyInterface->TraverseNode2(node);
[59]34                }
35        }
[2555]36        mHierarchyInterface->RenderQueue();
[59]37}
38} // namespace GtpVisibility
Note: See TracBrowser for help on using the repository browser.