Changeset 2108 for GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE
- Timestamp:
- 02/09/07 03:05:52 (18 years ago)
- Location:
- GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TerrainFrameListener.cpp
r2106 r2108 235 235 // the scale factor for the visualized bounding boxes 236 236 mSceneMgr->setOption("NodeVizScale", &mVizScale); 237 237 238 ///////// 238 239 //-- set the current culling algorithm type 239 setAlgorithm(mApplication->mAlgorithm); 240 //setAlgorithm(mApplication->mAlgorithm); 241 242 bool isNormalExecution; 243 244 mSceneMgr->getOption("NormalExecution", &isNormalExecution); 245 if (isNormalExecution) 246 { 247 // no algorithm 248 mCurrentAlgorithm = 249 GtpVisibility::VisibilityEnvironment::NUM_CULLING_MANAGERS; 250 } 251 else 252 { 253 mSceneMgr->getOption("Algorithm", &mCurrentAlgorithm); 254 } 255 256 applyCurrentAlgorithm(); 257 258 /////////////////////////////// 240 259 241 260 // set scene manager options … … 481 500 // frame start time 482 501 mTimeFrameStarted = mTimer->getMilliseconds(); 483 //Ogre::LogManager::getSingleton().logMessage("Frame started");484 502 } 485 503 … … 517 535 { 518 536 mApplication->Clamp2Terrain(mCamNode, 5); 537 //Ogre::LogManager::getSingleton().logMessage("clamp to terrain"); 519 538 } 520 539 else 521 540 { 522 541 mApplication->Clamp2FloorPlane(mFloorDist); 542 //Ogre::LogManager::getSingleton().logMessage("clamp to floor"); 523 543 } 524 544 … … 526 546 527 547 default: 548 Ogre::LogManager::getSingleton().logMessage("should not come here"); 528 549 break; 529 550 }; -
GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TerrainFrameListener.h
r1607 r2108 78 78 //-- write out stats for recorded walkthrough 79 79 d << "Algorithm: " << algorithmName << "\n" 80 81 82 83 84 85 86 87 80 << "avg. FPS: " << avgFps << "\n" 81 << "best FPS: " << mBestFps << "\n" 82 << "worst FPS: " << mWorstFps << "\n" 83 << "#frames: " << mFrameCount << "\n" 84 << "avg. #triangles: " << avgTris << " M\n" 85 << "avg. #query culled nodes: " << avgFrustumCulledNodes << "\n" 86 << "avg. #frustum culled nodes: " << avgQueryCulledNodes << "\n" 87 << "avg. #rendered nodes: " << avgRenderedNodes << "\n"; 88 88 } 89 89 -
GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TestCullingTerrainApplication.cpp
r2106 r2108 217 217 if (!val.empty()) 218 218 mInitialPosition.z = atof( val.c_str()); 219 220 219 */ 220 221 221 /* val = config.getSetting("OnlineCullingAlgorithm"); 222 222 … … 457 457 loadConfig("terrainCulling.cfg"); 458 458 459 if ( !LoadScene(mFilename))459 if (0 && !LoadScene(mFilename)) 460 460 LogManager::getSingleton().logMessage("error loading scene"); 461 461 … … 499 499 if (1)//||msShowHillyTerrain) 500 500 { 501 mSceneMgr->getOption("ShowTerrain", &msShowHillyTerrain); 502 std::string terrain_cfg("terrainCulling.cfg"); 501 std::string terrain_cfg("terrainCulling.cfg"); 503 502 mSceneMgr->setWorldGeometry(terrain_cfg); 504 503 504 mSceneMgr->getOption("ShowTerrain", &msShowHillyTerrain); 505 505 } 506 506 … … 660 660 } 661 661 #else 662 if (msShowHillyTerrain) 663 { 664 mSceneMgr = mRoot->createSceneManager("OcclusionCullingSceneManager"); 665 //mSceneMgr = mRoot->createSceneManager("TerrainSceneManager"); 666 //mSceneMgr = mRoot->createSceneManager("KdTreeSceneManager"); 667 } 668 else 669 { 670 mSceneMgr = mRoot->createSceneManager("OcclusionCullingSceneManager"); 671 //mSceneMgr = mRoot->createSceneManager("OctreeSceneManager"); 672 //mSceneMgr = mRoot->createSceneManager("KdTreeSceneManager"); 673 } 674 662 663 mSceneMgr = mRoot->createSceneManager("OcclusionCullingSceneManager"); 664 //mSceneMgr = mRoot->createSceneManager("TerrainSceneManager"); 665 //mSceneMgr = mRoot->createSceneManager("KdTreeSceneManager"); 666 675 667 #endif 676 668 } … … 703 695 RaySceneQueryResult::iterator rit = qryResult.begin(); 704 696 bool success = false; 705 float yVal = 0; 706 float minVal = 999999999999; 697 698 float yVal = 0; 699 float minVal = 999999999999; 707 700 708 701 while (rit != qryResult.end() && rit->movable) … … 779 772 { 780 773 // terrain hack 781 msShowHillyTerrain = true;774 //msShowHillyTerrain = true; 782 775 LogManager::getSingleton().logMessage("error loading scene => load terrain"); 783 776 }
Note: See TracChangeset
for help on using the changeset viewer.