- Timestamp:
- 07/03/07 14:28:12 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TestCullingTerrainApplication.cpp
r2455 r2501 229 229 mCamNode->attachObject(mCamera); 230 230 231 231 232 /////////////////// 232 233 //-- create visualization camera … … 436 437 // was terrain loaded? 437 438 mSceneMgr->getOption("ShowTerrain", &msShowHillyTerrain); 438 msShowHillyTerrain=true;439 440 439 441 440 // hack view point for terrain … … 638 637 float minVal = 999999999999; 639 638 639 // find next valid intersection 640 640 while (rit != qryResult.end() && rit->movable) 641 641 { 642 // camera is not a real world object 642 643 if (rit->movable->getName() != "PlayerCam") 643 644 { 644 // place on the groundobject645 // get the next intersection with a movable object 645 646 yVal = rit->movable->getWorldBoundingBox().getCenter().y; 646 if (yVal < minVal) 647 minVal = yVal; 648 649 //std::stringstream d; d << "dist: " << dist << endl; 650 //Ogre::LogManager() 647 648 if (yVal < minVal) 649 minVal = yVal; 650 651 651 success = true; 652 652 } … … 654 654 ++ rit; 655 655 } 656 657 // place on the ground object656 657 // place player on the ground object 658 658 if (success) 659 mCamNode->setPosition( 660 mCamNode->getPosition().x, 661 minVal + dist, 662 mCamNode->getPosition().z); 659 { 660 mCamNode->setPosition(mCamNode->getPosition().x, 661 minVal + dist, 662 mCamNode->getPosition().z); 663 } 663 664 664 665 OGRE_DELETE(raySceneQuery); … … 741 742 742 743 744 743 745 /**********************************************************************/ 744 746 /* VisualizationRenderTargetListener implementation */ 745 747 /**********************************************************************/ 746 748 747 748 749 //----------------------------------------------------------------------- 749 750 VisualizationRenderTargetListener::VisualizationRenderTargetListener(SceneManager *sceneMgr)
Note: See TracChangeset
for help on using the changeset viewer.