Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3507 in orxonox.OLD


Ignore:
Timestamp:
Mar 11, 2005, 9:40:48 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: finished work on porting Skysphere to WorldEntity

Location:
orxonox/trunk/src
Files:
3 edited

Legend:

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

    r3502 r3507  
    222222            this->localCamera->bind (myPlayer);
    223223            this->localPlayer->addChild (this->localCamera);
     224            /*monitor progress*/
     225            this->glmis->step();           
    224226
    225227            // Create SkySphere
  • orxonox/trunk/src/world_entities/skysphere.cc

    r3502 r3507  
    4141}
    4242
     43
    4344/**
    4445   \brief Constructs a SkySphere and takes fileName as a map.
     
    4950  initialize(fileName);
    5051}
     52
    5153
    5254/**
     
    5961  free(sphereObj);
    6062}
     63
    6164
    6265/**
     
    7982
    8083/**
    81    \brief sets the Radius of the Sphere.
    82    \param radius The Radius of The Sphere
    83 */
    84 void Skysphere::setRadius(float radius)
    85 {
    86   this->sphereRadius = radius;
    87 }
    88 
    89 
    90 /**
    9184   \brief Defines which texture should be loaded onto the skysphere.
    9285   \param fileName The filename of the Texture
     
    9790}
    9891
    99 
    100 /**
    101    \brief updates the position of the Skysphere
    102    \param sphereCenter The coordinate of the Center of the Sphere
    103    
    104    This is normally done in the update-phase of world, so the Skysphere is always centered at the Camera.
    105 */
    106 void Skysphere::updatePosition(Vector sphereCenter)
    107 {
    108   //this->sphereCenter = sphereCenter; /* absolete */
    109   this->absCoordinate = sphereCenter;
    110 }
    111 
    112 
    113 void Skysphere::tick(float time)
    114 {}
    11592
    11693/**
     
    124101  skyMaterial->select();
    125102  glPushMatrix();
    126   //glTranslatef(this->sphereCenter.x,this->sphereCenter.y,this->sphereCenter.z); /* absolete */
    127  
    128103  glTranslatef(this->absCoordinate.x,
    129104               this->absCoordinate.y,
    130105               this->absCoordinate.z);
    131    
    132106
    133   glRotatef(-30, 1, 0, 0);
    134   glRotatef(95.0f, 0.0f, 0.0f, 1.0f);
    135   glRotatef(-250.0f, 0.0, 1.0f, 0.0f);
     107  //glRotatef(-30, 1, 0, 0);
     108  //glRotatef(95.0f, 0.0f, 0.0f, 1.0f);
     109  //glRotatef(-250.0f, 0.0, 1.0f, 0.0f);
    136110 
    137111  gluSphere(sphereObj, sphereRadius, 20, 20);
     
    139113  glDisable(GL_TEXTURE_2D);
    140114}
     115
     116
     117/**
     118   \brief sets the Radius of the Sphere.
     119   \param radius The Radius of The Sphere
     120*/
     121void Skysphere::setRadius(float radius)
     122{
     123  this->sphereRadius = radius;
     124}
  • orxonox/trunk/src/world_entities/skysphere.h

    r3502 r3507  
    3333  void setTexture(char* fileName);
    3434
    35   void updatePosition(Vector sphereCenter);
    36 
    3735  virtual void draw();
    38   virtual void tick(float time);
    3936
    4037 private:
    4138  GLUquadricObj *sphereObj; //!< A Placeholder for the SkySphere.
    4239  Material *skyMaterial;    //!< A Material for the SkySphere.
    43 
    44   Vector sphereCenter;      //!< Center of the SkySphere.
    4540  float sphereRadius;       //!< Radius of the SkySphere. This should match the frustum maximum range.
    46 
    47 
     41   
    4842  void initialize(char* fileName); 
    4943};
Note: See TracChangeset for help on using the changeset viewer.