Changeset 1250 for GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src
- Timestamp:
- 08/21/06 17:05:45 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreKdTree.cpp
r1211 r1250 1188 1188 bool showBoxes, KdTree::NodeList& visibleNodes) 1189 1189 { 1190 // debug 1191 //cam->mNumVisQueries = 0; 1192 1190 1193 if (mKdRoot) 1191 1194 recQueueVisibleObjects(mKdRoot, Root::getSingleton().getCurrentFrameNumber(), 1192 1195 cam, queue, onlyShadowCasters, showBoxes, visibleNodes); 1196 1197 //mBuildLog->logMessage("Frame # " + StringConverter::toString(Root::getSingleton().getCurrentFrameNumber()) + 1198 // " ," + StringConverter::toString(cam->mNumVisQueries) + " vis queries"); 1193 1199 } 1194 1200 … … 1207 1213 visibleNodes.push_back(node); 1208 1214 1209 node->queueVisibleObjects(currentFrame, cam, queue, onlyShadowCasters, showBoxes); 1210 1211 if (node->getLeftChild()) 1212 recQueueVisibleObjects(node->getLeftChild(), currentFrame, 1213 cam, queue, onlyShadowCasters, showBoxes, visibleNodes, 1214 (fullVis || vis == KdTreeCamera::KDNV_FULL) ? true : false); 1215 if (node->getRightChild()) 1216 recQueueVisibleObjects(node->getRightChild(), currentFrame, 1217 cam, queue, onlyShadowCasters, showBoxes, visibleNodes, 1218 (fullVis || vis == KdTreeCamera::KDNV_FULL) ? true : false); 1215 bool v = (fullVis || vis == KdTreeCamera::KDNV_FULL); 1216 node->queueVisibleObjects(currentFrame, cam, queue, onlyShadowCasters, showBoxes, v); 1217 1218 if (!v) 1219 { 1220 1221 if (node->getLeftChild()) 1222 recQueueVisibleObjects(node->getLeftChild(), currentFrame, 1223 cam, queue, onlyShadowCasters, showBoxes, visibleNodes, v); 1224 if (node->getRightChild()) 1225 recQueueVisibleObjects(node->getRightChild(), currentFrame, 1226 cam, queue, onlyShadowCasters, showBoxes, visibleNodes, v); 1227 } 1219 1228 } 1220 1229 } … … 1366 1375 //------------------------------------------------------------------------- 1367 1376 void KdTree::Leaf::queueVisibleObjects(unsigned long currentFrame, 1368 Camera* cam, RenderQueue* queue, bool onlyShadowCasters, bool showBoxes )1377 Camera* cam, RenderQueue* queue, bool onlyShadowCasters, bool showBoxes, bool fullVis) 1369 1378 { 1370 1379 KdRenderableList::iterator it = mKdRenderables.begin(); -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreKdTreeCamera.cpp
r1212 r1250 28 28 { 29 29 mEnhancedVisMode = enhanced; 30 //if (mEnhancedVisMode)31 // getVisibility = getVisibilityEnhanced;32 //else33 // getVisibility = getVisibilitySimple;34 30 } 35 31 … … 43 39 KdTreeCamera::NodeVisibility KdTreeCamera::getVisibilityEnhanced(const AxisAlignedBox& box) const 44 40 { 41 //++ mNumVisQueries; 45 42 // Null boxes always invisible 46 43 if ( box.isNull() ) … … 101 98 KdTreeCamera::NodeVisibility KdTreeCamera::getVisibilitySimple(const AxisAlignedBox& box) const 102 99 { 100 //++ mNumVisQueries; 101 103 102 // dummy 104 103 FrustumPlane* culledBy = 0;
Note: See TracChangeset
for help on using the changeset viewer.