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

Revision 85, 880 bytes checked in by mattausch, 20 years ago (diff)

corrected bug so chc is much faster than stop and wait

RevLine 
[59]1#include "FrustumCullingManager.h"
[85]2//#include <windows.h>
[59]3
4namespace GtpVisibility {
5
6//-----------------------------------------------------------------------
7void FrustumCullingManager::RenderScene()
8{
9        mNumFrustumCulledNodes = mNumQueryCulledNodes = 0;
[85]10        //OutputDebugString("Frustum Culling\n");
11
[74]12        while (!mHierarchyInterface->GetQueue()->empty())
[59]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
[74]21                if (!mHierarchyInterface->CheckFrustumVisible(node))
[59]22                {
23                        mNumFrustumCulledNodes ++;
24                }
[74]25                else
26                {               
27                        mHierarchyInterface->SetNodeVisible(node, true);
[59]28                        mHierarchyInterface->TraverseNode(node);
29                }
30        }
31}
32
33} // namespace GtpVisibility
Note: See TracBrowser for help on using the repository browser.