Ignore:
Timestamp:
06/20/05 08:13:57 (19 years ago)
Author:
mattausch
Message:

fixed bug with tight octree boxes
added more flexible renderqueue (can delete per flag)
reordered functions in visibility terrain scene manager

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/work/ogre_changes/Plugins/OctreeSceneManager/src/OgreOctree.cpp

    r135 r139  
    3636#include <OgreOctree.h> 
    3737#include <OgreOctreeNode.h> 
     38#include <OgreLogManager.h> 
    3839 
    3940namespace Ogre 
     
    109110                mDepth = 0; 
    110111 
     112        _updateBounds(); 
    111113#endif //GTP_VISIBILITY_MODIFIED_OGRE 
    112114    mNumNodes = 0; 
     
    175177        //mWireBoundingBox->setupBoundingBox(mBox); 
    176178        mWireBoundingBox->setupBoundingBox(mWorldAABB); 
     179 
    177180    return mWireBoundingBox; 
    178181} 
     
    229232        // Reset bounds first 
    230233    mWorldAABB.setNull(); 
    231  
     234   
    232235    // Update bounds from own attached objects 
    233236        NodeList::iterator it, it_end; 
     
    247250            for (int k = 0; k < 2; ++k) 
    248251            { 
    249                 if (mChildren[i][j][k] != 0) 
     252                if (mChildren[i][j][k]) 
    250253                                { 
    251254                                        mWorldAABB.merge(mChildren[i][j][k]->_getWorldAABB()); 
     
    254257        } 
    255258        } 
     259        // HACK: clamp to bounds 
     260        AxisAlignedBox box; 
     261        _getCullBounds(&box); 
     262        mWorldAABB = mWorldAABB.intersection(box);  
     263         
     264        //std::stringstream d; d << "updating box: " << mWorldAABB << ", depth: " << mDepth << "null: " << mBox.isNull(); 
     265        //LogManager::getSingleton().logMessage(d.str()); 
     266 
    256267        // recursively update parent bounds 
    257268        if (mParent) 
Note: See TracChangeset for help on using the changeset viewer.