Ignore:
Timestamp:
04/13/05 09:37:20 (20 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/OcclusionCullingSceneManager/src/OgreOcclusionCullingOctreeSceneTraverser.cpp

    r45 r48  
    11#include "OgreOcclusionCullingOctreeSceneTraverser.h" 
    2 #include "OgreOcclusionCullingTerrainSceneManager.h" 
     2#include "OgreOcclusionCullingOctreeSceneManager.h" 
    33#include "OgreHardwareOcclusionQuery.h" 
    44 
     
    77namespace Ogre { 
    88        //----------------------------------------------------------------------- 
    9         OcclusionCullingTerrainSceneTraverser::OcclusionCullingTerrainSceneTraverser(SceneManager *sm, RenderSystem *rsys):  
     9        OcclusionCullingOctreeSceneTraverser::OcclusionCullingOctreeSceneTraverser(SceneManager *sm, RenderSystem *rsys):  
    1010        OcclusionCullingSceneTraverser(sm, rsys), mOctreeSceneRoot(0), mOctreeDistanceQueue(0) 
    1111        { 
    1212        } 
    1313        //----------------------------------------------------------------------- 
    14         OcclusionCullingTerrainSceneTraverser::~OcclusionCullingTerrainSceneTraverser() 
     14        OcclusionCullingOctreeSceneTraverser::~OcclusionCullingOctreeSceneTraverser() 
    1515        {                
    1616                if(mOctreeDistanceQueue) 
     
    1818        } 
    1919        //----------------------------------------------------------------------- 
    20         void OcclusionCullingTerrainSceneTraverser::traverseOctant(Camera *cam, Octree *octant ) 
     20        void OcclusionCullingOctreeSceneTraverser::traverseOctant(Camera *cam, Octree *octant ) 
    2121        { 
    2222                mNumTraversedNodes ++; 
     
    3434        } 
    3535        //----------------------------------------------------------------------- 
    36         void OcclusionCullingTerrainSceneTraverser::renderCullFrustum(Camera *cam) 
     36        void OcclusionCullingOctreeSceneTraverser::renderCullFrustum(Camera *cam) 
    3737        { 
    3838                AxisAlignedBox box; 
     
    6363        //----------------------------------------------------------------------- 
    6464        /** Renders the scene with the hierarchical stop and wait algorithm. */ 
    65         void OcclusionCullingTerrainSceneTraverser::renderStopAndWait( Camera *cam ) 
     65        void OcclusionCullingOctreeSceneTraverser::renderStopAndWait( Camera *cam ) 
    6666        { 
    6767                AxisAlignedBox box; 
     
    114114        //----------------------------------------------------------------------- 
    115115        /** Renders the scene with the coherent hierarchical algorithm and the query queye. */ 
    116         void OcclusionCullingTerrainSceneTraverser::renderCoherentWithQueue( Camera *cam ) 
     116        void OcclusionCullingOctreeSceneTraverser::renderCoherentWithQueue( Camera *cam ) 
    117117        { 
    118118                OctreeQueryQueue queryQueue; 
     
    204204        } 
    205205        //----------------------------------------------------------------------- 
    206         void OcclusionCullingTerrainSceneTraverser::pullUpVisibility( Camera *cam, Octree *octant ) 
     206        void OcclusionCullingOctreeSceneTraverser::pullUpVisibility( Camera *cam, Octree *octant ) 
    207207        { 
    208208                while(octant && !octant->isOctreeVisible()) 
     
    216216        } 
    217217        //----------------------------------------------------------------------- 
    218         void OcclusionCullingTerrainSceneTraverser::renderOctant( Camera *cam, Octree *octant ) 
     218        void OcclusionCullingOctreeSceneTraverser::renderOctant( Camera *cam, Octree *octant ) 
    219219        { 
    220220                //if(octant->numNodes() > 0) 
     
    224224 
    225225                        octant->setLastRendered(octant->lastVisited()); 
    226                         ((OcclusionCullingTerrainSceneManager *)mSceneManager)->_renderOctant(cam, octant); 
     226                        ((OcclusionCullingOctreeSceneManager *)mSceneManager)->_renderOctant(cam, octant); 
    227227                } 
    228228                else OutputDebugString("already rendered"); 
    229229        } 
    230230        //----------------------------------------------------------------------- 
    231         void OcclusionCullingTerrainSceneTraverser::setSceneRoot(Octree *root) 
     231        void OcclusionCullingOctreeSceneTraverser::setSceneRoot(Octree *root) 
    232232        { 
    233233                mOctreeSceneRoot = root; 
    234234        } 
    235235        //----------------------------------------------------------------------- 
    236         void OcclusionCullingTerrainSceneTraverser::initDistanceQueue(Camera *cam) 
     236        void OcclusionCullingOctreeSceneTraverser::initDistanceQueue(Camera *cam) 
    237237        { 
    238238                if(mOctreeDistanceQueue) 
     
    243243        } 
    244244        //----------------------------------------------------------------------- 
    245         bool OcclusionCullingTerrainSceneTraverser::isLeaf(Octree *octant) 
     245        bool OcclusionCullingOctreeSceneTraverser::isLeaf(Octree *octant) 
    246246        { 
    247247                for(int i=0; i<8; i++) 
     
    254254        } 
    255255        //----------------------------------------------------------------------- 
    256         void OcclusionCullingTerrainSceneTraverser::setNumOctreeNodes(unsigned int num) 
     256        void OcclusionCullingOctreeSceneTraverser::setNumOctreeNodes(unsigned int num) 
    257257        { 
    258258                mNumOctreeNodes = num; 
    259259        } 
    260260        //----------------------------------------------------------------------- 
    261         bool OcclusionCullingTerrainSceneTraverser::getOption( const String & key, void *val ) 
     261        bool OcclusionCullingOctreeSceneTraverser::getOption( const String & key, void *val ) 
    262262        { 
    263263                if ( key == "NumOctreeNodes" ) 
     
    270270        } 
    271271        //----------------------------------------------------------------------- 
    272         bool OcclusionCullingTerrainSceneTraverser::getOptionKeys( StringVector & refKeys ) 
     272        bool OcclusionCullingOctreeSceneTraverser::getOptionKeys( StringVector & refKeys ) 
    273273        { 
    274274                refKeys.push_back( "NumOctreeNodes" ); 
Note: See TracChangeset for help on using the changeset viewer.