Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 28, 2005, 8:24:43 PM (20 years ago)
Author:
bensch
Message:

orxonox/branches/ll2trunktemp: tested loading of a different WorldEntity (SkyBox) and it works.

Location:
orxonox/branches/ll2trunktemp/src/world_entities
Files:
2 edited

Legend:

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

    r3913 r4005  
    2828
    2929#include "skybox.h"
     30
    3031#include "stdincl.h"
     32#include "factory.h"
    3133
    3234#include "material.h"
     
    3638//#include "world_entity.h"
    3739
     40CREATE_FACTORY(SkyBox);
    3841
    3942using namespace std;
     
    4447*/
    4548SkyBox::SkyBox(char* fileName)
     49{
     50  this->init();
     51}
     52
     53SkyBox::SkyBox(TiXmlElement* root) : WorldEntity(root)
     54{
     55  this->init();
     56
     57  // Name Setup
     58  char* temp;
     59  const char* string;
     60
     61  // Model Loading     
     62  this->model = NULL;
     63  string = grabParameter( root, "materialset");
     64  if( string != NULL)
     65    this->setTexture(string, "jpg");
     66  else
     67    {
     68      PRINTF(0)("SkyBox is missing a proper 'MaterialSet'\n");
     69      this->model = (Model*)ResourceManager::getInstance()->load("cube", OBJ, RP_CAMPAIGN);
     70    }
     71  if( this->model == NULL)
     72    {
     73      PRINTF(0)("SkyBox model '%s' could not be loaded\n", string);
     74    }
     75}
     76
     77void SkyBox::init(void)
    4678{
    4779  this->setClassName("SkyBox");
  • orxonox/branches/ll2trunktemp/src/world_entities/skybox.h

    r3807 r4005  
    2222 public:
    2323  SkyBox(char* fileName = NULL);
     24  SkyBox(TiXmlElement* root);
     25
    2426  virtual ~SkyBox();
     27
     28  void init(void);
    2529
    2630  void setSize(float size);
Note: See TracChangeset for help on using the changeset viewer.