Changeset 99 for trunk/VUT/Ogre/src
- Timestamp:
- 05/15/05 04:08:02 (20 years ago)
- Location:
- trunk/VUT/Ogre/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/Ogre/src/OgreVisibilityOctreeSceneManager.cpp
r96 r99 12 12 VisibilityOctreeSceneManager::VisibilityOctreeSceneManager( 13 13 GtpVisibility::VisibilityManager *visManager) 14 : mVisibilityManager(visManager), mUse Culling(true)14 : mVisibilityManager(visManager), mUseVisibilityCulling(true) 15 15 { 16 16 mHierarchyInterface = … … 38 38 39 39 // standard scenemanager rendering without hierarchical culling 40 if(!mUse Culling)40 if(!mUseVisibilityCulling) 41 41 { 42 42 OctreeSceneManager::_renderVisibleObjects(); … … 76 76 SceneManager::_renderVisibleObjects(); 77 77 78 // write out stats 79 WriteLog(); 78 //WriteLog(); // write out stats 80 79 } 81 80 //----------------------------------------------------------------------- 82 81 void VisibilityOctreeSceneManager::_findVisibleObjects(Camera* cam, bool onlyShadowCasters) 83 82 { 84 // emptyif hierarchical culling is used =>83 // does nothing if hierarchical culling is used => 85 84 // we interleave identification and rendering of objects 86 85 // in _renderVisibibleObjects 87 if(!mUseCulling) 86 getRenderQueue()->clear(); 87 mBoxes.clear(); 88 mVisible.clear(); 89 90 if(!mUseVisibilityCulling) 88 91 { 89 92 OctreeSceneManager::_findVisibleObjects(cam, onlyShadowCasters); … … 104 107 bool VisibilityOctreeSceneManager::setOption(const String & key, const void * val) 105 108 { 106 if (key == "Use Culling")109 if (key == "UseVisibilityCulling") 107 110 { 108 mUse Culling = (*static_cast<const bool *>(val));111 mUseVisibilityCulling = (*static_cast<const bool *>(val)); 109 112 return true; 110 113 } 111 114 112 115 return VisibilityOptionsManager(mVisibilityManager, mHierarchyInterface). 113 116 setOption(key, val) || OctreeSceneManager::setOption(key, val); -
trunk/VUT/Ogre/src/OgreVisibilitySceneManager.cpp
r96 r99 12 12 //----------------------------------------------------------------------- 13 13 VisibilitySceneManager::VisibilitySceneManager(GtpVisibility::VisibilityManager *visManager) 14 :mVisibilityManager(visManager), mUse Culling(true)14 :mVisibilityManager(visManager), mUseVisibilityCulling(true) 15 15 { 16 16 mHierarchyInterface = new SceneNodeHierarchyInterface(this, mDestRenderSystem); … … 27 27 // we interleave identification and rendering of objects 28 28 // in _renderVisibibleObjects 29 if(!mUse Culling)29 if(!mUseVisibilityCulling) 30 30 { 31 31 SceneManager::_findVisibleObjects(cam, onlyShadowCasters); … … 38 38 mVisibilityManager->GetCullingManager()->InitFrame(); 39 39 40 if(!mUse Culling)40 if(!mUseVisibilityCulling) 41 41 { 42 42 SceneManager::_renderVisibleObjects(); -
trunk/VUT/Ogre/src/OgreVisibilityTerrainSceneManager.cpp
r96 r99 15 15 VisibilityTerrainSceneManager::VisibilityTerrainSceneManager( 16 16 GtpVisibility::VisibilityManager *visManager) 17 : mVisibilityManager(visManager), mUseCulling(true) 17 : mVisibilityManager(visManager), mUseVisibilityCulling(true), 18 mShowVisualization(false) 18 19 { 19 20 mHierarchyInterface = … … 38 39 39 40 // standard scenemanager rendering without hierarchical culling 40 if(!mUse Culling)41 if(!mUseVisibilityCulling || mShowVisualization) 41 42 { 42 43 OctreeSceneManager::_renderVisibleObjects(); … … 74 75 clearSpecialCaseRenderQueues(); 75 76 SceneManager::_renderVisibleObjects(); 77 78 //WriteLog(); // write out stats 76 79 } 77 80 //----------------------------------------------------------------------- 78 81 void VisibilityTerrainSceneManager::_findVisibleObjects(Camera* cam, bool onlyShadowCasters) 79 82 { 80 // emptyif hierarchical culling is used =>83 // does nothing if hierarchical culling is used => 81 84 // we interleave identification and rendering of objects 82 85 // in _renderVisibibleObjects 83 if(!mUseCulling) 86 if (mShowVisualization) 87 { 88 for ( BoxList::iterator it = mBoxes.begin(); it != mBoxes.end(); ++it ) 89 { 90 getRenderQueue()->addRenderable(*it); 91 } 92 } 93 94 getRenderQueue()->clear(); 95 mBoxes.clear(); 96 mVisible.clear(); 97 98 if(!mUseVisibilityCulling) 84 99 { 85 100 OctreeSceneManager::_findVisibleObjects(cam, onlyShadowCasters); … … 101 116 bool VisibilityTerrainSceneManager::setOption(const String & key, const void * val) 102 117 { 103 if (key == "Use Culling")118 if (key == "UseVisibilityCulling") 104 119 { 105 mUseCulling = (*static_cast<const bool *>(val)); 120 mUseVisibilityCulling = (*static_cast<const bool *>(val)); 121 return true; 122 } 123 if (key == "ShowVisualization") 124 { 125 mShowVisualization = (*static_cast<const bool *>(val)); 106 126 return true; 107 127 } … … 119 139 } 120 140 141 121 142 return VisibilityOptionsManager(mVisibilityManager, mHierarchyInterface). 122 143 getOption(key, val) && TerrainSceneManager::getOption(key, val); … … 144 165 } 145 166 //----------------------------------------------------------------------- 167 void VisibilityTerrainSceneManager::SetShowVisualization(bool showViz) 168 { 169 mShowVisualization = showViz; 170 } 171 //----------------------------------------------------------------------- 146 172 void VisibilityTerrainSceneManager::WriteLog() 147 173 {
Note: See TracChangeset
for help on using the changeset viewer.