Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3763 in orxonox.OLD


Ignore:
Timestamp:
Apr 8, 2005, 7:48:05 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: skySphere now added to WorldEntity-List

Location:
orxonox/trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/story_entities/world.cc

    r3752 r3763  
    329329            this->skySphere->setName("SkySphere");
    330330            this->localCamera->addChild(this->skySphere);
    331             this->skySphere->setMode(PNODE_MOVEMENT);
     331            this->spawn(this->skySphere);
    332332
    333333            /*monitor progress*/
     
    392392            skySphere = new Skysphere("../data/pictures/sky-replace.jpg");
    393393            this->localPlayer->addChild(this->skySphere);
    394 
     394            this->spawn(this->skySphere);
    395395            Vector* es = new Vector (20, 0, 0);
    396396            Quaternion* qs = new Quaternion ();
     
    437437            this->skySphere = new Skysphere("../data/pictures/sky-replace.jpg");
    438438            this->skySphere->setName("SkySphere");
     439            this->spawn(this->skySphere);
    439440            this->localCamera->addChild(this->skySphere);
    440441            this->skySphere->setMode(PNODE_MOVEMENT);
    441 
    442442            /*monitor progress*/
    443443            this->glmis->step();
     
    459459            thirdNode->setRelCoor(new Vector(2.0, 0.0, 0.0));
    460460            this->spawn(thirdNode);
    461 
    462461
    463462           
     
    740739 
    741740  glCallList (objectList);
    742   //! \todo skysphere is a WorldEntity and should be inside of the world-entity-list.
    743   skySphere->draw();
    744741
    745742  testFont->printText(0, 0, 1, "orxonox_" PACKAGE_VERSION);
  • orxonox/trunk/src/world_entities/skysphere.cc

    r3608 r3763  
    3838
    3939/**
    40    \brief Standart Constructor
    41 */
    42 Skysphere::Skysphere()
    43 
    44   this->initialize("../data/pictures/sky-replace.jpg");
    45 }
    46 
    47 
    48 /**
    4940   \brief Constructs a SkySphere and takes fileName as a map.
    5041   \param fileName the file to take as input for the skysphere
     
    5243Skysphere::Skysphere(char* fileName)
    5344{
    54   this->initialize(fileName);
     45  if (fileName == NULL)
     46    this->initialize("../data/pictures/sky-replace.jpg");
     47  else
     48    this->initialize(fileName);
    5549}
    5650
     
    7468  PRINTF(1)("initializing the Skysphere with Material %s.\n", fileName);
    7569  this->sphereObj = gluNewQuadric();
     70  this->setMode(PNODE_MOVEMENT);
     71
    7672  gluQuadricTexture(this->sphereObj, GL_TRUE);
    7773  this->setRadius(1900.0);
  • orxonox/trunk/src/world_entities/skysphere.h

    r3608 r3763  
    2525
    2626 public:
    27   Skysphere();
    28   Skysphere(char* fileName);
     27  Skysphere(char* fileName = NULL);
    2928  virtual ~Skysphere();
    3029  void destroy();
Note: See TracChangeset for help on using the changeset viewer.