Changeset 2280 for GTP/trunk/Lib/Vis/OnlineCullingCHC/src
- Timestamp:
- 03/22/07 18:24:13 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/OnlineCullingCHC/src
- Files:
-
- 1 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/OnlineCullingCHC/src/BatchedQueriesCullingManager.cpp
r951 r2280 1 1 #include "BatchedQueriesCullingManager.h" 2 #include <OgreLogManager.h> 2 3 3 4 4 namespace GtpVisibility { … … 21 21 QueryQueue queryQueue; 22 22 unsigned int visiblePixels = 0; 23 24 //Ogre::LogManager::getSingleton().logMessage("Batched Culling");25 23 26 24 PendingQueue pendingQueue; … … 90 88 DecideVisible(node) && mHierarchyInterface->HasGeometry(node); 91 89 92 //if (mHierarchyInterface->LastVisited(node) >= mHierarchyInterface->GetFrameId())93 // Ogre::LogManager::getSingleton().logMessage("error");94 95 90 if (skipQuery) 96 91 { -
GTP/trunk/Lib/Vis/OnlineCullingCHC/src/CoherentHierarchicalCullingManager.cpp
r2258 r2280 1 1 #include "CoherentHierarchicalCullingManager.h" 2 #include < OgreLogManager.h>2 #include <time.h> 3 3 4 4 namespace GtpVisibility { … … 143 143 mThreshold = RAND_MAX; 144 144 } 145 //std::stringstream d; d << "*** setting assumed vis: " << mAssumedVisibility; Ogre::LogManager::getSingleton().logMessage(d.str());145 146 146 } 147 147 //----------------------------------------------------------------------- 148 148 inline bool CoherentHierarchicalCullingManager::DecideVisible(HierarchyNode *node) const 149 149 { 150 //bool result = rand() < mThreshold; std::stringstream d; d << "Assumed vis: " << mAssumedVisibility << ", result: " << result;151 //Ogre::LogManager::getSingleton().logMessage(d.str()); return result;152 153 150 return rand() < mThreshold; 154 151 } -
GTP/trunk/Lib/Vis/OnlineCullingCHC/src/CullingManager.cpp
r112 r2280 1 1 #include "CullingManager.h" 2 2 3 3 4 namespace GtpVisibility { 4 5 6 7 5 8 //----------------------------------------------------------------------- 6 9 CullingManager::CullingManager(): 7 mHierarchyInterface(NULL), mVisibilityThreshold(0), mNumQueryCulledNodes(0), 8 mNumFrustumCulledNodes(0), mNumQueriesIssued(0), 10 mHierarchyInterface(NULL), 11 mVisibilityThreshold(0), 12 mNumQueryCulledNodes(0), 13 mNumFrustumCulledNodes(0), 14 mNumQueriesIssued(0), 9 15 mVisualizeCulledNodes(false) 10 16 { 11 17 } 18 19 12 20 //----------------------------------------------------------------------- 13 21 void CullingManager::SetHierarchyInterface(HierarchyInterface *hierarchyInterface) -
GTP/trunk/Lib/Vis/OnlineCullingCHC/src/DummyPreprocessingManager.cpp
r316 r2280 1 1 #include "DummyPreprocessingManager.h" 2 #include <iostream> 3 #include <fstream> 2 4 3 5 namespace GtpVisibility { … … 25 27 26 28 27 /** 28 Find viewcells intersecting a spherical neighborhood of a point. 29 Returns false if no viewcell was found. 30 */ 31 bool DummyPreprocessingManager::LocateViewCellIds(const Vector3 ¢er, 29 30 /*bool DummyPreprocessingManager::LocateViewCellIds(const Vector3 ¢er, 32 31 const float radius, 33 32 vector<int> *viewCellIds) 34 33 { 35 34 return false; 36 } 35 }*/ 37 36 38 /** 39 Uses the specified viewcell to find its PVS 40 */ 41 int DummyPreprocessingManager::AddViewCellPVS(const int cellID, 37 /*int DummyPreprocessingManager::AddViewCellPVS(const int cellID, 42 38 NodeInfoContainer *visibleNodes, 43 39 MeshInfoContainer *visibleMeshes ) … … 47 43 return false; 48 44 } 49 45 */ 50 46 } -
GTP/trunk/Lib/Vis/OnlineCullingCHC/src/FrustumCullingManager.cpp
r925 r2280 1 1 #include "FrustumCullingManager.h" 2 #include <OgreLogManager.h> 2 3 3 4 4 namespace GtpVisibility { … … 6 6 //----------------------------------------------------------------------- 7 7 void FrustumCullingManager::RenderScene() 8 { 8 { 9 9 while (!mHierarchyInterface->GetQueue()->empty()) 10 { 10 {; 11 11 HierarchyNode *node = mHierarchyInterface->GetQueue()->top(); 12 12 mHierarchyInterface->GetQueue()->pop(); -
GTP/trunk/Lib/Vis/OnlineCullingCHC/src/GtpVisibility.vcproj
r2278 r2280 189 189 <Configuration 190 190 Name="Release Internal|Win32" 191 OutputDirectory=" $(ConfigurationName)"192 IntermediateDirectory=" $(ConfigurationName)"191 OutputDirectory="..\lib\Release" 192 IntermediateDirectory="..\obj\Release" 193 193 ConfigurationType="4" 194 194 CharacterSet="2"> … … 204 204 OptimizeForProcessor="3" 205 205 OptimizeForWindowsApplication="TRUE" 206 AdditionalIncludeDirectories="..\include ;"$(OGRE_PATH)\OgreMain\include";..\..\Preprocessing\src"207 PreprocessorDefinitions="WIN32;NDEBUG;_LIB "206 AdditionalIncludeDirectories="..\include" 207 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;GTP_VISIBILITY_MODIFIED_OGRE;GAMETOOLS_ILLUMINATION_MODULE" 208 208 RuntimeLibrary="2" 209 209 EnableEnhancedInstructionSet="2" … … 297 297 </File> 298 298 <File 299 RelativePath=".\CullingLogManager.cpp"> 300 </File> 301 <File 299 302 RelativePath="..\src\CullingManager.cpp"> 300 303 </File> … … 338 341 </File> 339 342 <File 343 RelativePath="..\include\CullingLogManager.h"> 344 </File> 345 <File 340 346 RelativePath="..\include\CullingManager.h"> 341 347 </File> … … 347 353 </File> 348 354 <File 349 RelativePath="..\include\DummyQueryManager.h">350 </File>351 <File352 355 RelativePath="..\include\FrustumCullingManager.h"> 353 356 </File> … … 378 381 <File 379 382 RelativePath="..\include\VisibilityManager.h"> 380 </File>381 <File382 RelativePath="..\include\VisibilityMesh.h">383 383 </File> 384 384 </Filter> -
GTP/trunk/Lib/Vis/OnlineCullingCHC/src/PreprocessingManager.cpp
r316 r2280 11 11 } 12 12 13 bool PreprocessingManager::GetPVS(const Vector3 ¢er,13 /*bool PreprocessingManager::GetPVS(const Vector3 ¢er, 14 14 const float radius, 15 15 NodeInfoContainer *visibleNodes, … … 27 27 } 28 28 return false; 29 30 29 } 30 */ 31 31 }; -
GTP/trunk/Lib/Vis/OnlineCullingCHC/src/QueryManager.cpp
r174 r2280 4 4 namespace GtpVisibility { 5 5 6 QueryManager::QueryManager(HierarchyInterface *hierarchyInterface, int queryModes):6 /*QueryManager::QueryManager(HierarchyInterface *hierarchyInterface, int queryModes): 7 7 mHierarchyInterface(hierarchyInterface), 8 8 mQueryModes(queryModes) … … 15 15 return false; 16 16 } 17 17 */ 18 QueryManager::QueryManager(int queryModes): 19 mQueryModes(queryModes) 20 { 21 } 22 18 23 } // namespace GtpVisibility -
GTP/trunk/Lib/Vis/OnlineCullingCHC/src/RandomUpdateCullingManager.cpp
r2278 r2280 1 1 #include "RandomUpdateCullingManager.h" 2 #include <OgreLogManager.h> 2 #include <time.h> 3 #include "CullingLogManager.h" 4 3 5 4 6 namespace GtpVisibility { … … 31 33 ///////////// 32 34 //-- PART 1: process finished occlusion queries 33 35 CullingLogManager::GetSingleton()->LogMessage("here55"); 34 36 while (!mHierarchyInterface->GetQueue()->empty() || !queryQueue.empty()) 35 37 { … … 113 115 Ogre::LogManager::getSingleton().logMessage("g"); 114 116 } 115 117 116 118 if (mHierarchyInterface->IsNodeFullyVisible(node)) 117 119 {Ogre::LogManager::getSingleton().logMessage("here8"); … … 183 185 mThreshold = RAND_MAX; 184 186 } 185 //std::stringstream d; d << "*** setting assumed vis: " << mAssumedVisibility; Ogre::LogManager::getSingleton().logMessage(d.str()); 187 186 188 } 187 189 //----------------------------------------------------------------------- 188 190 inline bool RandomUpdateCullingManager::DecideVisible(HierarchyNode *node) const 189 191 { 190 //bool result = rand() < mThreshold; std::stringstream d; d << "Assumed vis: " << mAssumedVisibility << ", result: " << result;191 //Ogre::LogManager::getSingleton().logMessage(d.str()); return result;192 193 192 return rand() < mThreshold; 194 193 } -
GTP/trunk/Lib/Vis/OnlineCullingCHC/src/StopAndWaitCullingManager.cpp
r2171 r2280 1 1 #include "StopAndWaitCullingManager.h" 2 #include <OgreLogManager.h> 2 3 3 4 4 namespace GtpVisibility { -
GTP/trunk/Lib/Vis/OnlineCullingCHC/src/VisibilityEnvironment.cpp
r2278 r2280 15 15 VisibilityEnvironment::~VisibilityEnvironment() 16 16 { 17 //GtpVisibilityPreprocessor::Environment::DelSingleton();17 // GtpVisibilityPreprocessor::Environment::DelSingleton(); 18 18 } 19 19 //----------------------------------------------------------------------- … … 21 21 { 22 22 //-- parse environment 23 return false;//GtpVisibilityPreprocessor::Environment::GetSingleton()->ReadEnvFile(filename.c_str()); 23 //return GtpVisibilityPreprocessor::Environment::GetSingleton()->ReadEnvFile(filename.c_str()); 24 return false; 24 25 } 25 26 //----------------------------------------------------------------------- -
GTP/trunk/Lib/Vis/OnlineCullingCHC/src/VisibilityManager.cpp
r2278 r2280 4 4 #include "FrustumCullingManager.h" 5 5 #include "DummyPreprocessingManager.h" 6 #include "DummyQueryManager.h"7 6 #include "RandomUpdateCullingManager.h" 7 #include "CullingLogManager.h" 8 8 9 9 10 namespace GtpVisibility { … … 33 34 delete mCullingManager; 34 35 delete mPreprocessingManager; 36 CullingLogManager::DelSingleton(); 35 37 } 36 38 //----------------------------------------------------------------------- … … 65 67 66 68 default: 67 mCullingManager = new StopAndWaitCullingManager();69 mCullingManager = new CoherentHierarchicalCullingManager(mAssumedVisibilityForChc); 68 70 break; 69 71 70 72 } 71 73 74 ///////// 72 75 //-- set threshold 73 mCullingManager->SetVisibilityThreshold(mVisibilityThreshold); 76 mCullingManager->SetVisibilityThreshold(mVisibilityThreshold); 74 77 } 75 78 }
Note: See TracChangeset
for help on using the changeset viewer.