- Timestamp:
- 07/13/05 18:28:40 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/work/TestCullingTerrain/TestCullingTerrainApplication.cpp
r164 r173 11 11 //#include "OgreRefAppWorld.h" 12 12 #include "TestCullingTerrainApplication.h" 13 13 #include "TerrainFrameListener.h" 14 14 15 15 #define WIN32_LEAN_AND_MEAN 16 16 #include <windows.h> 17 17 18 String currentObjectCaptions[] = 19 { 20 "robot", 21 "athene", 22 "ninja" 23 //"ogrehead" 24 }; 25 26 const float walk_duration = 10.0f; 27 const float wait_duration = 2.0f; 28 const float rotate_factor = 0.7f; 29 const float move_factor = 0.03; 30 31 /***************************************/ 32 /* EntityState implementation */ 33 /***************************************/ 18 19 /**********************************************/ 20 /* EntityState implementation */ 21 /**********************************************/ 22 23 34 24 Vector3 EntityState::msMinPos = Vector3::ZERO; 35 25 Vector3 EntityState::msMaxPos = Vector3::ZERO; … … 250 240 mSunLight->setCastShadows(true); 251 241 252 // set light angle not too s harp, otherwise shadows textures will be broken242 // set light angle not too small over the surface, otherwise shadows textures will be broken 253 243 Vector3 dir(0.5, 1, 0.5); 254 244 dir.normalise(); … … 288 278 mSceneMgr->getRootSceneNode()->createChildSceneNode()->attachObject(pPlaneEnt); */ 289 279 290 mSceneMgr->setShadowTextureSettings(1024, 2); 280 // Use 512x512 texture in GL since we can't go higher than the window res 281 mSceneMgr->setShadowTextureSettings(512, 2); 282 291 283 mSceneMgr->setShadowColour(ColourValue(0.5, 0.5, 0.5)); 292 284 … … 326 318 void TestCullingTerrainApplication::generateScene(int num, int objectType) 327 319 { 328 mTerrainContentGenerator->GenerateScene(num, currentObjectCaptions[objectType]); 320 Vector3 scale(TerrainFrameListener::msObjectScales[objectType], 321 TerrainFrameListener::msObjectScales[objectType], 322 TerrainFrameListener::msObjectScales[objectType]); 323 324 mTerrainContentGenerator->SetScale(scale); 325 mTerrainContentGenerator->SetOffset(TerrainFrameListener::msObjectTerrainOffsets[objectType]); 326 mTerrainContentGenerator->GenerateScene(num, TerrainFrameListener::msObjectCaptions[objectType]); 329 327 330 328 if (objectType != 0) // from our objects, only robot has animation phases … … 384 382 } 385 383 //----------------------------------------------------------------------- 386 String TestCullingTerrainApplication::getCurrentObjectCaption(int id)387 {388 return currentObjectCaptions[id];389 }390 //-----------------------------------------------------------------------391 384 void TestCullingTerrainApplication::chooseSceneManager() 392 385 {
Note: See TracChangeset
for help on using the changeset viewer.