Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Oct 11, 2005, 1:26:29 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: fixed missing link

Location:
trunk/src/world_entities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/environment.cc

    r5357 r5361  
    2525#include "objModel.h"
    2626#include "obb_tree.h"
     27#include "factory.h"
    2728
    2829using namespace std;
    29 
     30CREATE_FACTORY(Environment);
    3031
    3132/**
     
    3435Environment::Environment () : WorldEntity()
    3536{
    36   this->setClassID(CL_ENVIRONMENT, "Environment");
     37  this->init();
    3738  this->loadModel("models/ships/bolido.obj");
    3839
     
    4142}
    4243
     44/**
     45 * create an environment out of a XML-element
     46 * @param root the XML-element to load the Environment from
     47 */
     48Environment::Environment(const TiXmlElement* root)
     49{
     50  this->init();
     51  if (root != NULL)
     52    this->loadParams(root);
     53}
    4354
    4455/**
     
    4758Environment::~Environment ()
    4859{}
     60
     61/**
     62 * initialize an Environment
     63 */
     64void Environment::init()
     65{
     66  this->setClassID(CL_ENVIRONMENT, "Environment");
     67}
     68
     69/**
     70 * loads the Settings of an Environment from an XML-element.
     71 * @param root the XML-element to load the ELements properties from
     72 */
     73void Environment::loadParams(const TiXmlElement* root)
     74{
     75  static_cast<WorldEntity*>(this)->loadParams(root);
     76}
    4977
    5078
  • trunk/src/world_entities/environment.h

    r5047 r5361  
    2020 public:
    2121  Environment ();
     22  Environment (const TiXmlElement* root);
    2223  virtual ~Environment ();
     24
     25  void init();
     26  void loadParams(const TiXmlElement* root);
     27
    2328
    2429
Note: See TracChangeset for help on using the changeset viewer.