Ignore:
Timestamp:
06/14/07 17:23:12 (17 years ago)
Author:
mattausch
Message:
 
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  
    201201        void _updateBounds(); 
    202202 
    203         void _incNumChildren(); 
    204  
     203        /** Sets fully visible attribute. 
     204        */ 
    205205        void setOctreeFullyVisible(bool visible); 
    206206 
    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(); 
    214216 
    215217protected: 
     
    223225 
    224226        bool mFullyVisible; 
    225  
    226         int mNumVisibleLeaves; 
    227         int mNumLeaves; 
     227        int mAssumedVisible; 
    228228#endif // GTP_VISIBILITY_MODIFIED_OGRE 
    229229}; 
  • OGRE/trunk/ogre_changes/Ogre1.2/PlugIns/OctreeSceneManager/src/OgreOctree.cpp

    r2308 r2454  
    8888#ifdef GTP_VISIBILITY_MODIFIED_OGRE 
    8989        , mLastVisited(0), mVisible(false), mLastRendered(-1) 
    90         , mNumLeaves(1), mNumVisibleLeaves(0) 
    9190        , mFullyVisible(false) 
     91        , mAssumedVisible(0) 
    9292#endif //GTP_VISIBILITY_MODIFIED_OGRE 
    9393{ 
     
    105105 
    106106    mParent = parent; 
    107  
    108107    mNumNodes = 0; 
    109  
    110 #ifdef GTP_VISIBILITY_MODIFIED_OGRE 
    111         // recursively update number of children 
    112         if (0) _incNumChildren(); 
    113 #endif; 
    114108} 
    115109 
     
    228222#endif 
    229223} 
    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//----------------------------------------------------------------------- 
     225void Octree::setAssumedVisible(int assumedVisible) 
     226{ 
     227        mAssumedVisible = assumedVisible; 
     228} 
     229//----------------------------------------------------------------------- 
     230int Octree::getAssumedVisible() 
     231{ 
     232        return mAssumedVisible; 
     233} 
     234//----------------------------------------------------------------------- 
     235void Octree::decAssumedVisible() 
     236{ 
     237        -- mAssumedVisible; 
    255238} 
    256239//----------------------------------------------------------------------- 
     
    308291 
    309292 
    310 void Octree::_incNumChildren() 
    311 { 
    312 /*      ++ mNumChildren; 
    313  
    314         if (mParent)     
    315         { 
    316                 mParent->_incNumChildren(); 
    317         }*/ 
    318 } 
    319  
    320293#endif //GTP_VISIBILITY_MODIFIED_OGRE 
    321294} 
Note: See TracChangeset for help on using the changeset viewer.