- Timestamp:
- 07/28/06 17:06:01 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreKdTreeHierarchyInterface.cpp
r1165 r1170 15 15 16 16 KdTreeHierarchyInterface::KdTreeHierarchyInterface(KdTreeSceneManager *sm, RenderSystem *rsys): 17 SceneNodeHierarchyInterface(sm, rsys)17 PlatformHierarchyInterface(sm, rsys) 18 18 { 19 19 … … 22 22 bool KdTreeHierarchyInterface::IsLeaf(GtpVisibility::HierarchyNode *node) const 23 23 { 24 KdTree::Node * kdnode = static_cast<KdTree::Node *>(node); 25 return kdnode->isLeaf(); 24 return KDNODEPTR_CAST(node)->isLeaf(); 26 25 } 27 26 27 void KdTreeHierarchyInterface::TraverseNode(GtpVisibility::HierarchyNode *node) 28 { 29 ++ mNumTraversedNodes; 28 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 } 29 49 } 50 51 void KdTreeHierarchyInterface::RenderNode(GtpVisibility::HierarchyNode *node) 52 { 53 /*** TODO ***/ 54 } 55 56 void KdTreeHierarchyInterface::PullUpVisibility(GtpVisibility::HierarchyNode *node) const 57 { 58 /*** TODO ***/ 59 } 60 61 float KdTreeHierarchyInterface::GetSquaredDistance(GtpVisibility::HierarchyNode *node) const 62 { 63 /*** TODO ***/ 64 return 0.0; 65 } 66 67 AxisAlignedBox * KdTreeHierarchyInterface::GetBoundingBox(GtpVisibility::HierarchyNode *node) 68 { 69 /*** TODO ***/ 70 return new AxisAlignedBox(); 71 } 72 73 bool KdTreeHierarchyInterface::HasGeometry(GtpVisibility::HierarchyNode *node) const 74 { 75 return KDNODEPTR_CAST(node)->hasGeometry(); 76 } 77 78 void KdTreeHierarchyInterface::SetNodeVisible(GtpVisibility::HierarchyNode *node, const bool visible) const 79 { 80 /*** TODO ***/ 81 } 82 83 bool KdTreeHierarchyInterface::IsNodeVisible(GtpVisibility::HierarchyNode *node) const 84 { 85 /*** TODO ***/ 86 return true; 87 } 88 89 void KdTreeHierarchyInterface::SetLastVisited(GtpVisibility::HierarchyNode *node, const unsigned int frameId) const 90 { 91 /*** TODO ***/ 92 } 93 94 unsigned int KdTreeHierarchyInterface::LastVisited(GtpVisibility::HierarchyNode *node) const 95 { 96 /*** TODO ***/ 97 return 0; 98 } 99 100 void KdTreeHierarchyInterface::VisualizeCulledNode(GtpVisibility::HierarchyNode *node, 101 GtpVisibility::CullingType type) const 102 { 103 /*** TODO ***/ 104 } 105 106 void KdTreeHierarchyInterface::GetNodeGeometryList(GtpVisibility::HierarchyNode *node, 107 GtpVisibility::GeometryVector *geometryList, 108 bool includeChildren) 109 { 110 /*** TODO ***/ 111 } 112 113 } // namespace Ogre
Note: See TracChangeset
for help on using the changeset viewer.