Changeset 345 for trunk/VUT/Ogre/src/OgreOctreeHierarchyInterface.cpp
- Timestamp:
- 10/21/05 19:53:30 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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();
Note: See TracChangeset
for help on using the changeset viewer.