Changeset 1211 for GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src
- Timestamp:
- 08/17/06 18:04:15 (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
r1206 r1211 12 12 #include "OgreKdTreeSceneNode.h" 13 13 #include "OgreKdTreeSceneManager.h" 14 #include "OgreKdTreeCamera.h"15 14 16 15 #include <OgreStringConverter.h> … … 371 370 mBuildLog = LogManager::getSingleton().createLog(KDTREE_LOGNAME); 372 371 } 372 373 setEnhancedVis(false); 373 374 } 374 375 … … 1201 1202 //if (cam->isVisible(node->mAABB)) 1202 1203 if (fullVis || 1203 ((vis = cam->getVisibilityEnhanced(node->mAABB)) != KdTreeCamera::KDNV_NONE))1204 ((vis = (cam->*getVisibility)(node->mAABB)) != KdTreeCamera::KDNV_NONE)) 1204 1205 //((vis = (cam->*getVisibility)(node->mAABB)) != KdTreeCamera::KDNV_NONE)) 1205 1206 { … … 1219 1220 } 1220 1221 1221 ////------------------------------------------------------------------------- 1222 //------------------------------------------------------------------------- 1223 void KdTree::setEnhancedVis(bool enh) 1224 { 1225 if (enh) 1226 getVisibility = &KdTreeCamera::getVisibilityEnhanced; 1227 else 1228 getVisibility = &KdTreeCamera::getVisibilitySimple; 1229 } 1230 1231 //------------------------------------------------------------------------- 1232 bool KdTree::getEnhancedVis() 1233 { 1234 return getVisibility == &KdTreeCamera::getVisibilityEnhanced; 1235 } 1236 1237 //------------------------------------------------------------------------- 1222 1238 //void KdTree::findVisibleNodes(NodeList& visibleNodes, Camera * cam) 1223 1239 //{ -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreKdTreeSceneManager.cpp
r1206 r1211 80 80 } 81 81 82 void KdTreeSceneManager::setEnhancedVis(bool enhanced)83 {84 for (CameraList::iterator it = mCameras.begin(); it != mCameras.end(); it ++)85 {86 KDCAMPTR_CAST(it->second)->setEnhancedVisMode(enhanced);87 }88 }82 //void KdTreeSceneManager::setEnhancedVis(bool enhanced) 83 //{ 84 // for (CameraList::iterator it = mCameras.begin(); it != mCameras.end(); it ++) 85 // { 86 // KDCAMPTR_CAST(it->second)->setEnhancedVisMode(enhanced); 87 // } 88 //} 89 89 90 90 bool KdTreeSceneManager::setOption(const String& strKey, const void* pValue) … … 146 146 { 147 147 bool enh = *static_cast<const bool *>(pValue); 148 setEnhancedVis(enh); 148 if (mKdTree) 149 mKdTree->setEnhancedVis(enh); 150 //setEnhancedVis(enh); 149 151 return true; 150 152 } … … 355 357 else if (strKey == "EnhancedVisibility") 356 358 { 357 *static_cast<bool *>(pDestValue) = 358 KDCAMPTR_CAST(mCameras.begin()->second)->getEnhancedVisMode(); 359 if (mKdTree) 360 *static_cast<bool *>(pDestValue) = mKdTree->getEnhancedVis(); 361 //KDCAMPTR_CAST(mCameras.begin()->second)->getEnhancedVisMode(); 362 else 363 *static_cast<bool *>(pDestValue) = true; 364 return true; 359 365 } 360 366 else if (strKey == "BuildMethod")
Note: See TracChangeset
for help on using the changeset viewer.