|
Last change
on this file since 3409 was
3409,
checked in by dave, 21 years ago
|
|
branches/dave/src: Ok, fehler behoben, jetzt kann man noch eigene Himmel einfuegen, je nach belieben:) enjoy./orxonox
|
|
File size:
858 bytes
|
| Line | |
|---|
| 1 | |
|---|
| 2 | /* Created by Dave, this file is actually quite similar to player.cc and so is |
|---|
| 3 | skybox.h similar to player.h |
|---|
| 4 | With that said, things should be clear:) |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | */ |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | #include "skybox.h" |
|---|
| 12 | #include "stdincl.h" |
|---|
| 13 | #include "vector.h" |
|---|
| 14 | #include "world_entity.h" |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 17 | using namespace std; |
|---|
| 18 | |
|---|
| 19 | Skybox::Skybox() |
|---|
| 20 | { |
|---|
| 21 | //GLUquadricObj *sphereObj=0; |
|---|
| 22 | sphereObj=gluNewQuadric(); |
|---|
| 23 | gluQuadricTexture(sphereObj,GL_TRUE); |
|---|
| 24 | |
|---|
| 25 | } |
|---|
| 26 | |
|---|
| 27 | Skybox::~Skybox(){} |
|---|
| 28 | |
|---|
| 29 | void Skybox::updatePosition(float x,float y,float z) |
|---|
| 30 | { |
|---|
| 31 | this->a=x; |
|---|
| 32 | this->b=y; |
|---|
| 33 | this->c=z; |
|---|
| 34 | } |
|---|
| 35 | |
|---|
| 36 | |
|---|
| 37 | void Skybox::draw() |
|---|
| 38 | { |
|---|
| 39 | |
|---|
| 40 | glPushMatrix(); |
|---|
| 41 | glTranslatef(this->a,this->b,this->c); |
|---|
| 42 | //glTranslatef(myplayer->absCoordinate.x,myplayer->absCoordinate.y,myplayer->absCoordinate.z); |
|---|
| 43 | glRotatef(-180.0f,0.0f,0.0f,1.0f); |
|---|
| 44 | glRotatef(0.0f,0.0,1.0f,0.0f); |
|---|
| 45 | gluSphere(sphereObj,200.0f,20,20); |
|---|
| 46 | glPopMatrix(); |
|---|
| 47 | |
|---|
| 48 | |
|---|
| 49 | } |
|---|
| 50 | |
|---|
| 51 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.