Changeset 2287 for GTP/trunk/Lib/Vis/OnlineCullingCHC/src
- Timestamp:
- 03/23/07 18:10:25 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/OnlineCullingCHC/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/OnlineCullingCHC/src/CoherentHierarchicalCullingManager.cpp
r2280 r2287 1 1 #include "CoherentHierarchicalCullingManager.h" 2 #include "CullingLogManager.h" 3 2 4 #include <time.h> 3 5 … … 22 24 void CoherentHierarchicalCullingManager::RenderScene() 23 25 { 26 //CullingLogManager::GetSingleton()->LogMessage("chc"); 24 27 QueryQueue queryQueue; 25 28 unsigned int visiblePixels = 0; … … 37 40 mHierarchyInterface->GetQueue()->empty())) 38 41 { 39 42 HierarchyNode *node = queryQueue.front().first; 40 43 41 44 queryQueue.pop(); … … 74 77 if (!mHierarchyInterface->CheckFrustumVisible(node, intersects)) 75 78 { 76 ++ mNumFrustumCulledNodes; 79 ++ mNumFrustumCulledNodes; 80 77 81 if (mVisualizeCulledNodes) 78 82 { -
GTP/trunk/Lib/Vis/OnlineCullingCHC/src/CullingManager.cpp
r2280 r2287 16 16 { 17 17 } 18 19 20 18 //----------------------------------------------------------------------- 21 19 void CullingManager::SetHierarchyInterface(HierarchyInterface *hierarchyInterface) -
GTP/trunk/Lib/Vis/OnlineCullingCHC/src/RandomUpdateCullingManager.cpp
r2283 r2287 6 6 namespace GtpVisibility { 7 7 8 const static int R_CANDIDATES = 1; 8 9 //----------------------------------------------------------------------- 9 10 RandomUpdateCullingManager::RandomUpdateCullingManager() … … 13 14 srand(time(NULL)); 14 15 15 mRandomCandidates = 1;16 mRandomCandidates = R_CANDIDATES; 16 17 } 17 18 //----------------------------------------------------------------------- … … 23 24 srand(time(NULL)); 24 25 25 mRandomCandidates = 1;26 mRandomCandidates = R_CANDIDATES; 26 27 } 27 28 //----------------------------------------------------------------------- 28 29 void RandomUpdateCullingManager::RenderScene() 29 30 { 31 //CullingLogManager::GetSingleton()->LogMessage("random"); 32 30 33 QueryQueue queryQueue; 31 34 unsigned int visiblePixels = 0; … … 33 36 ///////////// 34 37 //-- PART 1: process finished occlusion queries 38 39 // update the fully visible classifications 40 mHierarchyInterface->DetermineFullVisibility(mHierarchyInterface->GetHierarchyRoot()); 41 35 42 //mHierarchyInterface->TraverseNode2(mHierarchyInterface->GetHierarchyRoot()); 36 //return;37 43 44 #if 1 38 45 while (!mHierarchyInterface->GetQueue()->empty() || !queryQueue.empty()) 39 46 { … … 84 91 if (!mHierarchyInterface->CheckFrustumVisible(node, intersects)) 85 92 { 86 ++ mNumFrustumCulledNodes; 93 ++ mNumFrustumCulledNodes; 94 87 95 if (mVisualizeCulledNodes) 88 96 { … … 127 135 mHierarchyInterface->GetFrameId()); 128 136 129 queryQueue.push(QueryPair( node,137 queryQueue.push(QueryPair(randomLeaf, 130 138 mHierarchyInterface->IssueNodeOcclusionQuery(node))); 131 139 } … … 165 173 } 166 174 } 167 168 // update the fully visible classifications 169 mHierarchyInterface->DetermineFullVisibility(mHierarchyInterface->GetHierarchyRoot()); 175 #endif 176 //while (!mHierarchyInterface->GetQueue()->empty()) 177 // mHierarchyInterface->GetQueue()->pop(); 178 170 179 } 171 180 //----------------------------------------------------------------------- -
GTP/trunk/Lib/Vis/OnlineCullingCHC/src/VisibilityManager.cpp
r2280 r2287 53 53 switch (ocmType) 54 54 { 55 case VisibilityEnvironment::STOP_AND_WAIT_CULLING:56 mCullingManager = new StopAndWaitCullingManager();57 break;58 59 55 case VisibilityEnvironment::COHERENT_HIERARCHICAL_CULLING: 60 56 mCullingManager = new CoherentHierarchicalCullingManager(mAssumedVisibilityForChc); … … 63 59 case VisibilityEnvironment::FRUSTUM_CULLING: 64 60 //mCullingManager = new FrustumCullingManager(); 65 mCullingManager = new RandomUpdateCullingManager(); 61 mCullingManager = new RandomUpdateCullingManager(); 62 break; 63 64 case VisibilityEnvironment::STOP_AND_WAIT_CULLING: 65 mCullingManager = new StopAndWaitCullingManager(); 66 //mCullingManager = new RandomUpdateCullingManager(); 66 67 break; 67 68
Note: See TracChangeset
for help on using the changeset viewer.