Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4607 in orxonox.OLD for orxonox/trunk/src/world_entities


Ignore:
Timestamp:
Jun 12, 2005, 7:12:40 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: loading Terrain via XML

Location:
orxonox/trunk/src/world_entities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/world_entities/terrain.cc

    r4597 r4607  
    1616
    1717#include "terrain.h"
    18 #include "stdincl.h"
     18
    1919#include "model.h"
    2020#include "vector.h"
    2121#include "glincl.h"
    2222
     23#include "factory.h"
     24#include "load_param.h"
     25
    2326using namespace std;
    2427
     28CREATE_FACTORY(Terrain);
    2529
    2630/**
     
    2832
    2933*/
    30 Terrain::Terrain ()
     34Terrain::Terrain (const TiXmlElement* root)
    3135{
    3236  this->init();
     37  this->loadParams(root);
    3338}
    3439
     
    6873
    6974*/
    70 Terrain::~Terrain ()
     75Terrain::~Terrain (void)
    7176{
    7277  if (objectList)
     
    8287}
    8388
    84 
     89void Terrain::loadParams(const TiXmlElement* root)
     90{
     91  static_cast<WorldEntity*>(this)->loadParams(root);
     92
     93  //LoadParam<Terrain>(root, "DebugTerrain",  );
     94
     95
     96}
    8597
    8698void Terrain::draw ()
  • orxonox/trunk/src/world_entities/terrain.h

    r4597 r4607  
    1414
    1515// FORWARD DEFINITION \\
     16class TiXmlElement;
    1617
    1718//! A simple method to call a desired debug world.
     
    2425
    2526 public:
    26   Terrain();
     27  Terrain(const TiXmlElement* root = NULL);
    2728  Terrain(const char* fileName);
    2829  Terrain(DebugTerrain debugTerrain);
    29   virtual ~Terrain();
    30   void init();
     30  virtual ~Terrain(void);
     31
     32  void init(void);
     33  void loadParams(const TiXmlElement* root);
    3134
    3235  void buildDebugTerrain(DebugTerrain debugTerrain);
Note: See TracChangeset for help on using the changeset viewer.