Changeset 48 for trunk/VUT/OcclusionCullingSceneManager/src
- Timestamp:
- 04/13/05 09:37:20 (20 years ago)
- Location:
- trunk/VUT/OcclusionCullingSceneManager/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/OcclusionCullingSceneManager/src/OgreOcclusionCullingOctreeSceneTraverser.cpp
r45 r48 1 1 #include "OgreOcclusionCullingOctreeSceneTraverser.h" 2 #include "OgreOcclusionCulling TerrainSceneManager.h"2 #include "OgreOcclusionCullingOctreeSceneManager.h" 3 3 #include "OgreHardwareOcclusionQuery.h" 4 4 … … 7 7 namespace Ogre { 8 8 //----------------------------------------------------------------------- 9 OcclusionCulling TerrainSceneTraverser::OcclusionCullingTerrainSceneTraverser(SceneManager *sm, RenderSystem *rsys):9 OcclusionCullingOctreeSceneTraverser::OcclusionCullingOctreeSceneTraverser(SceneManager *sm, RenderSystem *rsys): 10 10 OcclusionCullingSceneTraverser(sm, rsys), mOctreeSceneRoot(0), mOctreeDistanceQueue(0) 11 11 { 12 12 } 13 13 //----------------------------------------------------------------------- 14 OcclusionCulling TerrainSceneTraverser::~OcclusionCullingTerrainSceneTraverser()14 OcclusionCullingOctreeSceneTraverser::~OcclusionCullingOctreeSceneTraverser() 15 15 { 16 16 if(mOctreeDistanceQueue) … … 18 18 } 19 19 //----------------------------------------------------------------------- 20 void OcclusionCulling TerrainSceneTraverser::traverseOctant(Camera *cam, Octree *octant )20 void OcclusionCullingOctreeSceneTraverser::traverseOctant(Camera *cam, Octree *octant ) 21 21 { 22 22 mNumTraversedNodes ++; … … 34 34 } 35 35 //----------------------------------------------------------------------- 36 void OcclusionCulling TerrainSceneTraverser::renderCullFrustum(Camera *cam)36 void OcclusionCullingOctreeSceneTraverser::renderCullFrustum(Camera *cam) 37 37 { 38 38 AxisAlignedBox box; … … 63 63 //----------------------------------------------------------------------- 64 64 /** Renders the scene with the hierarchical stop and wait algorithm. */ 65 void OcclusionCulling TerrainSceneTraverser::renderStopAndWait( Camera *cam )65 void OcclusionCullingOctreeSceneTraverser::renderStopAndWait( Camera *cam ) 66 66 { 67 67 AxisAlignedBox box; … … 114 114 //----------------------------------------------------------------------- 115 115 /** Renders the scene with the coherent hierarchical algorithm and the query queye. */ 116 void OcclusionCulling TerrainSceneTraverser::renderCoherentWithQueue( Camera *cam )116 void OcclusionCullingOctreeSceneTraverser::renderCoherentWithQueue( Camera *cam ) 117 117 { 118 118 OctreeQueryQueue queryQueue; … … 204 204 } 205 205 //----------------------------------------------------------------------- 206 void OcclusionCulling TerrainSceneTraverser::pullUpVisibility( Camera *cam, Octree *octant )206 void OcclusionCullingOctreeSceneTraverser::pullUpVisibility( Camera *cam, Octree *octant ) 207 207 { 208 208 while(octant && !octant->isOctreeVisible()) … … 216 216 } 217 217 //----------------------------------------------------------------------- 218 void OcclusionCulling TerrainSceneTraverser::renderOctant( Camera *cam, Octree *octant )218 void OcclusionCullingOctreeSceneTraverser::renderOctant( Camera *cam, Octree *octant ) 219 219 { 220 220 //if(octant->numNodes() > 0) … … 224 224 225 225 octant->setLastRendered(octant->lastVisited()); 226 ((OcclusionCulling TerrainSceneManager *)mSceneManager)->_renderOctant(cam, octant);226 ((OcclusionCullingOctreeSceneManager *)mSceneManager)->_renderOctant(cam, octant); 227 227 } 228 228 else OutputDebugString("already rendered"); 229 229 } 230 230 //----------------------------------------------------------------------- 231 void OcclusionCulling TerrainSceneTraverser::setSceneRoot(Octree *root)231 void OcclusionCullingOctreeSceneTraverser::setSceneRoot(Octree *root) 232 232 { 233 233 mOctreeSceneRoot = root; 234 234 } 235 235 //----------------------------------------------------------------------- 236 void OcclusionCulling TerrainSceneTraverser::initDistanceQueue(Camera *cam)236 void OcclusionCullingOctreeSceneTraverser::initDistanceQueue(Camera *cam) 237 237 { 238 238 if(mOctreeDistanceQueue) … … 243 243 } 244 244 //----------------------------------------------------------------------- 245 bool OcclusionCulling TerrainSceneTraverser::isLeaf(Octree *octant)245 bool OcclusionCullingOctreeSceneTraverser::isLeaf(Octree *octant) 246 246 { 247 247 for(int i=0; i<8; i++) … … 254 254 } 255 255 //----------------------------------------------------------------------- 256 void OcclusionCulling TerrainSceneTraverser::setNumOctreeNodes(unsigned int num)256 void OcclusionCullingOctreeSceneTraverser::setNumOctreeNodes(unsigned int num) 257 257 { 258 258 mNumOctreeNodes = num; 259 259 } 260 260 //----------------------------------------------------------------------- 261 bool OcclusionCulling TerrainSceneTraverser::getOption( const String & key, void *val )261 bool OcclusionCullingOctreeSceneTraverser::getOption( const String & key, void *val ) 262 262 { 263 263 if ( key == "NumOctreeNodes" ) … … 270 270 } 271 271 //----------------------------------------------------------------------- 272 bool OcclusionCulling TerrainSceneTraverser::getOptionKeys( StringVector & refKeys )272 bool OcclusionCullingOctreeSceneTraverser::getOptionKeys( StringVector & refKeys ) 273 273 { 274 274 refKeys.push_back( "NumOctreeNodes" ); -
trunk/VUT/OcclusionCullingSceneManager/src/OgreOcclusionCullingSceneManagerDll.cpp
r45 r48 25 25 26 26 #include "OgreOcclusionCullingTerrainSceneManager.h" 27 #include "OgreOcclusionCulling SceneManager.h"28 #include "OgreOcclusionCullingDotSceneManager.h"27 #include "OgreOcclusionCullingOctreeSceneManager.h" 28 //#include "OgreOcclusionCullingDotSceneManager.h" 29 29 #include "OgreHeightmapTerrainPageSource.h" 30 30 #include <OgreRoot.h> -
trunk/VUT/OcclusionCullingSceneManager/src/OgreOcclusionCullingTerrainSceneManager.cpp
r44 r48 13 13 OcclusionCullingTerrainSceneManager::OcclusionCullingTerrainSceneManager() 14 14 { 15 mOcclusionCulling TerrainSceneTraverser =16 new OcclusionCulling TerrainSceneTraverser(this, mDestRenderSystem);15 mOcclusionCullingOctreeSceneTraverser = 16 new OcclusionCullingOctreeSceneTraverser(this, mDestRenderSystem); 17 17 18 18 //mDisplayNodes = true; … … 24 24 OcclusionCullingTerrainSceneManager::~OcclusionCullingTerrainSceneManager() 25 25 { 26 delete mOcclusionCulling TerrainSceneTraverser;26 delete mOcclusionCullingOctreeSceneTraverser; 27 27 } 28 28 //----------------------------------------------------------------------- … … 43 43 setSpecialCaseRenderQueueMode(SceneManager::SCRQM_EXCLUDE); 44 44 45 mOcclusionCulling TerrainSceneTraverser->setSceneRoot(mOctree);46 mOcclusionCulling TerrainSceneTraverser->renderScene(mCameraInProgress);45 mOcclusionCullingOctreeSceneTraverser->setSceneRoot(mOctree); 46 mOcclusionCullingOctreeSceneTraverser->renderScene(mCameraInProgress); 47 47 48 48 _deleteRenderedQueueGroups(); … … 67 67 //mOcclusionCullingTerrainSceneTraverser->preprocess(); 68 68 69 mOcclusionCulling TerrainSceneTraverser->setNumSceneNodes((int)mSceneNodes.size());70 mOcclusionCulling TerrainSceneTraverser->setRenderSystem(mDestRenderSystem);69 mOcclusionCullingOctreeSceneTraverser->setNumSceneNodes((int)mSceneNodes.size()); 70 mOcclusionCullingOctreeSceneTraverser->setRenderSystem(mDestRenderSystem); 71 71 72 mOcclusionCulling TerrainSceneTraverser->setNumOctreeNodes(mNumOctreeNodes);72 mOcclusionCullingOctreeSceneTraverser->setNumOctreeNodes(mNumOctreeNodes); 73 73 74 74 TerrainSceneManager::_updateSceneGraph(cam); … … 77 77 bool OcclusionCullingTerrainSceneManager::setOption( const String & key, const void * val ) 78 78 { 79 return mOcclusionCulling TerrainSceneTraverser->setOption( key, val) || TerrainSceneManager::setOption( key, val );79 return mOcclusionCullingOctreeSceneTraverser->setOption( key, val) || TerrainSceneManager::setOption( key, val ); 80 80 } 81 81 //----------------------------------------------------------------------- 82 82 bool OcclusionCullingTerrainSceneManager::getOption( const String & key, void *val ) 83 83 { 84 return mOcclusionCulling TerrainSceneTraverser->getOption( key, val) || TerrainSceneManager::getOption( key, val ) ;84 return mOcclusionCullingOctreeSceneTraverser->getOption( key, val) || TerrainSceneManager::getOption( key, val ) ; 85 85 } 86 86 //----------------------------------------------------------------------- … … 92 92 bool OcclusionCullingTerrainSceneManager::getOptionKeys( StringVector & refKeys ) 93 93 { 94 return mOcclusionCulling TerrainSceneTraverser->getOptionKeys ( refKeys ) || TerrainSceneManager::getOptionKeys( refKeys );94 return mOcclusionCullingOctreeSceneTraverser->getOptionKeys ( refKeys ) || TerrainSceneManager::getOptionKeys( refKeys ); 95 95 } 96 96 //-----------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.