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

Revision 59, 1.3 KB checked in by mattausch, 20 years ago (diff)

completely changed file structure plus software design

Line 
1#include "HierarchyInterface.h"
2
3//#include <windows.h>
4
5namespace GtpVisibility {
6
7//-----------------------------------------------------------------------
8HierarchyInterface::HierarchyInterface():
9mFrameId(1), mNumSceneNodes(0), mNumTraversedNodes(0),
10mNumRenderedNodes(0), mSceneRoot(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 = 0;
28        mNumTraversedNodes = 0;
29        mNumRenderedNodes = 0;
30
31        SetSceneRoot(root);
32        mDistanceQueue->push(mSceneRoot);
33}
34//-----------------------------------------------------------------------
35int HierarchyInterface::GetFrameId()
36{
37        return mFrameId;
38}
39//-----------------------------------------------------------------------
40DistanceQueue *HierarchyInterface::GetQueue()
41{
42        return mDistanceQueue;
43}
44} // namespace GtpVisibility
Note: See TracBrowser for help on using the repository browser.