Changeset 2454 for OGRE/trunk/ogre_changes/Ogre1.2
- Timestamp:
- 06/14/07 17:23:12 (17 years ago)
- Location:
- OGRE/trunk/ogre_changes/Ogre1.2/PlugIns/OctreeSceneManager
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
OGRE/trunk/ogre_changes/Ogre1.2/PlugIns/OctreeSceneManager/include/OgreOctree.h
r2308 r2454 201 201 void _updateBounds(); 202 202 203 void _incNumChildren();204 203 /** Sets fully visible attribute. 204 */ 205 205 void setOctreeFullyVisible(bool visible); 206 206 207 float getVisibilityRatio(); 208 209 void setNumVisibleLeaves(int leaves); 210 int getNumVisibleLeaves(); 211 212 void setNumLeaves(int leaves); 213 int getNumLeaves(); 207 /** Sets #frames this node is assumed to be visible. 208 */ 209 void setAssumedVisible(int assumedVisible); 210 /** See set 211 */ 212 int getAssumedVisible(); 213 /** Decreases #frames this node is assumed to be visible. 214 */ 215 void decAssumedVisible(); 214 216 215 217 protected: … … 223 225 224 226 bool mFullyVisible; 225 226 int mNumVisibleLeaves; 227 int mNumLeaves; 227 int mAssumedVisible; 228 228 #endif // GTP_VISIBILITY_MODIFIED_OGRE 229 229 }; -
OGRE/trunk/ogre_changes/Ogre1.2/PlugIns/OctreeSceneManager/src/OgreOctree.cpp
r2308 r2454 88 88 #ifdef GTP_VISIBILITY_MODIFIED_OGRE 89 89 , mLastVisited(0), mVisible(false), mLastRendered(-1) 90 , mNumLeaves(1), mNumVisibleLeaves(0)91 90 , mFullyVisible(false) 91 , mAssumedVisible(0) 92 92 #endif //GTP_VISIBILITY_MODIFIED_OGRE 93 93 { … … 105 105 106 106 mParent = parent; 107 108 107 mNumNodes = 0; 109 110 #ifdef GTP_VISIBILITY_MODIFIED_OGRE111 // recursively update number of children112 if (0) _incNumChildren();113 #endif;114 108 } 115 109 … … 228 222 #endif 229 223 } 230 //----------------------------------------------------------------------- 231 float Octree::getVisibilityRatio() 232 { 233 // all childrens are visible 234 return (float)mNumVisibleLeaves / (float)mNumLeaves; 235 } 236 //----------------------------------------------------------------------- 237 void Octree::setNumVisibleLeaves(int leaves) 238 { 239 int mNumVisibleLeaves = leaves; 240 } 241 //----------------------------------------------------------------------- 242 int Octree::getNumVisibleLeaves() 243 { 244 return mNumVisibleLeaves; 245 } 246 //----------------------------------------------------------------------- 247 void Octree::setNumLeaves(int leaves) 248 { 249 mNumLeaves = leaves; 250 } 251 //----------------------------------------------------------------------- 252 int Octree::getNumLeaves() 253 { 254 return mNumLeaves; 224 //----------------------------------------------------------------------- 225 void Octree::setAssumedVisible(int assumedVisible) 226 { 227 mAssumedVisible = assumedVisible; 228 } 229 //----------------------------------------------------------------------- 230 int Octree::getAssumedVisible() 231 { 232 return mAssumedVisible; 233 } 234 //----------------------------------------------------------------------- 235 void Octree::decAssumedVisible() 236 { 237 -- mAssumedVisible; 255 238 } 256 239 //----------------------------------------------------------------------- … … 308 291 309 292 310 void Octree::_incNumChildren()311 {312 /* ++ mNumChildren;313 314 if (mParent)315 {316 mParent->_incNumChildren();317 }*/318 }319 320 293 #endif //GTP_VISIBILITY_MODIFIED_OGRE 321 294 }
Note: See TracChangeset
for help on using the changeset viewer.