Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 12, 2005, 1:26:46 PM (20 years ago)
Author:
bensch
Message:

orxonox/branches/trackManager: merged trunk back to trackManager (again)
merged with command:
svn merge ../trunk/ trackManager/ -r 3498:HEAD
no conflicts

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

Legend:

Unmodified
Added
Removed
  • orxonox/branches/trackManager/src/world_entities/skysphere.cc

    r3498 r3519  
    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
     
    9588{
    9689  this->skyMaterial->setDiffuseMap(fileName);
    97 }
    98 
    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;
    10990}
    11091
     
    120101  skyMaterial->select();
    121102  glPushMatrix();
    122   glTranslatef(this->sphereCenter.x,this->sphereCenter.y,this->sphereCenter.z);
    123  
    124   glRotatef(-30, 1, 0, 0);
    125   glRotatef(95.0f, 0.0f, 0.0f, 1.0f);
    126   glRotatef(-250.0f, 0.0, 1.0f, 0.0f);
     103  glTranslatef(this->absCoordinate.x,
     104               this->absCoordinate.y,
     105               this->absCoordinate.z);
     106
     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);
    127110 
    128111  gluSphere(sphereObj, sphereRadius, 20, 20);
     
    130113  glDisable(GL_TEXTURE_2D);
    131114}
     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/branches/trackManager/src/world_entities/skysphere.h

    r3498 r3519  
    1515/* INCLUDES */
    1616#include "p_node.h"
     17#include "world_entity.h"
    1718
    1819/* FORWARD DEFINITION */
     
    2122
    2223//! A Class to handle a SkySphere
    23 class Skysphere : public PNode
     24class Skysphere : public WorldEntity
    2425{
    2526
     
    3233  void setTexture(char* fileName);
    3334
    34   void updatePosition(Vector sphereCenter);
    35   void draw();
     35  virtual void draw();
    3636
    3737 private:
    3838  GLUquadricObj *sphereObj; //!< A Placeholder for the SkySphere.
    3939  Material *skyMaterial;    //!< A Material for the SkySphere.
    40   Vector sphereCenter;      //!< Center of the SkySphere.
    4140  float sphereRadius;       //!< Radius of the SkySphere. This should match the frustum maximum range.
    42 
    43 
     41   
    4442  void initialize(char* fileName); 
    4543};
Note: See TracChangeset for help on using the changeset viewer.