- Timestamp:
- 08/04/06 17:38:52 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreKdTreeSceneManager.cpp
r1182 r1183 59 59 60 60 mHierarchyInterface = new KdTreeHierarchyInterface(this, mDestRenderSystem); 61 62 // test 63 //String chc = "CHC"; 64 //setOption("RenderMethod", &chc); 61 65 } 62 66 … … 240 244 return true; 241 245 } 246 else if (strKey == "ShowNodeAABB") 247 { 248 bool sn = *static_cast<const bool *>(pValue); 249 if (mKdTree) 250 mKdTree->setShowNodeAABB(sn); 251 return true; 252 } 253 // options for CHC 254 if (strKey == "UseDepthPass") 255 { 256 mUseDepthPass = (*static_cast<const bool *>(pValue)); 257 return true; 258 } 259 if (strKey == "PrepareVisualization") 260 { 261 mShowVisualization = (*static_cast<const bool *>(pValue)); 262 return true; 263 } 264 if (strKey == "RenderNodesForViz") 265 { 266 mRenderNodesForViz = (*static_cast<const bool *>(pValue)); 267 return true; 268 } 269 if (strKey == "RenderNodesContentForViz") 270 { 271 mRenderNodesContentForViz = (*static_cast<const bool *>(pValue)); 272 return true; 273 } 274 if (strKey == "SkyBoxEnabled") 275 { 276 mSkyBoxEnabled = (*static_cast<const bool *>(pValue)); 277 return true; 278 } 279 if (strKey == "SkyPlaneEnabled") 280 { 281 mSkyPlaneEnabled = (*static_cast<const bool *>(pValue)); 282 return true; 283 } 284 if (strKey == "SkyDomeEnabled") 285 { 286 mSkyDomeEnabled = (*static_cast<const bool *>(pValue)); 287 return true; 288 } 289 if (strKey == "VisualizeCulledNodes") 290 { 291 mVisualizeCulledNodes = (*static_cast<const bool *>(pValue)); 292 return true; 293 } 294 if (strKey == "DelayRenderTransparents") 295 { 296 mDelayRenderTransparents = (*static_cast<const bool *>(pValue)); 297 return true; 298 } 299 300 if (strKey == "DepthWrite") 301 { 302 mEnableDepthWrite = (*static_cast<const bool *>(pValue)); 303 return true; 304 } 305 if (strKey == "UseItemBuffer") 306 { 307 mUseItemBuffer = (*static_cast<const bool *>(pValue)); 308 return true; 309 } 310 if (strKey == "ExecuteVertexProgramForAllPasses") 311 { 312 mExecuteVertexProgramForAllPasses = (*static_cast<const bool *>(pValue)); 313 return true; 314 } 315 if (strKey == "RenderTransparentsForItemBuffer") 316 { 317 mRenderTransparentsForItemBuffer = (*static_cast<const bool *>(pValue)); 318 return true; 319 } 320 242 321 243 322 return VisibilityOptionsManager(mVisibilityManager, mHierarchyInterface) … … 270 349 else if (strKey == "ShowAllBoxes") 271 350 { 272 *static_cast<bool *>(pDestValue) = mShowAllBoxes; 351 if (mRenderMethod == KdTree::KDRM_INTERNAL) 352 *static_cast<bool *>(pDestValue) = mShowAllBoxes; 353 else 354 *static_cast<bool *>(pDestValue) = mVisualizeCulledNodes; 273 355 return true; 274 356 } … … 308 390 return false; 309 391 } 392 return true; 393 } 394 else if (strKey == "ShowKdTree") 395 { 396 *static_cast<bool *>(pDestValue) = mShowBoxes; 397 return true; 398 } 399 else if (strKey == "ShowNodeAABB") 400 { 401 if (mKdTree) 402 *static_cast<bool *>(pDestValue) = mKdTree->getShowNodeAABB(); 403 else 404 *static_cast<bool *>(pDestValue) = false; 310 405 return true; 311 406 } … … 331 426 refKeys.push_back("RenderMethod"); 332 427 refKeys.push_back("ShowKdTree"); 428 refKeys.push_back("ShowNodeAABB"); 333 429 refKeys.push_back("TreeBox"); 334 430 #ifdef KDTREE_DEBUG … … 639 735 while (it != end) 640 736 { 641 (*it)->queueObjects(cam, getRenderQueue(), onlyShadowCasters); 737 if (!(*it)->isQueued(mHierarchyInterface->GetFrameId(), cam)) 738 { 739 (*it)->queueObjects(cam, getRenderQueue(), onlyShadowCasters); 740 } 642 741 it++; 643 742 } … … 841 940 } 842 941 // add bounding boxes of rendered objects 843 if (0)942 //if (0) 844 943 //for (BoxList::iterator it = mBoxes.begin(); it != mBoxes.end(); ++it) 845 944 //{
Note: See TracChangeset
for help on using the changeset viewer.