- Timestamp:
- 04/13/05 00:36:07 (20 years ago)
- Location:
- trunk/VUT/OcclusionCullingSceneManager
- Files:
-
- 2 added
- 2 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/OcclusionCullingSceneManager/TestCulling/TestCulling.vcproj
r44 r45 122 122 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> 123 123 <File 124 RelativePath=".\TerrainContentGenerator.cpp">125 </File>126 <File127 124 RelativePath=".\TestCullingApplication.cpp"> 128 125 </File> … … 132 129 Filter="h;hpp;hxx;hm;inl;inc;xsd" 133 130 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> 134 <File135 RelativePath=".\TerrainContentGenerator.h">136 </File>137 131 <File 138 132 RelativePath=".\TestCullingApplication.h"> -
trunk/VUT/OcclusionCullingSceneManager/include/OgreOcclusionCullingOctreeSceneManager.h
r44 r45 10 10 11 11 #include "OgrePrerequisites.h" 12 #include "OgreOcclusionCulling TerrainSceneTraverser.h"12 #include "OgreOcclusionCullingOctreeSceneTraverser.h" 13 13 //#include "OgreSolidHalfBoundingBox.h" 14 14 -
trunk/VUT/OcclusionCullingSceneManager/include/OgreOcclusionCullingTerrainSceneManager.h
r42 r45 10 10 11 11 #include "OgrePrerequisites.h" 12 #include "OgreOcclusionCullin gTerrainSceneTraverser.h"12 #include "OgreOcclusionCullinOctreeSceneTraverser.h" 13 13 //#include "OgreSolidHalfBoundingBox.h" 14 14 … … 55 55 56 56 protected: 57 /** Recursively counts octree size (i.e., number of octree instances)58 @param root current octree59 */60 //unsigned int countOctreeSize(Octree *root);61 57 62 OcclusionCulling TerrainSceneTraverser *mOcclusionCullingTerrainSceneTraverser;58 OcclusionCullingOctreeSceneTraverser *mOcclusionCullingOctreeSceneTraverser; 63 59 }; 64 60 -
trunk/VUT/OcclusionCullingSceneManager/scripts/Plugin_OcclusionCullingSceneManager.sln
r37 r45 11 11 ProjectSection(ProjectDependencies) = postProject 12 12 {80DECC17-BDDD-4412-8CF8-F7C1C17A7436} = {80DECC17-BDDD-4412-8CF8-F7C1C17A7436} 13 EndProjectSection 14 EndProject 15 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestCullingTerrain", "..\TestCullingTerrain\TestCullingTerrain.vcproj", "{248F19A6-2FE0-4F5D-8928-E0EA10609887}" 16 ProjectSection(ProjectDependencies) = postProject 13 17 EndProjectSection 14 18 EndProject … … 31 35 {BE13944C-D05E-467F-B0AC-8A65A3B5FE60}.Release.ActiveCfg = Release|Win32 32 36 {BE13944C-D05E-467F-B0AC-8A65A3B5FE60}.Release.Build.0 = Release|Win32 37 {248F19A6-2FE0-4F5D-8928-E0EA10609887}.Debug.ActiveCfg = Debug|Win32 38 {248F19A6-2FE0-4F5D-8928-E0EA10609887}.Debug.Build.0 = Debug|Win32 39 {248F19A6-2FE0-4F5D-8928-E0EA10609887}.Release.ActiveCfg = Release|Win32 40 {248F19A6-2FE0-4F5D-8928-E0EA10609887}.Release.Build.0 = Release|Win32 33 41 EndGlobalSection 34 42 GlobalSection(ExtensibilityGlobals) = postSolution -
trunk/VUT/OcclusionCullingSceneManager/scripts/Plugin_OcclusionCullingSceneManager.vcproj
r40 r45 181 181 </Filter> 182 182 <Filter 183 Name=" TerrainSceneManager"183 Name="OctreeOcclusionCullingSceneManager" 184 184 Filter=""> 185 185 <Filter … … 187 187 Filter=""> 188 188 <File 189 RelativePath="..\src\OgreOcclusionCullingOctreeSceneManager.cpp"> 190 </File> 191 <File 192 RelativePath="..\src\OgreOcclusionCullingOctreeSceneTraverser.cpp"> 193 </File> 194 <File 189 195 RelativePath="..\src\OgreOcclusionCullingTerrainSceneManager.cpp"> 190 196 </File> 191 <File192 RelativePath="..\src\OgreOcclusionCullingTerrainSceneTraverser.cpp">193 </File>194 197 </Filter> 195 198 <Filter … … 197 200 Filter=""> 198 201 <File 202 RelativePath="..\include\OgreOcclusionCullingOctreeSceneManager.h"> 203 </File> 204 <File 205 RelativePath="..\include\OgreOcclusionCullingOctreeSceneTraverser.h"> 206 </File> 207 <File 199 208 RelativePath="..\include\OgreOcclusionCullingTerrainSceneManager.h"> 200 209 </File> 201 <File 202 RelativePath="..\include\OgreOcclusionCullingTerrainSceneTraverser.h"> 203 </File> 204 </Filter> 205 </Filter> 206 <Filter 207 Name="DotSceneManager" 210 </Filter> 211 </Filter> 212 <Filter 213 Name="DotSceneOcclusionCullingSceneManager" 208 214 Filter=""> 209 215 <Filter -
trunk/VUT/OcclusionCullingSceneManager/src/OgreOcclusionCullingOctreeSceneManager.cpp
r44 r45 1 #include "OgreOcclusionCulling TerrainSceneManager.h"1 #include "OgreOcclusionCullingOctreeSceneManager.h" 2 2 #include "OgreMath.h" 3 3 #include "OgreIteratorWrappers.h" 4 4 #include "OgreRenderSystem.h" 5 5 #include "OgreCamera.h" 6 #include "OgreHardwareOcclusionQuery.h"7 #include "OgreSolidHalfBoundingBox.h"8 6 9 7 #include <windows.h> … … 11 9 namespace Ogre { 12 10 //----------------------------------------------------------------------- 13 OcclusionCulling TerrainSceneManager::OcclusionCullingTerrainSceneManager()11 OcclusionCullingOctreeSceneManager::OcclusionCullingOctreeSceneManager() 14 12 { 15 mOcclusionCulling TerrainSceneTraverser =16 new OcclusionCulling TerrainSceneTraverser(this, mDestRenderSystem);13 mOcclusionCullingOctreeSceneTraverser = 14 new OcclusionCullingOctreeSceneTraverser(this, mDestRenderSystem); 17 15 18 16 //mDisplayNodes = true; … … 22 20 } 23 21 //----------------------------------------------------------------------- 24 OcclusionCulling TerrainSceneManager::~OcclusionCullingTerrainSceneManager()22 OcclusionCullingOctreeSceneManager::~OcclusionCullingOctreeSceneManager() 25 23 { 26 delete mOcclusionCulling TerrainSceneTraverser;24 delete mOcclusionCullingOctreeSceneTraverser; 27 25 } 28 26 //----------------------------------------------------------------------- 29 void OcclusionCulling TerrainSceneManager::_renderVisibleObjects(void)27 void OcclusionCullingOctreeSceneManager::_renderVisibleObjects(void) 30 28 { 31 29 //-- render background … … 43 41 setSpecialCaseRenderQueueMode(SceneManager::SCRQM_EXCLUDE); 44 42 45 mOcclusionCulling TerrainSceneTraverser->setSceneRoot(mOctree);46 mOcclusionCulling TerrainSceneTraverser->renderScene(mCameraInProgress);43 mOcclusionCullingOctreeSceneTraverser->setSceneRoot(mOctree); 44 mOcclusionCullingOctreeSceneTraverser->renderScene(mCameraInProgress); 47 45 48 46 _deleteRenderedQueueGroups(); … … 55 53 } 56 54 //----------------------------------------------------------------------- 57 void OcclusionCulling TerrainSceneManager::_findVisibleObjects(Camera* cam, bool onlyShadowCasters)55 void OcclusionCullingOctreeSceneManager::_findVisibleObjects(Camera* cam, bool onlyShadowCasters) 58 56 { 59 57 // must be empty because objects are found and rendered in an interleaved fashion … … 62 60 } 63 61 //----------------------------------------------------------------------- 64 void OcclusionCulling TerrainSceneManager::_updateSceneGraph(Camera* cam)62 void OcclusionCullingOctreeSceneManager::_updateSceneGraph(Camera* cam) 65 63 { 66 64 //char *msg = "now updating scenegraph\n"; OutputDebugString(msg); 67 //mOcclusionCulling TerrainSceneTraverser->preprocess();65 //mOcclusionCullingOctreeSceneTraverser->preprocess(); 68 66 69 mOcclusionCulling TerrainSceneTraverser->setNumSceneNodes((int)mSceneNodes.size());70 mOcclusionCulling TerrainSceneTraverser->setRenderSystem(mDestRenderSystem);67 mOcclusionCullingOctreeSceneTraverser->setNumSceneNodes((int)mSceneNodes.size()); 68 mOcclusionCullingOctreeSceneTraverser->setRenderSystem(mDestRenderSystem); 71 69 72 mOcclusionCulling TerrainSceneTraverser->setNumOctreeNodes(mNumOctreeNodes);70 mOcclusionCullingOctreeSceneTraverser->setNumOctreeNodes(mNumOctreeNodes); 73 71 74 TerrainSceneManager::_updateSceneGraph(cam);72 OctreeSceneManager::_updateSceneGraph(cam); 75 73 } 76 74 //----------------------------------------------------------------------- 77 bool OcclusionCulling TerrainSceneManager::setOption( const String & key, const void * val )75 bool OcclusionCullingOctreeSceneManager::setOption( const String & key, const void * val ) 78 76 { 79 return mOcclusionCulling TerrainSceneTraverser->setOption( key, val) || TerrainSceneManager::setOption( key, val );77 return mOcclusionCullingOctreeSceneTraverser->setOption( key, val) || OctreeSceneManager::setOption( key, val ); 80 78 } 81 79 //----------------------------------------------------------------------- 82 bool OcclusionCulling TerrainSceneManager::getOption( const String & key, void *val )80 bool OcclusionCullingOctreeSceneManager::getOption( const String & key, void *val ) 83 81 { 84 return mOcclusionCulling TerrainSceneTraverser->getOption( key, val) || TerrainSceneManager::getOption( key, val ) ;82 return mOcclusionCullingOctreeSceneTraverser->getOption( key, val) || OctreeSceneManager::getOption( key, val ) ; 85 83 } 86 84 //----------------------------------------------------------------------- 87 bool OcclusionCulling TerrainSceneManager::getOptionValues( const String & key, StringVector &refValueList )85 bool OcclusionCullingOctreeSceneManager::getOptionValues( const String & key, StringVector &refValueList ) 88 86 { 89 return TerrainSceneManager::getOptionValues( key, refValueList );87 return OctreeSceneManager::getOptionValues( key, refValueList ); 90 88 } 91 89 //----------------------------------------------------------------------- 92 bool OcclusionCulling TerrainSceneManager::getOptionKeys( StringVector & refKeys )90 bool OcclusionCullingOctreeSceneManager::getOptionKeys( StringVector & refKeys ) 93 91 { 94 return mOcclusionCulling TerrainSceneTraverser->getOptionKeys ( refKeys ) || TerrainSceneManager::getOptionKeys( refKeys );92 return mOcclusionCullingOctreeSceneTraverser->getOptionKeys ( refKeys ) || OctreeSceneManager::getOptionKeys( refKeys ); 95 93 } 96 94 //----------------------------------------------------------------------- 97 void OcclusionCulling TerrainSceneManager::_renderOctant(Camera *cam, Octree *octant)95 void OcclusionCullingOctreeSceneManager::_renderOctant(Camera *cam, Octree *octant) 98 96 { 99 97 //Add stuff to be rendered; … … 131 129 _deleteRenderedQueueGroups(); 132 130 } 133 //-----------------------------------------------------------------------134 /*unsigned int OcclusionCullingTerrainSceneManager::countNumOctrees(Octree *root)135 {136 unsigned int result = 1;137 138 for(int i=0; i<8; ++i)139 {140 Octree *nextChild = root->mChildren[(i & 4) >> 2][(i & 2) >> 1][i & 1];141 142 if(nextChild != 0)143 result += countNumOctrees(nextChild);144 }145 146 return result;147 }*/148 131 } -
trunk/VUT/OcclusionCullingSceneManager/src/OgreOcclusionCullingSceneManagerDll.cpp
r37 r45 34 34 namespace Ogre { 35 35 36 OcclusionCullingDotSceneManager *occlusionPlugin; 36 // OcclusionCullingDotSceneManager *occlusionDotPlugin; 37 OcclusionCullingOctreeSceneManager *occlusionOctreePlugin; 37 38 OcclusionCullingTerrainSceneManager *occlusionTerrainPlugin; 38 39 HeightmapTerrainPageSource* heightmapTerrainPageSource; … … 42 43 { 43 44 // Create new scene manager 44 occlusionPlugin = new OcclusionCullingDotSceneManager(); 45 //occlusionDotPlugin = new OcclusionCullingDotSceneManager(); 46 occlusionOctreePlugin = new OcclusionCullingOctreeSceneManager(); 45 47 occlusionTerrainPlugin = new OcclusionCullingTerrainSceneManager(); 46 48 heightmapTerrainPageSource = new HeightmapTerrainPageSource(); … … 49 51 50 52 // Register 51 Root::getSingleton().setSceneManager( ST_GENERIC, occlusionPlugin ); 53 //Root::getSingleton().setSceneManager( ST_GENERIC, occlusionDotPlugin ); 54 Root::getSingleton().setSceneManager( ST_GENERIC, occlusionOctreePlugin ); 52 55 Root::getSingleton().setSceneManager( ST_EXTERIOR_CLOSE, occlusionTerrainPlugin ); 53 56 … … 57 60 { 58 61 delete heightmapTerrainPageSource; 59 delete occlusionPlugin; 62 //delete occlusionDotPlugin; 63 delete occlusionOctreePlugin; 60 64 delete occlusionTerrainPlugin; 61 65 }
Note: See TracChangeset
for help on using the changeset viewer.