Changeset 48 for trunk/VUT/OcclusionCullingSceneManager/src/OgreOcclusionCullingOctreeSceneTraverser.cpp
- Timestamp:
- 04/13/05 09:37:20 (20 years ago)
- File:
-
- 1 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" );
Note: See TracChangeset
for help on using the changeset viewer.