Ignore:
Timestamp:
04/13/05 09:37:20 (20 years ago)
Author:
mattausch
Message:
 
Location:
trunk/VUT/OcclusionCullingSceneManager
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/OcclusionCullingSceneManager/TestCullingDotScene/TestCullingDotScene.vcproj

    r37 r48  
    129129                </Filter> 
    130130                <Filter 
    131                         Name="Resource Files" 
    132                         Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" 
    133                         UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"> 
    134                 </Filter> 
    135                 <Filter 
    136131                        Name="tinyxml" 
    137132                        Filter=""> 
  • trunk/VUT/OcclusionCullingSceneManager/TestCullingTerrain/TestCullingTerrain.vcproj

    r47 r48  
    122122                        UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> 
    123123                        <File 
     124                                RelativePath=".\TerrainContentGenerator.cpp"> 
     125                        </File> 
     126                        <File 
    124127                                RelativePath=".\TestCullingTerrainApplication.cpp"> 
    125128                        </File> 
     
    130133                        UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> 
    131134                        <File 
     135                                RelativePath=".\TerrainContentGenerator.h"> 
     136                        </File> 
     137                        <File 
    132138                                RelativePath=".\TestCullingTerrainApplication.h"> 
    133139                        </File> 
    134                 </Filter> 
    135                 <Filter 
    136                         Name="Resource Files" 
    137                         Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" 
    138                         UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"> 
    139140                </Filter> 
    140141        </Files> 
  • trunk/VUT/OcclusionCullingSceneManager/TestCullingTerrain/TestCullingTerrainApplication.cpp

    r47 r48  
    11/** 
    22    \file  
    3         TestCullingApplication.cpp 
     3        TestCullingTerrainApplication.cpp 
    44    \brief 
    55        Tests the occlusion culling algorithm 
     
    1414 
    1515#include "Ogre.h" 
    16 #include "TestCullingApplication.h" 
     16#include "TestCullingTerrainApplication.h" 
    1717#include "OgreOcclusionCullingSceneTraverser.h" 
    1818 
     
    2323 
    2424/***********************************************/ 
    25 /* TestCullingApplication implementation       */ 
     25/* TestCullingTerrainApplication implementation       */ 
    2626/***********************************************/ 
    27 /*TestCullingApplication::~TestCullingApplication() 
     27/*TestCullingTerrainApplication::~TestCullingTerrainApplication() 
    2828{ 
    2929        delete mRaySceneQuery; 
    3030}*/ 
    3131//----------------------------------------------------------------------- 
    32 void TestCullingApplication::createCamera( void ) 
     32void TestCullingTerrainApplication::createCamera( void ) 
    3333{ 
    3434        // Create the camera 
     
    4444} 
    4545//----------------------------------------------------------------------- 
    46 void TestCullingApplication::createScene(void) 
     46void TestCullingTerrainApplication::createScene(void) 
    4747{ 
    4848        Plane waterPlane; 
     
    119119} 
    120120//----------------------------------------------------------------------- 
    121 void TestCullingApplication::setupGui( void ) 
     121void TestCullingTerrainApplication::setupGui( void ) 
    122122{ 
    123123         mGUIRenderer = new CEGUI::OgreCEGUIRenderer(mWindow, Ogre::RENDER_QUEUE_OVERLAY, false, 3000, ST_EXTERIOR_CLOSE); 
     
    133133} 
    134134//----------------------------------------------------------------------- 
    135 void TestCullingApplication::createFrameListener(void) 
     135void TestCullingTerrainApplication::createFrameListener(void) 
    136136{ 
    137137        mFrameListener= new MouseQueryListener(mWindow, mCamera, mSceneMgr, mGUIRenderer); 
     
    140140} 
    141141//----------------------------------------------------------------------- 
    142 void TestCullingApplication::chooseSceneManager(void) 
     142void TestCullingTerrainApplication::chooseSceneManager(void) 
    143143{ 
    144144    //mSceneMgr = mRoot->getSceneManager(ST_GENERIC); 
     
    395395{ 
    396396    // Create application object 
    397     TestCullingApplication app; 
     397    TestCullingTerrainApplication app; 
    398398 
    399399        try  
  • trunk/VUT/OcclusionCullingSceneManager/TestCullingTerrain/TestCullingTerrainApplication.h

    r47 r48  
    11/** 
    22    \file  
    3         TestCullingApplication.h 
     3        TestCullingTerrainApplication.h 
    44*/ 
    55#include "CEGUIForwardRefs.h" 
     
    8686 
    8787 
    88 class TestCullingApplication : public ExampleApplication 
     88class TestCullingTerrainApplication : public ExampleApplication 
    8989{ 
    9090public: 
    91         //~TestCullingApplication(); 
     91        //~TestCullingTerrainApplication(); 
    9292 
    9393protected: 
  • trunk/VUT/OcclusionCullingSceneManager/include/OgreOcclusionCullingOctreeSceneManager.h

    r46 r48  
    1 #ifndef _OcclusionCullingTerrainSceneManager_H__ 
    2 #define _OcclusionCullingTerrainSceneManager_H__ 
     1#ifndef _OcclusionCullingOctreeSceneManager_H__ 
     2#define _OcclusionCullingOctreeSceneManager_H__ 
    33 
    44#include <OgreSceneNode.h> 
    55#include <OgreOctreeSceneManager.h> 
    6 #include <OgreTerrainSceneManager.h> 
    7 #include <OgreOctreeSceneQuery.h> 
    86#include <OgreOctreeNode.h> 
    97#include <OgreOctreeCamera.h> 
     
    119#include "OgrePrerequisites.h" 
    1210#include "OgreOcclusionCullingOctreeSceneTraverser.h" 
    13 //#include "OgreSolidHalfBoundingBox.h" 
    1411 
    1512using namespace std; 
  • trunk/VUT/OcclusionCullingSceneManager/include/OgreOcclusionCullingTerrainSceneManager.h

    r45 r48  
    1010 
    1111#include "OgrePrerequisites.h" 
    12 #include "OgreOcclusionCullinOctreeSceneTraverser.h" 
    13 //#include "OgreSolidHalfBoundingBox.h" 
     12#include "OgreOcclusionCullingOctreeSceneTraverser.h" 
    1413 
    1514using namespace std; 
  • 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" ); 
  • trunk/VUT/OcclusionCullingSceneManager/src/OgreOcclusionCullingSceneManagerDll.cpp

    r45 r48  
    2525 
    2626#include "OgreOcclusionCullingTerrainSceneManager.h" 
    27 #include "OgreOcclusionCullingSceneManager.h" 
    28 #include "OgreOcclusionCullingDotSceneManager.h" 
     27#include "OgreOcclusionCullingOctreeSceneManager.h" 
     28//#include "OgreOcclusionCullingDotSceneManager.h" 
    2929#include "OgreHeightmapTerrainPageSource.h" 
    3030#include <OgreRoot.h> 
  • trunk/VUT/OcclusionCullingSceneManager/src/OgreOcclusionCullingTerrainSceneManager.cpp

    r44 r48  
    1313        OcclusionCullingTerrainSceneManager::OcclusionCullingTerrainSceneManager() 
    1414        { 
    15                 mOcclusionCullingTerrainSceneTraverser =  
    16                         new OcclusionCullingTerrainSceneTraverser(this, mDestRenderSystem); 
     15                mOcclusionCullingOctreeSceneTraverser =  
     16                        new OcclusionCullingOctreeSceneTraverser(this, mDestRenderSystem); 
    1717 
    1818                //mDisplayNodes = true; 
     
    2424        OcclusionCullingTerrainSceneManager::~OcclusionCullingTerrainSceneManager() 
    2525        { 
    26                 delete mOcclusionCullingTerrainSceneTraverser; 
     26                delete mOcclusionCullingOctreeSceneTraverser; 
    2727        } 
    2828        //----------------------------------------------------------------------- 
     
    4343                setSpecialCaseRenderQueueMode(SceneManager::SCRQM_EXCLUDE); 
    4444 
    45                 mOcclusionCullingTerrainSceneTraverser->setSceneRoot(mOctree); 
    46                 mOcclusionCullingTerrainSceneTraverser->renderScene(mCameraInProgress); 
     45                mOcclusionCullingOctreeSceneTraverser->setSceneRoot(mOctree); 
     46                mOcclusionCullingOctreeSceneTraverser->renderScene(mCameraInProgress); 
    4747                 
    4848                _deleteRenderedQueueGroups(); 
     
    6767                //mOcclusionCullingTerrainSceneTraverser->preprocess(); 
    6868 
    69         mOcclusionCullingTerrainSceneTraverser->setNumSceneNodes((int)mSceneNodes.size()); 
    70                 mOcclusionCullingTerrainSceneTraverser->setRenderSystem(mDestRenderSystem); 
     69        mOcclusionCullingOctreeSceneTraverser->setNumSceneNodes((int)mSceneNodes.size()); 
     70                mOcclusionCullingOctreeSceneTraverser->setRenderSystem(mDestRenderSystem); 
    7171         
    72                 mOcclusionCullingTerrainSceneTraverser->setNumOctreeNodes(mNumOctreeNodes); 
     72                mOcclusionCullingOctreeSceneTraverser->setNumOctreeNodes(mNumOctreeNodes); 
    7373 
    7474                TerrainSceneManager::_updateSceneGraph(cam); 
     
    7777        bool OcclusionCullingTerrainSceneManager::setOption( const String & key, const void * val ) 
    7878        { 
    79                 return mOcclusionCullingTerrainSceneTraverser->setOption( key, val) || TerrainSceneManager::setOption( key, val ); 
     79                return mOcclusionCullingOctreeSceneTraverser->setOption( key, val) || TerrainSceneManager::setOption( key, val ); 
    8080        } 
    8181        //----------------------------------------------------------------------- 
    8282        bool OcclusionCullingTerrainSceneManager::getOption( const String & key, void *val ) 
    8383        { 
    84                 return mOcclusionCullingTerrainSceneTraverser->getOption( key, val) || TerrainSceneManager::getOption( key, val ) ; 
     84                return mOcclusionCullingOctreeSceneTraverser->getOption( key, val) || TerrainSceneManager::getOption( key, val ) ; 
    8585        } 
    8686        //----------------------------------------------------------------------- 
     
    9292        bool OcclusionCullingTerrainSceneManager::getOptionKeys( StringVector & refKeys ) 
    9393        { 
    94                 return mOcclusionCullingTerrainSceneTraverser->getOptionKeys ( refKeys ) || TerrainSceneManager::getOptionKeys( refKeys ); 
     94                return mOcclusionCullingOctreeSceneTraverser->getOptionKeys ( refKeys ) || TerrainSceneManager::getOptionKeys( refKeys ); 
    9595        } 
    9696        //----------------------------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.