Changeset 345 for trunk/VUT/Ogre
- Timestamp:
- 10/21/05 19:53:30 (19 years ago)
- Location:
- trunk/VUT/Ogre
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/Ogre/include/OgreBspHierarchyInterface.h
r158 r345 19 19 //bool getOption( const String &, void * ); 20 20 //bool getOptionKeys( StringVector &refKeys ); 21 void PullUpVisibility(GtpVisibility::HierarchyNode *node) ;21 void PullUpVisibility(GtpVisibility::HierarchyNode *node) const; 22 22 /** Traverses given node. 23 23 @param node current node … … 30 30 float GetSquaredDistance(GtpVisibility::HierarchyNode *node) const; 31 31 32 void SetNodeVisible(GtpVisibility::HierarchyNode *node, const bool visible) ;32 void SetNodeVisible(GtpVisibility::HierarchyNode *node, const bool visible) const; 33 33 void SetLastVisited(GtpVisibility::HierarchyNode *node, 34 const unsigned int frameId) ;34 const unsigned int frameId) const; 35 35 36 36 bool IsNodeVisible(GtpVisibility::HierarchyNode *node) const; -
trunk/VUT/Ogre/include/OgreOctreeHierarchyInterface.h
r174 r345 25 25 See setOption 26 26 */ 27 void PullUpVisibility(GtpVisibility::HierarchyNode *node) ;27 void PullUpVisibility(GtpVisibility::HierarchyNode *node) const; 28 28 29 29 /** Traverses and renders the given node. … … 38 38 float GetSquaredDistance(GtpVisibility::HierarchyNode *node) const; 39 39 40 void SetNodeVisible(GtpVisibility::HierarchyNode *node, const bool visible) ;41 void SetLastVisited(GtpVisibility::HierarchyNode *node, const unsigned int frameId) ;40 void SetNodeVisible(GtpVisibility::HierarchyNode *node, const bool visible) const; 41 void SetLastVisited(GtpVisibility::HierarchyNode *node, const unsigned int frameId) const; 42 42 43 43 bool IsNodeVisible(GtpVisibility::HierarchyNode *node) const; … … 45 45 46 46 void VisualizeCulledNode(GtpVisibility::HierarchyNode *node, 47 GtpVisibility::CullingType type) ;47 GtpVisibility::CullingType type) const; 48 48 49 49 void GetNodeGeometryList(GtpVisibility::HierarchyNode *node, -
trunk/VUT/Ogre/include/OgreSceneNodeHierarchyInterface.h
r158 r345 26 26 void TraverseNode(GtpVisibility::HierarchyNode *node); 27 27 void RenderNode(GtpVisibility::HierarchyNode *node); 28 void PullUpVisibility(GtpVisibility::HierarchyNode *node) ;28 void PullUpVisibility(GtpVisibility::HierarchyNode *node) const; 29 29 bool HasGeometry(GtpVisibility::HierarchyNode *node) const; 30 30 float GetSquaredDistance(GtpVisibility::HierarchyNode *node) const; 31 31 32 void SetNodeVisible(GtpVisibility::HierarchyNode *node, const bool visible) ;32 void SetNodeVisible(GtpVisibility::HierarchyNode *node, const bool visible) const; 33 33 void SetLastVisited(GtpVisibility::HierarchyNode *node, 34 const unsigned int frameId) ;34 const unsigned int frameId) const; 35 35 36 36 bool IsNodeVisible(GtpVisibility::HierarchyNode *node) const; … … 40 40 41 41 void VisualizeCulledNode(GtpVisibility::HierarchyNode *node, 42 GtpVisibility::CullingType type) ;42 GtpVisibility::CullingType type) const; 43 43 44 44 void GetNodeGeometryList(GtpVisibility::HierarchyNode *node, -
trunk/VUT/Ogre/src/OgreBspHierarchyInterface.cpp
r158 r345 32 32 //----------------------------------------------------------------------- 33 33 void BspHierarchyInterface::SetNodeVisible(GtpVisibility::HierarchyNode *node, 34 const bool visible) 34 const bool visible) const 35 35 { 36 36 } 37 37 //----------------------------------------------------------------------- 38 38 void BspHierarchyInterface::SetLastVisited(GtpVisibility::HierarchyNode *node, 39 const unsigned int frameId) 39 const unsigned int frameId) const 40 40 { 41 41 } 42 42 //----------------------------------------------------------------------- 43 void BspHierarchyInterface::PullUpVisibility(GtpVisibility::HierarchyNode *node) 43 void BspHierarchyInterface::PullUpVisibility(GtpVisibility::HierarchyNode *node) const 44 44 { 45 45 } -
trunk/VUT/Ogre/src/OgreOctreeHierarchyInterface.cpp
r343 r345 33 33 Octree *nextChild = 34 34 octree->mChildren[(i & 4) >> 2][(i & 2) >> 1][i & 1]; 35 35 36 36 if (nextChild) 37 37 { 38 std::stringstream d2; d2 << "pushing node " << nextChild; 39 Ogre::LogManager::getSingleton().logMessage(d2.str()); 38 40 mDistanceQueue->push(nextChild); 39 41 } … … 57 59 { 58 60 AxisAlignedBox *box = &static_cast<Octree *>(node)->mBox; 59 Vector3 mid= ((box->getMaximum() - box->getMinimum()) * 0.5) + box->getMinimum();60 61 return (mCullCamera->getDerivedPosition() - mid).squaredLength();61 Vector3 pos = ((box->getMaximum() - box->getMinimum()) * 0.5) + box->getMinimum(); 62 63 return (mCullCamera->getDerivedPosition() - pos).squaredLength(); 62 64 } 63 65 //----------------------------------------------------------------------- 64 66 void OctreeHierarchyInterface::SetNodeVisible(GtpVisibility::HierarchyNode *node, 65 const bool visible) 67 const bool visible) const 66 68 { 67 69 #ifdef GTP_VISIBILITY_MODIFIED_OGRE … … 71 73 //----------------------------------------------------------------------- 72 74 void OctreeHierarchyInterface::SetLastVisited(GtpVisibility::HierarchyNode *node, 73 const unsigned int frameId) 75 const unsigned int frameId) const 74 76 { 75 77 #ifdef GTP_VISIBILITY_MODIFIED_OGRE … … 78 80 } 79 81 //----------------------------------------------------------------------- 80 void OctreeHierarchyInterface::PullUpVisibility(GtpVisibility::HierarchyNode *node) 82 void OctreeHierarchyInterface::PullUpVisibility(GtpVisibility::HierarchyNode *node) const 81 83 { 82 84 #ifdef GTP_VISIBILITY_MODIFIED_OGRE … … 140 142 //----------------------------------------------------------------------- 141 143 void OctreeHierarchyInterface::VisualizeCulledNode(GtpVisibility::HierarchyNode *node, 142 GtpVisibility::CullingType type) 144 GtpVisibility::CullingType type) const 143 145 { 144 146 WireBoundingBox *box = static_cast<Octree *>(node)->getWireBoundingBox(); -
trunk/VUT/Ogre/src/OgreSceneNodeHierarchyInterface.cpp
r174 r345 62 62 } 63 63 //----------------------------------------------------------------------- 64 void SceneNodeHierarchyInterface::PullUpVisibility(GtpVisibility::HierarchyNode *node) 64 void SceneNodeHierarchyInterface::PullUpVisibility(GtpVisibility::HierarchyNode *node) const 65 65 { 66 66 #ifdef GTP_VISIBILITY_MODIFIED_OGRE … … 81 81 //----------------------------------------------------------------------- 82 82 void SceneNodeHierarchyInterface::SetNodeVisible(GtpVisibility::HierarchyNode *node, 83 const bool visible) 83 const bool visible) const 84 84 { 85 85 #ifdef GTP_VISIBILITY_MODIFIED_OGRE … … 90 90 //----------------------------------------------------------------------- 91 91 void SceneNodeHierarchyInterface::SetLastVisited(GtpVisibility::HierarchyNode *node, 92 const unsigned int frameId) 92 const unsigned int frameId) const 93 93 { 94 94 #ifdef GTP_VISIBILITY_MODIFIED_OGRE … … 131 131 //----------------------------------------------------------------------- 132 132 void SceneNodeHierarchyInterface::VisualizeCulledNode(GtpVisibility::HierarchyNode *node, 133 GtpVisibility::CullingType type) 133 GtpVisibility::CullingType type) const 134 134 { 135 135 // TODO
Note: See TracChangeset
for help on using the changeset viewer.