Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 21, 2005, 11:17:18 PM (19 years ago)
Author:
bensch
Message:

orxonox/branches/levelLoader: some issues, to be able to describe what is loadable

Location:
orxonox/branches/levelLoader/src/world_entities
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/levelLoader/src/world_entities/skybox.cc

    r4250 r4251  
    4949  this->preInit();
    5050
     51  this->load(root);
     52
     53  this->postInit();
     54}
     55
     56void SkyBox::load(TiXmlElement* root)
     57{
    5158  LoadParam<SkyBox>(root, "Materialset", this, &SkyBox::setTexture);
    52 
    53   this->postInit();
    5459}
    5560
     
    208213  this->skyModel->addFace (4, VERTEX_TEXCOORD_NORMAL, 0,0,0, 1,1,0, 3,2,0, 2,3,0); // right
    209214  this->skyModel->setMaterial(material[4]);
    210   this->skyModel->addFace (4, VERTEX_TEXCOORD_NORMAL, 1,0,5, 7,1,5, 5,2,5, 3,3,6); // front
     215  this->skyModel->addFace (4, VERTEX_TEXCOORD_NORMAL, 1,0,5, 7,1,5, 5,2,5, 3,3,5); // front
    211216  this->skyModel->setMaterial(material[5]);
    212217  this->skyModel->addFace (4, VERTEX_TEXCOORD_NORMAL, 6,0,4, 0,1,4, 2,2,4, 4,3,4); // back
  • orxonox/branches/levelLoader/src/world_entities/skybox.h

    r4249 r4251  
    2626  virtual ~SkyBox();
    2727
     28  void load(TiXmlElement* root);
     29
    2830  void preInit(void);
    2931  void postInit(void);
  • orxonox/branches/levelLoader/src/world_entities/world_entity.cc

    r4240 r4251  
    2626
    2727/**
    28    \brief standard constructor
    29 */
    30 WorldEntity::WorldEntity ()
     28   \brief Loads the WordEntity-specific Part of any derived Class
     29*/
     30WorldEntity::WorldEntity(TiXmlElement* root)
    3131{
    3232  this->setClassName ("WorldEntity");
     33  this->model = NULL;
     34
     35  if (root)
     36    this->load(root);
     37
    3338  this->bDraw = true;
    34   this->model = NULL;
    35   //  collisioncluster = NULL;
    36 }
    37 
    38 /**
    39    \brief Loads the WordEntity-specific Part of any derived Class
    40 */
    41 WorldEntity::WorldEntity(TiXmlElement* root)
    42 {
    43   this->setClassName ("WorldEntity");
    44   // Name Setup
     39}
     40
     41void WorldEntity::load(TiXmlElement* root)
     42{
     43  // name setup
    4544  LoadParam<WorldEntity>(root, "name", this, &WorldEntity::setName);
     45
    4646  // Model Loading     
    47   this->model = NULL;
    4847  LoadParam<WorldEntity>(root, "model", this, &WorldEntity::loadModel);
    49 
    50   this->bDraw = true;
    5148}
    5249
  • orxonox/branches/levelLoader/src/world_entities/world_entity.h

    r4239 r4251  
    2323
    2424 public:
    25   WorldEntity (void);
    26   WorldEntity(TiXmlElement* root);
     25  WorldEntity(TiXmlElement* root = NULL);
    2726  virtual ~WorldEntity ();
    2827
     28  void load(TiXmlElement* root);
    2929  void loadModel(const char* fileName);
    3030
Note: See TracChangeset for help on using the changeset viewer.