Changeset 675 for GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE
- Timestamp:
- 03/06/06 09:17:09 (19 years ago)
- Location:
- GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/scripts/Plugin_VisibilitySceneManager.vcproj
r672 r675 150 150 Filter=""> 151 151 <File 152 RelativePath="..\include\OgreOcclusionCullingSceneManager.h"> 153 </File> 154 <File 152 155 RelativePath="..\include\OgreOctreeHierarchyInterface.h"> 153 156 </File> … … 167 170 <File 168 171 RelativePath="..\src\OgreBspHierarchyInterface.cpp"> 172 </File> 173 <File 174 RelativePath="..\src\OgreOcclusionCullingSceneManager.cpp"> 169 175 </File> 170 176 <File -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreVisibilityTerrainSceneManager.cpp
r347 r675 1 #include "Ogre VisibilityTerrainSceneManager.h"1 #include "OgreOcclusionCullingSceneManager.h" 2 2 #include "OgreVisibilityOptionsManager.h" 3 3 #include <OgreMath.h> … … 14 14 15 15 //----------------------------------------------------------------------- 16 VisibilityTerrainSceneManager::VisibilityTerrainSceneManager(16 OcclusionCullingSceneManager::OcclusionCullingSceneManager( 17 17 GtpVisibility::VisibilityManager *visManager): 18 18 mVisibilityManager(visManager), … … 45 45 } 46 46 //----------------------------------------------------------------------- 47 void VisibilityTerrainSceneManager::InitDepthPass()47 void OcclusionCullingSceneManager::InitDepthPass() 48 48 { 49 49 MaterialPtr depthMat = MaterialManager::getSingleton().getByName("Visibility/DepthPass"); … … 66 66 } 67 67 //----------------------------------------------------------------------- 68 VisibilityTerrainSceneManager::~VisibilityTerrainSceneManager()68 OcclusionCullingSceneManager::~OcclusionCullingSceneManager() 69 69 { 70 70 OGRE_DELETE(mHierarchyInterface); 71 71 } 72 72 //----------------------------------------------------------------------- 73 void VisibilityTerrainSceneManager::InitItemBufferPass()73 void OcclusionCullingSceneManager::InitItemBufferPass() 74 74 { 75 75 MaterialPtr itemBufferMat = MaterialManager::getSingleton(). … … 95 95 } 96 96 //------------------------------------------------------------------------- 97 void VisibilityTerrainSceneManager::setWorldGeometry( const String& filename )97 void OcclusionCullingSceneManager::setWorldGeometry( const String& filename ) 98 98 { 99 99 // Clear out any existing world resources (if not default) … … 124 124 125 125 //----------------------------------------------------------------------- 126 void VisibilityTerrainSceneManager::PrepareVisualization(Camera *cam)126 void OcclusionCullingSceneManager::PrepareVisualization(Camera *cam) 127 127 { 128 128 // add player camera for visualization purpose … … 173 173 } 174 174 //----------------------------------------------------------------------- 175 Pass * VisibilityTerrainSceneManager::setPass(Pass* pass)175 Pass *OcclusionCullingSceneManager::setPass(Pass* pass) 176 176 { 177 177 // TODO: setting vertex program is not efficient … … 236 236 } 237 237 //----------------------------------------------------------------------- 238 void VisibilityTerrainSceneManager::_findVisibleObjects(Camera* cam,238 void OcclusionCullingSceneManager::_findVisibleObjects(Camera* cam, 239 239 bool onlyShadowCasters) 240 240 { … … 266 266 } 267 267 //----------------------------------------------------------------------- 268 void VisibilityTerrainSceneManager::_renderVisibleObjects()268 void OcclusionCullingSceneManager::_renderVisibleObjects() 269 269 { 270 270 … … 354 354 if (mUseDepthPass) 355 355 { 356 for (NodeList::iterator it = mVisible.begin(); it != mVisible.end(); ++ it)356 for (NodeList::iterator it = mVisible.begin(); it != mVisible.end(); ++ it) 357 357 { 358 358 (*it)->_addToRenderQueue(mCameraInProgress, getRenderQueue(), false); … … 381 381 382 382 //----------------------------------------------------------------------- 383 void VisibilityTerrainSceneManager::_updateSceneGraph(Camera* cam)383 void OcclusionCullingSceneManager::_updateSceneGraph(Camera* cam) 384 384 { 385 385 mVisibilityManager->GetCullingManager()->SetHierarchyInterface(mHierarchyInterface); … … 389 389 } 390 390 //----------------------------------------------------------------------- 391 bool VisibilityTerrainSceneManager::setOption(const String & key, const void * val)391 bool OcclusionCullingSceneManager::setOption(const String & key, const void * val) 392 392 { 393 393 if (key == "UseDepthPass") … … 482 482 } 483 483 //----------------------------------------------------------------------- 484 bool VisibilityTerrainSceneManager::getOption(const String & key, void *val)484 bool OcclusionCullingSceneManager::getOption(const String & key, void *val) 485 485 { 486 486 if (key == "NumHierarchyNodes") … … 494 494 } 495 495 //----------------------------------------------------------------------- 496 bool VisibilityTerrainSceneManager::getOptionValues(const String & key,496 bool OcclusionCullingSceneManager::getOptionValues(const String & key, 497 497 StringVector &refValueList) 498 498 { … … 500 500 } 501 501 //----------------------------------------------------------------------- 502 bool VisibilityTerrainSceneManager::getOptionKeys(StringVector & refKeys)502 bool OcclusionCullingSceneManager::getOptionKeys(StringVector & refKeys) 503 503 { 504 504 return VisibilityOptionsManager(mVisibilityManager, mHierarchyInterface). … … 506 506 } 507 507 //----------------------------------------------------------------------- 508 void VisibilityTerrainSceneManager::setVisibilityManager(GtpVisibility::508 void OcclusionCullingSceneManager::setVisibilityManager(GtpVisibility:: 509 509 VisibilityManager *visManager) 510 510 { … … 512 512 } 513 513 //----------------------------------------------------------------------- 514 GtpVisibility::VisibilityManager * VisibilityTerrainSceneManager::getVisibilityManager( void )514 GtpVisibility::VisibilityManager *OcclusionCullingSceneManager::getVisibilityManager( void ) 515 515 { 516 516 return mVisibilityManager; 517 517 } 518 518 //----------------------------------------------------------------------- 519 void VisibilityTerrainSceneManager::WriteLog()519 void OcclusionCullingSceneManager::WriteLog() 520 520 { 521 521 std::stringstream d; … … 535 535 } 536 536 //----------------------------------------------------------------------- 537 void VisibilityTerrainSceneManager::renderObjects(537 void OcclusionCullingSceneManager::renderObjects( 538 538 const RenderPriorityGroup::TransparentRenderablePassList& objs, 539 539 bool doLightIteration, const LightList* manualLightList) … … 546 546 } 547 547 //----------------------------------------------------------------------- 548 bool VisibilityTerrainSceneManager::validatePassForRendering(Pass* pass)548 bool OcclusionCullingSceneManager::validatePassForRendering(Pass* pass) 549 549 { 550 550 // skip all but first pass if we are doing the depth pass … … 553 553 return false; 554 554 } 555 555 556 return SceneManager::validatePassForRendering(pass); 556 557 } 557 558 //----------------------------------------------------------------------- 558 void VisibilityTerrainSceneManager::renderQueueGroupObjects(RenderQueueGroup* pGroup)559 void OcclusionCullingSceneManager::renderQueueGroupObjects(RenderQueueGroup* pGroup) 559 560 { 560 561 if (!mIsItemBufferPhase) … … 575 576 } 576 577 //----------------------------------------------------------------------- 577 void VisibilityTerrainSceneManager::RenderItemBuffer(RenderPriorityGroup* pGroup)578 void OcclusionCullingSceneManager::RenderItemBuffer(RenderPriorityGroup* pGroup) 578 579 { 579 580 // Do solids … … 632 633 } 633 634 //----------------------------------------------------------------------- 634 void VisibilityTerrainSceneManager::RenderSingleObjectForItemBuffer(Renderable *rend, Pass *pass)635 void OcclusionCullingSceneManager::RenderSingleObjectForItemBuffer(Renderable *rend, Pass *pass) 635 636 { 636 637 static LightList nullLightList; … … 677 678 } 678 679 //----------------------------------------------------------------------- 679 GtpVisibility::VisibilityManager * VisibilityTerrainSceneManager::GetVisibilityManager()680 GtpVisibility::VisibilityManager *OcclusionCullingSceneManager::GetVisibilityManager() 680 681 { 681 682 return mVisibilityManager; 682 683 } 683 684 //----------------------------------------------------------------------- 684 void VisibilityTerrainSceneManager::InitVisibilityCulling(Camera *cam)685 void OcclusionCullingSceneManager::InitVisibilityCulling(Camera *cam) 685 686 { 686 687 // reset culling manager stats … … 742 743 // possible two cameras (one for culling, one for rendering) 743 744 mHierarchyInterface->InitTraversal(mCameraInProgress, 744 mCullCamera ? getCamera("CullCamera") : NULL,745 mLeavePassesInQueue);745 mCullCamera ? getCamera("CullCamera") : NULL, 746 mLeavePassesInQueue); 746 747 747 748 //std::stringstream d; d << "leave passes in queue: " << mLeavePassesInQueue;LogManager::getSingleton().logMessage(d.str()); 748 749 } 749 750 //----------------------------------------------------------------------- 750 OctreeHierarchyInterface * VisibilityTerrainSceneManager::GetHierarchyInterface()751 OctreeHierarchyInterface *OcclusionCullingSceneManager::GetHierarchyInterface() 751 752 { 752 753 return mHierarchyInterface; 753 754 } 754 755 //----------------------------------------------------------------------- 755 void VisibilityTerrainSceneManager::endFrame()756 void OcclusionCullingSceneManager::endFrame() 756 757 { 757 758 TerrainRenderable::ResetRenderLevelIndex(); 758 759 } 759 760 //----------------------------------------------------------------------- 760 Entity* VisibilityTerrainSceneManager::createEntity(const String& entityName,761 Entity* OcclusionCullingSceneManager::createEntity(const String& entityName, 761 762 const String& meshName) 762 763 { … … 774 775 } 775 776 //----------------------------------------------------------------------- 776 void VisibilityTerrainSceneManager::renderAdditiveStencilShadowedQueueGroupObjects(RenderQueueGroup* pGroup)777 void OcclusionCullingSceneManager::renderAdditiveStencilShadowedQueueGroupObjects(RenderQueueGroup* pGroup) 777 778 { 778 779 // only render solid passes during hierarchical culling … … 806 807 } 807 808 //----------------------------------------------------------------------- 808 void VisibilityTerrainSceneManager::renderModulativeStencilShadowedQueueGroupObjects(RenderQueueGroup* pGroup)809 void OcclusionCullingSceneManager::renderModulativeStencilShadowedQueueGroupObjects(RenderQueueGroup* pGroup) 809 810 { 810 811 if (mIsHierarchicalCulling)
Note: See TracChangeset
for help on using the changeset viewer.