Changeset 2292 for GTP/trunk/Lib/Vis/OnlineCullingCHC/src
- Timestamp:
- 03/26/07 18:49:17 (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
r2289 r2292 11 11 SetAssumedVisibility(0); 12 12 // initialise random generator in case we use assumed visibility 13 srand(time(NULL));13 //srand(time(NULL)); 14 14 } 15 15 //----------------------------------------------------------------------- … … 19 19 SetAssumedVisibility(assumedVisibility); 20 20 // initialise random generator in case we use assumed visibility 21 srand(time(NULL));21 //srand(time(NULL)); 22 22 } 23 23 //----------------------------------------------------------------------- 24 24 void CoherentHierarchicalCullingManager::RenderScene() 25 25 { 26 CullingLogManager::GetSingleton()->LogMessage("chc");26 if (0) CullingLogManager::GetSingleton()->LogMessage("chc"); 27 27 QueryQueue queryQueue; 28 28 unsigned int visiblePixels = 0; … … 158 158 inline void CoherentHierarchicalCullingManager::SkipQuery(HierarchyNode *node) const 159 159 { 160 // 160 //-- set node to be visible in this frame, then traverse it 161 161 mHierarchyInterface->SetLastVisited(node, mHierarchyInterface->GetFrameId()); 162 162 -
GTP/trunk/Lib/Vis/OnlineCullingCHC/src/FrustumCullingManager.cpp
r2289 r2292 8 8 void FrustumCullingManager::RenderScene() 9 9 { 10 CullingLogManager::GetSingleton()->LogMessage("vfc");10 if (0) CullingLogManager::GetSingleton()->LogMessage("vfc"); 11 11 12 12 while (!mHierarchyInterface->GetQueue()->empty()) -
GTP/trunk/Lib/Vis/OnlineCullingCHC/src/RandomUpdateCullingManager.cpp
r2289 r2292 2 2 #include <time.h> 3 3 #include "CullingLogManager.h" 4 #include <vector> 5 //#include <iostream> 6 #include <sstream> 7 8 9 using namespace std; 4 10 5 11 … … 12 18 SetAssumedVisibility(0); 13 19 // initialise random generator in case we use assumed visibility 14 srand(time(NULL));20 //srand(time(NULL)); 15 21 16 22 mRandomCandidates = R_CANDIDATES; … … 22 28 SetAssumedVisibility(assumedVisibility); 23 29 // initialise random generator in case we use assumed visibility 24 srand(time(NULL));30 //srand(time(NULL)); 25 31 26 32 mRandomCandidates = R_CANDIDATES; … … 29 35 void RandomUpdateCullingManager::RenderScene() 30 36 { 31 CullingLogManager::GetSingleton()->LogMessage("ruc");37 if (0) CullingLogManager::GetSingleton()->LogMessage("ruc"); 32 38 33 39 QueryQueue queryQueue; … … 37 43 //-- PART 1: process finished occlusion queries 38 44 39 // update the fully visible classifications40 mHierarchyInterface->DetermineFullVisibility(mHierarchyInterface->GetHierarchyRoot());41 42 //mHierarchyInterface->TraverseNode2(mHierarchyInterface->GetHierarchyRoot());43 44 #if 145 45 while (!mHierarchyInterface->GetQueue()->empty() || !queryQueue.empty()) 46 46 { … … 121 121 if (mHierarchyInterface->IsNodeFullyVisible(node)) 122 122 { 123 #if 1 123 124 // node fully visible => test only random leaves 124 125 for (int i = 0; i < mRandomCandidates; ++ i) … … 138 139 mHierarchyInterface->IssueNodeOcclusionQuery(node))); 139 140 } 140 141 mHierarchyInterface->TraverseNode2(node); 141 #else 142 // test all leaves for visibility changes 143 HierarchyNodeContainer mynodes; 144 mHierarchyInterface->CollectLeaves(node, mynodes); 145 146 HierarchyNodeContainer::const_iterator nit, nit_end = mynodes.end(); 147 148 for (nit = mynodes.begin(); nit != nit_end; ++ nit) 149 { 150 HierarchyNode *leaf = *nit; 151 mHierarchyInterface->SetNodeVisible(leaf, false); 152 153 // update node's visited flag 154 mHierarchyInterface->SetLastVisited(leaf, mHierarchyInterface->GetFrameId()); 155 156 queryQueue.push(QueryPair(leaf, 157 mHierarchyInterface->IssueNodeOcclusionQuery(node))); 158 } 159 #endif 160 mHierarchyInterface->RenderNodeRecursive(node); 142 161 143 162 continue; … … 173 192 } 174 193 } 175 #endif 194 176 195 //while (!mHierarchyInterface->GetQueue()->empty()) 177 196 // mHierarchyInterface->GetQueue()->pop(); 178 197 198 // update the fully visible classifications 199 // TODO: this should be done during traversal! 200 mHierarchyInterface->DetermineFullVisibility(mHierarchyInterface->GetHierarchyRoot()); 179 201 } 180 202 //----------------------------------------------------------------------- -
GTP/trunk/Lib/Vis/OnlineCullingCHC/src/StopAndWaitCullingManager.cpp
r2289 r2292 7 7 void StopAndWaitCullingManager::RenderScene() 8 8 { 9 CullingLogManager::GetSingleton()->LogMessage("swc");9 if (0) CullingLogManager::GetSingleton()->LogMessage("swc"); 10 10 11 11 while (!mHierarchyInterface->GetQueue()->empty())
Note: See TracChangeset
for help on using the changeset viewer.