Changeset 346 for trunk/VUT/work
- Timestamp:
- 10/21/05 20:28:11 (19 years ago)
- Location:
- trunk/VUT/work/TestCullingTerrain
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/work/TestCullingTerrain/TerrainFrameListener.cpp
r345 r346 52 52 0.03, 53 53 //0.1, 54 0.0 454 0.03 55 55 }; 56 56 … … 423 423 424 424 // clamp camera so we always walk along the terrain 425 mApplication->Clamp2Terrain(mCamNode, 10);425 mApplication->Clamp2Terrain(mCamNode, 5); 426 426 break; 427 427 -
trunk/VUT/work/TestCullingTerrain/TestCullingTerrainApplication.cpp
r345 r346 297 297 298 298 mTerrainMinPos = EntityState::msMinPos = Vector3(0, 0, 0); 299 mTerrainMaxPos = EntityState::msMaxPos = Vector3( 3000, 5000, 3000);299 mTerrainMaxPos = EntityState::msMaxPos = Vector3(5000, 5000, 5000); 300 300 301 301 mTerrainContentGenerator = new TerrainContentGenerator(mSceneMgr); 302 302 303 303 // if no objects in file, we generate new objects 304 //if (!mTerrainContentGenerator->LoadObjects("objects.out"))305 //{304 if (!mTerrainContentGenerator->LoadObjects("objects.out")) 305 { 306 306 // the objects are generated randomly distributed over the terrain 307 generateScene( 900, 0); // create soldiers, trees, ninjas308 generateScene( 500, 1);309 generateScene( 100, 2);310 //}307 generateScene(1000, 0); // create soldiers, trees, ninjas 308 generateScene(1000, 1); 309 generateScene(200, 2); 310 } 311 311 312 312 // no limitations on height => it is possible for the user to put single … … 319 319 float val = TerrainFrameListener::msObjectScales[objectType]; 320 320 Vector3 scale(val, val, val); 321 321 const float maxHeight = 100; 322 322 // to provide much occlusion, 323 323 // height is restricted to 50 => no objects are created on peaks 324 324 mTerrainContentGenerator->SetMinPos(Vector3(mTerrainMinPos)); 325 mTerrainContentGenerator->SetMaxPos(Vector3(mTerrainMaxPos.x, 75.0f, mTerrainMaxPos.z));325 mTerrainContentGenerator->SetMaxPos(Vector3(mTerrainMaxPos.x, maxHeight, mTerrainMaxPos.z)); 326 326 std::stringstream d; d << "objscale: " << scale[0]; 327 327 Ogre::LogManager::getSingleton().logMessage(d.str());
Note: See TracChangeset
for help on using the changeset viewer.