source: GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreKdTreeHierarchyInterface.cpp @ 1170

Revision 1170, 2.7 KB checked in by szydlowski, 18 years ago (diff)

continued work on the hierarchy interface

Line 
1/*
2-----------------------------------------------------------------------------
3This source file is part of the GameTools Project
4http://www.gametools.org
5
6Author: Martin Szydlowski
7-----------------------------------------------------------------------------
8*/
9
10#include "OgreKdTreeSceneManager.h"
11#include "OgreKdTreeHierarchyInterface.h"
12
13namespace Ogre
14{
15
16KdTreeHierarchyInterface::KdTreeHierarchyInterface(KdTreeSceneManager *sm, RenderSystem *rsys):
17PlatformHierarchyInterface(sm, rsys)
18{
19
20}
21
22bool KdTreeHierarchyInterface::IsLeaf(GtpVisibility::HierarchyNode *node) const
23{
24        return KDNODEPTR_CAST(node)->isLeaf();
25}
26
27void KdTreeHierarchyInterface::TraverseNode(GtpVisibility::HierarchyNode *node)
28{
29        ++ mNumTraversedNodes;
30
31        KdTree::Node * kdnode = KDNODEPTR_CAST(node);
32
33        // if the node is a leaf and has geometry => render it
34        if (kdnode->isLeaf())
35        {
36                if (!kdnode->isEmpty())
37                {
38                        RenderNode(node);
39                }
40        }
41        else
42        {
43                KdTree::Branch * kdbranch = KDBRANCHPTR_CAST(node);
44                if (kdbranch->mLeft)
45                        mDistanceQueue->push(kdbranch->mLeft);
46                if (kdbranch->mRight)
47                        mDistanceQueue->push(kdbranch->mRight);
48        }
49}
50
51void KdTreeHierarchyInterface::RenderNode(GtpVisibility::HierarchyNode *node)
52{
53        /*** TODO ***/
54}
55
56void KdTreeHierarchyInterface::PullUpVisibility(GtpVisibility::HierarchyNode *node) const
57{
58        /*** TODO ***/
59}
60
61float KdTreeHierarchyInterface::GetSquaredDistance(GtpVisibility::HierarchyNode *node) const
62{
63        /*** TODO ***/
64        return 0.0;
65}
66
67AxisAlignedBox * KdTreeHierarchyInterface::GetBoundingBox(GtpVisibility::HierarchyNode *node)
68{
69        /*** TODO ***/
70        return new AxisAlignedBox();
71}
72
73bool KdTreeHierarchyInterface::HasGeometry(GtpVisibility::HierarchyNode *node) const
74{
75        return KDNODEPTR_CAST(node)->hasGeometry();
76}
77
78void KdTreeHierarchyInterface::SetNodeVisible(GtpVisibility::HierarchyNode *node, const bool visible) const
79{
80        /*** TODO ***/
81}
82
83bool KdTreeHierarchyInterface::IsNodeVisible(GtpVisibility::HierarchyNode *node) const
84{
85        /*** TODO ***/
86        return true;
87}
88
89void KdTreeHierarchyInterface::SetLastVisited(GtpVisibility::HierarchyNode *node, const unsigned int frameId) const
90{
91        /*** TODO ***/
92}
93
94unsigned int KdTreeHierarchyInterface::LastVisited(GtpVisibility::HierarchyNode *node) const
95{
96        /*** TODO ***/
97        return 0;
98}
99
100void KdTreeHierarchyInterface::VisualizeCulledNode(GtpVisibility::HierarchyNode *node,
101                                                                                                   GtpVisibility::CullingType type) const
102{
103        /*** TODO ***/
104}
105
106void KdTreeHierarchyInterface::GetNodeGeometryList(GtpVisibility::HierarchyNode *node,
107                                                                                                   GtpVisibility::GeometryVector *geometryList,
108                                                                                                   bool includeChildren)
109{
110        /*** TODO ***/
111}
112
113} // namespace Ogre
Note: See TracBrowser for help on using the repository browser.