Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 18, 2005, 11:52:15 AM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: merged trunk back to levelloader
merged with command:
svn merge -r 3499:HEAD trunk branches/levelloader

Conflicts in
C track_manager.h
C world_entities/player.cc
C world_entities/player.h
C world_entities/environment.h
C lib/coord/p_node.cc
C defs/debug.h
C track_manager.cc
C story_entities/campaign.h

solved in merge-favouring. It was quite easy because Chris only worked on the headers, and he didi it quite clean. Thats the spirit :)

Conflits in world.cc are a MESS: fix it

File:
1 edited

Legend:

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

    r3499 r3605  
    2424*/
    2525
     26#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
     27
    2628#include "material.h"
    2729#include "skysphere.h"
     
    2931#include "vector.h"
    3032#include "world_entity.h"
    31 
    3233
    3334using namespace std;
     
    3839Skysphere::Skysphere()
    3940
    40   initialize("../data/pictures/sky-replace.jpg");
     41  this->initialize("../data/pictures/sky-replace.jpg");
    4142}
     43
    4244
    4345/**
     
    4749Skysphere::Skysphere(char* fileName)
    4850{
    49   initialize(fileName);
     51  this->initialize(fileName);
    5052}
     53
    5154
    5255/**
     
    5659{
    5760  PRINTF(3)("Deleting the SkySphere\n");
    58   delete skyMaterial;
    59   free(sphereObj);
     61  delete this->skyMaterial;
     62  free(this->sphereObj);
    6063}
    6164
     
    6972  this->sphereObj = gluNewQuadric();
    7073  gluQuadricTexture(this->sphereObj, GL_TRUE);
    71   this->setRadius(250.0);
     74  this->setRadius(1900.0);
    7275
    7376  this->skyMaterial = new Material("Sky");
     
    7578  this->skyMaterial->setIllum(3);
    7679  this->skyMaterial->setAmbient(1.0, 1.0, 1.0);
    77 }
    78 
    79 
    80 /**
    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;
    8780}
    8881
     
    9992
    10093/**
    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;
    109 }
    110 
    111 
    112 /**
    11394   \brief draws the Skysphere
    11495   
     
    11798void Skysphere::draw()
    11899{
    119   glEnable(GL_TEXTURE_2D);
     100  glPushMatrix();
     101  glMatrixMode(GL_MODELVIEW);
     102  glTranslatef(this->absCoordinate.x,
     103               this->absCoordinate.y,
     104               this->absCoordinate.z);
     105
     106  //glRotatef(-30, 1, 0, 0);
     107  //glRotatef(95.0f, 0.0f, 0.0f, 1.0f);
     108  //glRotatef(-250.0f, 0.0, 1.0f, 0.0f);
     109 
    120110  skyMaterial->select();
    121   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);
    127  
    128   gluSphere(sphereObj, sphereRadius, 20, 20);
     111  gluSphere(this->sphereObj, this->sphereRadius, 20, 20);
    129112  glPopMatrix();
    130   glDisable(GL_TEXTURE_2D);
    131113}
     114
     115
     116/**
     117   \brief sets the Radius of the Sphere.
     118   \param radius The Radius of The Sphere
     119*/
     120void Skysphere::setRadius(float radius)
     121{
     122  this->sphereRadius = radius;
     123}
Note: See TracChangeset for help on using the changeset viewer.