Changeset 48 for trunk/VUT/OcclusionCullingSceneManager
- Timestamp:
- 04/13/05 09:37:20 (20 years ago)
- Location:
- trunk/VUT/OcclusionCullingSceneManager
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/OcclusionCullingSceneManager/TestCullingDotScene/TestCullingDotScene.vcproj
r37 r48 129 129 </Filter> 130 130 <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 <Filter136 131 Name="tinyxml" 137 132 Filter=""> -
trunk/VUT/OcclusionCullingSceneManager/TestCullingTerrain/TestCullingTerrain.vcproj
r47 r48 122 122 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> 123 123 <File 124 RelativePath=".\TerrainContentGenerator.cpp"> 125 </File> 126 <File 124 127 RelativePath=".\TestCullingTerrainApplication.cpp"> 125 128 </File> … … 130 133 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> 131 134 <File 135 RelativePath=".\TerrainContentGenerator.h"> 136 </File> 137 <File 132 138 RelativePath=".\TestCullingTerrainApplication.h"> 133 139 </File> 134 </Filter>135 <Filter136 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}">139 140 </Filter> 140 141 </Files> -
trunk/VUT/OcclusionCullingSceneManager/TestCullingTerrain/TestCullingTerrainApplication.cpp
r47 r48 1 1 /** 2 2 \file 3 TestCulling Application.cpp3 TestCullingTerrainApplication.cpp 4 4 \brief 5 5 Tests the occlusion culling algorithm … … 14 14 15 15 #include "Ogre.h" 16 #include "TestCulling Application.h"16 #include "TestCullingTerrainApplication.h" 17 17 #include "OgreOcclusionCullingSceneTraverser.h" 18 18 … … 23 23 24 24 /***********************************************/ 25 /* TestCulling Application implementation */25 /* TestCullingTerrainApplication implementation */ 26 26 /***********************************************/ 27 /*TestCulling Application::~TestCullingApplication()27 /*TestCullingTerrainApplication::~TestCullingTerrainApplication() 28 28 { 29 29 delete mRaySceneQuery; 30 30 }*/ 31 31 //----------------------------------------------------------------------- 32 void TestCulling Application::createCamera( void )32 void TestCullingTerrainApplication::createCamera( void ) 33 33 { 34 34 // Create the camera … … 44 44 } 45 45 //----------------------------------------------------------------------- 46 void TestCulling Application::createScene(void)46 void TestCullingTerrainApplication::createScene(void) 47 47 { 48 48 Plane waterPlane; … … 119 119 } 120 120 //----------------------------------------------------------------------- 121 void TestCulling Application::setupGui( void )121 void TestCullingTerrainApplication::setupGui( void ) 122 122 { 123 123 mGUIRenderer = new CEGUI::OgreCEGUIRenderer(mWindow, Ogre::RENDER_QUEUE_OVERLAY, false, 3000, ST_EXTERIOR_CLOSE); … … 133 133 } 134 134 //----------------------------------------------------------------------- 135 void TestCulling Application::createFrameListener(void)135 void TestCullingTerrainApplication::createFrameListener(void) 136 136 { 137 137 mFrameListener= new MouseQueryListener(mWindow, mCamera, mSceneMgr, mGUIRenderer); … … 140 140 } 141 141 //----------------------------------------------------------------------- 142 void TestCulling Application::chooseSceneManager(void)142 void TestCullingTerrainApplication::chooseSceneManager(void) 143 143 { 144 144 //mSceneMgr = mRoot->getSceneManager(ST_GENERIC); … … 395 395 { 396 396 // Create application object 397 TestCulling Application app;397 TestCullingTerrainApplication app; 398 398 399 399 try -
trunk/VUT/OcclusionCullingSceneManager/TestCullingTerrain/TestCullingTerrainApplication.h
r47 r48 1 1 /** 2 2 \file 3 TestCulling Application.h3 TestCullingTerrainApplication.h 4 4 */ 5 5 #include "CEGUIForwardRefs.h" … … 86 86 87 87 88 class TestCulling Application : public ExampleApplication88 class TestCullingTerrainApplication : public ExampleApplication 89 89 { 90 90 public: 91 //~TestCulling Application();91 //~TestCullingTerrainApplication(); 92 92 93 93 protected: -
trunk/VUT/OcclusionCullingSceneManager/include/OgreOcclusionCullingOctreeSceneManager.h
r46 r48 1 #ifndef _OcclusionCulling TerrainSceneManager_H__2 #define _OcclusionCulling TerrainSceneManager_H__1 #ifndef _OcclusionCullingOctreeSceneManager_H__ 2 #define _OcclusionCullingOctreeSceneManager_H__ 3 3 4 4 #include <OgreSceneNode.h> 5 5 #include <OgreOctreeSceneManager.h> 6 #include <OgreTerrainSceneManager.h>7 #include <OgreOctreeSceneQuery.h>8 6 #include <OgreOctreeNode.h> 9 7 #include <OgreOctreeCamera.h> … … 11 9 #include "OgrePrerequisites.h" 12 10 #include "OgreOcclusionCullingOctreeSceneTraverser.h" 13 //#include "OgreSolidHalfBoundingBox.h"14 11 15 12 using namespace std; -
trunk/VUT/OcclusionCullingSceneManager/include/OgreOcclusionCullingTerrainSceneManager.h
r45 r48 10 10 11 11 #include "OgrePrerequisites.h" 12 #include "OgreOcclusionCullinOctreeSceneTraverser.h" 13 //#include "OgreSolidHalfBoundingBox.h" 12 #include "OgreOcclusionCullingOctreeSceneTraverser.h" 14 13 15 14 using namespace std; -
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.