Changeset 2283 for GTP/trunk/Lib/Vis/OnlineCullingCHC
- Timestamp:
- 03/23/07 01:40:24 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/OnlineCullingCHC
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionCullingSceneManager.cpp
r2280 r2283 2025 2025 return; 2026 2026 } 2027 Ogre::LogManager::getSingleton().logMessage("here99"); 2027 2028 2028 Root::getSingleton()._setCurrentSceneManager(this); 2029 2029 mActiveQueuedRenderableVisitor->targetSceneMgr = this; -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOctreeHierarchyInterface.cpp
r2281 r2283 62 62 63 63 std::vector<Octree *> nodes; 64 65 //LogManager::getSingleton().logMessage("***"); 64 nodes.reserve(8); 65 66 66 for (int i = 0; i < 8; ++ i) 67 67 { … … 70 70 int z = i & 1; 71 71 72 //std::stringstream d; d << x << " " << y << " " << z; 73 //Ogre::LogManager::getSingleton().logMessage(d.str()); 74 72 75 if ((child = octree->mChildren[x][y][z]) != NULL) 73 76 { … … 76 79 } 77 80 81 //std::stringstream str; str << "nodes: " << nodes.size(); 82 //Ogre::LogManager::getSingleton().logMessage(str.str()); 83 78 84 if (nodes.empty()) 79 85 return NULL; 80 86 81 int r = (int) (rand() * (float)nodes.size()); 87 int r = (int)(((float)rand() / RAND_MAX) * ((float)nodes.size() - 0.5f)); 88 89 //std::stringstream str2; 90 //str2 << "rand: " << r; 91 //Ogre::LogManager::getSingleton().logMessage(str2.str()); 82 92 83 93 return GetRandomLeaf(nodes[r]); … … 101 111 if (!octree->mNodes.empty()) 102 112 { 113 RenderNodeRecursive(node); 114 } 115 116 /* 103 117 // render everything from here 104 118 if (octree->isOctreeFullyVisible()) … … 133 147 mDistanceQueue->push(nextChild); 134 148 } 149 */ 135 150 } 136 151 //----------------------------------------------------------------------- … … 206 221 207 222 Octree *nextChild; 208 //LogManager::getSingleton().logMessage("***");223 209 224 for (int i = 0; i < 8; ++ i) 210 225 { … … 212 227 int y = (i & 2) / 2; 213 228 int z = i & 1; 214 Ogre::LogManager::getSingleton().logMessage("y"); 215 //std::stringstream d; d << "x " << x << " y " << y << " z " << z; 216 //LogManager::getSingleton().logMessage(d.str()); 217 218 if ((nextChild = octant->mChildren[x][y][z]) != NULL) 229 230 if ((nextChild = octant->mChildren[x][y][z]) != NULL) 219 231 { 220 232 DetermineFullVisibility(nextChild); -
GTP/trunk/Lib/Vis/OnlineCullingCHC/src/RandomUpdateCullingManager.cpp
r2281 r2283 33 33 ///////////// 34 34 //-- PART 1: process finished occlusion queries 35 35 //mHierarchyInterface->TraverseNode2(mHierarchyInterface->GetHierarchyRoot()); 36 //return; 37 36 38 while (!mHierarchyInterface->GetQueue()->empty() || !queryQueue.empty()) 37 39 { … … 108 110 continue; 109 111 } 110 if (mHierarchyInterface->IsLeaf(node)) 111 { 112 if (mHierarchyInterface->IsNodeVisible(node)) 113 CullingLogManager::GetSingleton()->LogMessage("u"); 114 else 115 CullingLogManager::GetSingleton()->LogMessage("g"); 116 } 117 112 118 113 if (mHierarchyInterface->IsNodeFullyVisible(node)) 119 114 { 120 CullingLogManager::GetSingleton()->LogMessage("here8");121 115 // node fully visible => test only random leaves 122 116 for (int i = 0; i < mRandomCandidates; ++ i) 123 117 { 124 CullingLogManager::GetSingleton()->LogMessage("z");125 118 HierarchyNode *randomLeaf = mHierarchyInterface->GetRandomLeaf(node); 126 CullingLogManager::GetSingleton()->LogMessage("c");119 127 120 if (!randomLeaf) 128 121 continue; … … 136 129 queryQueue.push(QueryPair(node, 137 130 mHierarchyInterface->IssueNodeOcclusionQuery(node))); 138 139 CullingLogManager::GetSingleton()->LogMessage("a");140 mHierarchyInterface->TraverseNode2(node);141 CullingLogManager::GetSingleton()->LogMessage("b");142 131 } 132 133 mHierarchyInterface->TraverseNode2(node); 143 134 144 135 continue;
Note: See TracChangeset
for help on using the changeset viewer.