Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3807 in orxonox.OLD for orxonox/trunk/src


Ignore:
Timestamp:
Apr 13, 2005, 9:12:08 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: now the SkyBox is ok, there was something wrong with the transformations, copied the draw function from skysphere

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

Legend:

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

    r3806 r3807  
    138138  this->rebuild();
    139139}
     140
     141/**
     142   \brief draws the SkyBox
     143*/
     144void SkyBox::draw()
     145{
     146  glPushMatrix();
     147  glMatrixMode(GL_MODELVIEW);
     148  Vector r = this->getAbsCoor();
     149  glTranslatef(r.x, r.y, r.z);
     150
     151  this->model->draw();
     152
     153  glPopMatrix();
     154}
     155
    140156
    141157/**
  • orxonox/trunk/src/world_entities/skybox.h

    r3803 r3807  
    1717class Vector;
    1818
    19 //! A Class to handle a Skybox
     19//! A Class to handle a SkyBox
    2020class SkyBox : public WorldEntity
    2121{
    22 
    2322 public:
    2423  SkyBox(char* fileName = NULL);
     
    2928  void setTextures(const char* top, const char* bottom, const char* left, const char* right, const char* front, const char* back);
    3029
     30  virtual void draw();
     31
    3132 private:
    3233  void rebuild();
    33  
    3434
    35   Material **material;    //!< A Material for the Skybox.
    36   float size;       //!< Radius of the Skybox. This should match the frustum maximum range.
     35  Material **material;    //!< Materials for the SkyBox. sorted by number (0-5) top, bottom, left, right, front, back
     36  float size;             //!< Size of the SkyBox. This should match the frustum maximum range.
    3737   
    3838};
Note: See TracChangeset for help on using the changeset viewer.