source: trunk/VUT/GtpVisibility/src/HierarchyInterface.cpp @ 74

Revision 74, 2.0 KB checked in by mattausch, 20 years ago (diff)

added support for release mode

Line 
1#include "HierarchyInterface.h"
2
3#include <windows.h>
4
5namespace GtpVisibility {
6
7//-----------------------------------------------------------------------
8HierarchyInterface::HierarchyInterface():
9mFrameId(0), mNumTraversedNodes(0), mNumRenderedNodes(0),
10mSceneRoot(0), mCurrentTestIdx(0)
11{       
12        mDistanceQueue = new DistanceQueue(GreaterDistance<HierarchyNode *>(this));
13}
14//-----------------------------------------------------------------------
15HierarchyInterface::~HierarchyInterface()
16{               
17        delete mDistanceQueue;
18}
19//-----------------------------------------------------------------------
20void HierarchyInterface::SetSceneRoot(HierarchyNode *root)
21{
22        mSceneRoot = root;
23}
24//-----------------------------------------------------------------------
25void HierarchyInterface::InitFrame(HierarchyNode *root)
26{
27        mFrameId ++;
28        mNumTraversedNodes = 0;
29        mNumRenderedNodes = 0;
30
31        SetSceneRoot(root);
32        mDistanceQueue->push(mSceneRoot);
33}
34//-----------------------------------------------------------------------
35unsigned int HierarchyInterface::GetFrameId() const
36{
37        return mFrameId;
38}
39//-----------------------------------------------------------------------
40DistanceQueue *HierarchyInterface::GetQueue()
41{
42        return mDistanceQueue;
43}
44//-----------------------------------------------------------------------
45bool HierarchyInterface::CheckFrustumVisible(HierarchyNode *node)
46{
47        bool intersects = false;
48        return CheckFrustumVisible(node, intersects);
49}
50//-----------------------------------------------------------------------
51HierarchyNode *HierarchyInterface::GetSceneRoot() const
52{
53        return mSceneRoot;
54}
55//-----------------------------------------------------------------------
56unsigned int HierarchyInterface::GetNumTraversedNodes()
57{
58        return mNumTraversedNodes;
59}
60//-----------------------------------------------------------------------
61unsigned int HierarchyInterface::GetNumRenderedNodes()
62{
63        return mNumRenderedNodes;
64}
65} // namespace GtpVisibility
Note: See TracBrowser for help on using the repository browser.