Changeset 4607 in orxonox.OLD for orxonox/trunk/src
- Timestamp:
- Jun 12, 2005, 7:12:40 PM (19 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/story_entities/world.cc
r4600 r4607 396 396 if( element->Value() != NULL && !strcmp( element->Value(), "Player")) localPlayer = (Player*) created; 397 397 if( element->Value() != NULL && !strcmp( element->Value(), "SkyBox")) sky = (SkyBox*) created; 398 if( element->Value() != NULL && !strcmp( element->Value(), "Terrain")) terrain = (Terrain*) created; 398 399 element = element->NextSiblingElement(); 399 400 glmis->step(); //! \todo temporary … … 444 445 // lightMan->setDiffuseColor(0,0,0); 445 446 //lightMan->debug(); 446 lightMan->setPosition(-5.0, 10.0, -40.0); 447 lightMan->setPosition(-5.0, 50.0, -40.0); 448 lightMan->addLight(); 449 lightMan->setPosition(100, 80, 60); 447 450 448 451 // trackManager->setBindSlave(env); … … 467 470 //trackManager->debug(2); 468 471 glEndList(); 469 470 terrain = new Terrain("worlds/newGround.obj");471 terrain->setRelCoor(Vector(0,-10,0));472 this->spawn(terrain);473 472 474 473 SoundEngine::getInstance()->setListener(this->localCamera); -
orxonox/trunk/src/world_entities/terrain.cc
r4597 r4607 16 16 17 17 #include "terrain.h" 18 #include "stdincl.h" 18 19 19 #include "model.h" 20 20 #include "vector.h" 21 21 #include "glincl.h" 22 22 23 #include "factory.h" 24 #include "load_param.h" 25 23 26 using namespace std; 24 27 28 CREATE_FACTORY(Terrain); 25 29 26 30 /** … … 28 32 29 33 */ 30 Terrain::Terrain ( )34 Terrain::Terrain (const TiXmlElement* root) 31 35 { 32 36 this->init(); 37 this->loadParams(root); 33 38 } 34 39 … … 68 73 69 74 */ 70 Terrain::~Terrain ( )75 Terrain::~Terrain (void) 71 76 { 72 77 if (objectList) … … 82 87 } 83 88 84 89 void Terrain::loadParams(const TiXmlElement* root) 90 { 91 static_cast<WorldEntity*>(this)->loadParams(root); 92 93 //LoadParam<Terrain>(root, "DebugTerrain", ); 94 95 96 } 85 97 86 98 void Terrain::draw () -
orxonox/trunk/src/world_entities/terrain.h
r4597 r4607 14 14 15 15 // FORWARD DEFINITION \\ 16 class TiXmlElement; 16 17 17 18 //! A simple method to call a desired debug world. … … 24 25 25 26 public: 26 Terrain( );27 Terrain(const TiXmlElement* root = NULL); 27 28 Terrain(const char* fileName); 28 29 Terrain(DebugTerrain debugTerrain); 29 virtual ~Terrain(); 30 void init(); 30 virtual ~Terrain(void); 31 32 void init(void); 33 void loadParams(const TiXmlElement* root); 31 34 32 35 void buildDebugTerrain(DebugTerrain debugTerrain);
Note: See TracChangeset
for help on using the changeset viewer.