Index: /branches/network/src/defs/class_id.h
===================================================================
--- /branches/network/src/defs/class_id.h	(revision 6523)
+++ /branches/network/src/defs/class_id.h	(revision 6524)
@@ -100,4 +100,5 @@
   CL_NPC                        =    0x00204000,
   CL_IMAGE_ENTITY               =    0x00206000,
+  CL_PLANET                     =    0x00207000,
   CL_PROJECTILE                 =    0x00208000,
   CL_WEAPON                     =    0x00210000,
Index: /branches/network/src/story_entities/simple_game_menu.cc
===================================================================
--- /branches/network/src/story_entities/simple_game_menu.cc	(revision 6523)
+++ /branches/network/src/story_entities/simple_game_menu.cc	(revision 6524)
@@ -33,4 +33,5 @@
 
 #include "event_handler.h"
+#include "graphics_engine.h"
 
 #include "cd_engine.h"
@@ -104,7 +105,12 @@
 
   this->dataTank->localCamera->setRelCoor(this->cameraVector);
-}
-
-
+
+  GraphicsEngine::getInstance()->displayFPS(false);
+}
+
+
+/**
+ * load the data
+ */
 ErrorMessage SimpleGameMenu::loadData()
 {
@@ -148,4 +154,7 @@
 
 
+/**
+ * start the menu
+ */
 bool SimpleGameMenu::start()
 {
@@ -158,4 +167,7 @@
 
 
+/**
+ * stop the menu
+ */
 bool SimpleGameMenu::stop()
 {
@@ -192,5 +204,5 @@
 void SimpleGameMenu::animateScene(float dt)
 {
-  Quaternion q(0.00005*dt, Vector(0.0, 1.0, 0.0));
+  Quaternion q(/*0.00005*/ 0.0001* dt, Vector(0.0, 1.0, 0.0));
   this->cameraVector = q.apply(this->cameraVector);
   this->dataTank->localCamera->setRelCoor(this->cameraVector);
Index: /branches/network/src/world_entities/Makefile.am
===================================================================
--- /branches/network/src/world_entities/Makefile.am	(revision 6523)
+++ /branches/network/src/world_entities/Makefile.am	(revision 6524)
@@ -23,4 +23,5 @@
                   world_entities/test_entity.cc \
 		  world_entities/image_entity.cc \
+		  world_entities/planet.cc \
                   \
                   world_entities/weapons/weapon_manager.cc \
@@ -72,4 +73,5 @@
                  world_entities/test_entity.h \
                  world_entities/image_entity.h \
+                 world_entities/planet.h \
                  \
                  world_entities/weapons/weapon_manager.h \
Index: /branches/network/src/world_entities/planet.cc
===================================================================
--- /branches/network/src/world_entities/planet.cc	(revision 6524)
+++ /branches/network/src/world_entities/planet.cc	(revision 6524)
@@ -0,0 +1,180 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Patrick Boenzli
+   co-programmer: ...
+*/
+
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
+
+#include "planet.h"
+
+#include "load_param.h"
+#include "factory.h"
+#include "static_model.h"
+
+#include "material.h"
+#include "texture.h"
+
+#include "network_game_manager.h"
+#include "converter.h"
+
+using namespace std;
+
+
+CREATE_FACTORY(Planet, CL_PLANET);
+
+
+
+/**
+ *  initializes a skybox from a XmlElement
+*/
+Planet::Planet(const TiXmlElement* root)
+{
+  this->setClassID(CL_PLANET, "Planet");
+  this->toList(OM_GROUP_01);
+
+  this->material = new Material();
+  this->material->setIllum(10);
+
+  this->loadParams(root);
+}
+
+
+/**
+ *  default destructor
+*/
+Planet::~Planet()
+{
+  PRINTF(5)("Deleting Planet\n");
+}
+
+
+void Planet::loadParams(const TiXmlElement* root)
+{
+  static_cast<WorldEntity*>(this)->loadParams(root);
+
+  LoadParam(root, "texture", this, Planet, setTexture)
+      .describe("Sets the material on the Planet. The string must be the path relative to the data-dir, and without a trailing .jpg");
+
+  LoadParam(root, "size", this, Planet, setSize)
+      .describe("Sets the Size of the Planet (normally this should be 90% of the maximal viewing Distance).");
+}
+
+
+/**
+ *  Defines which textures should be loaded onto the Planet.
+ * @param textureName the top texture.
+*/
+void Planet::setTexture(const char* textureName)
+{
+  this->material->setDiffuseMap(textureName);
+}
+
+
+/**
+ * @param size The new size of the Planet
+
+ * do not forget to rebuild the Planet after this.
+*/
+void Planet::setSize(float size)
+{
+  this->size = size;
+}
+
+
+
+void Planet::draw() const
+{
+
+  glMatrixMode(GL_MODELVIEW);
+  glPushMatrix();
+
+  /* translate */
+  glTranslatef (this->getAbsCoor ().x,
+                this->getAbsCoor ().y,
+                this->getAbsCoor ().z);
+
+
+  this->material->select();
+
+
+  Vector c;
+  double r = this->size;
+  int n = 100;
+  int method = 1;
+  double theta1 = 0;
+  double theta2 = 2 * M_PI;
+  double phi1 = -M_PI/2.0;
+  double phi2 = M_PI/2.0;
+
+
+  int i,j;
+  double jdivn,j1divn,idivn,dosdivn,unodivn=1/(double)n,ndiv2=(double)n/2,t1,t2,t3,cost1,cost2,cte1,cte3;
+  cte3 = (theta2-theta1)/n;
+  cte1 = (phi2-phi1)/ndiv2;
+  dosdivn = 2*unodivn;
+  Vector e,p,e2,p2;
+
+
+  t2=phi1;
+  cost2=cos(phi1);
+  j1divn=0;
+  for (j=0;j<ndiv2;j++) {
+    t1 = t2;//t1 = phi1 + j * cte1;
+    t2 += cte1;//t2 = phi1 + (j + 1) * cte1;
+    t3 = theta1 - cte3;
+    cost1 = cost2;//cost1=cos(t1);
+    cost2 = cos(t2);
+    e.y = sin(t1);
+    e2.y = sin(t2);
+    p.y = c.y + r * e.y;
+    p2.y = c.y + r * e2.y;
+
+    if (method == 0)
+      glBegin(GL_QUAD_STRIP);
+    else
+      glBegin(GL_TRIANGLE_STRIP);
+
+    idivn=0;
+    jdivn=j1divn;
+    j1divn+=dosdivn;//=2*(j+1)/(double)n;
+    for (i=0;i<=n;i++) {
+       //t3 = theta1 + i * (theta2 - theta1) / n;
+      t3 += cte3;
+      e.x = cost1 * cos(t3);
+       //e.y = sin(t1);
+      e.z = cost1 * sin(t3);
+      p.x = c.x + r * e.x;
+       //p.y = c.y + r * e.y;
+      p.z = c.z + r * e.z;
+      glNormal3f(e.x,e.y,e.z);
+      glTexCoord2f(idivn,jdivn);
+      glVertex3f(p.x,p.y,p.z);
+
+
+      e2.x = cost2 * cos(t3);
+       //e.y = sin(t2);
+      e2.z = cost2 * sin(t3);
+      p2.x = c.x + r * e2.x;
+       //p.y = c.y + r * e.y;
+      p2.z = c.z + r * e2.z;
+      glNormal3f(e2.x,e2.y,e2.z);
+      glTexCoord2f(idivn,j1divn);
+      glVertex3f(p2.x,p2.y,p2.z);
+      idivn += unodivn;
+    }
+    glEnd();
+  }
+}
+
+
+
Index: /branches/network/src/world_entities/planet.h
===================================================================
--- /branches/network/src/world_entities/planet.h	(revision 6524)
+++ /branches/network/src/world_entities/planet.h	(revision 6524)
@@ -0,0 +1,48 @@
+/*!
+ * @file planet.h
+ *  Definition of the Planet, that handles the Display of an atmosphere for orxonox.
+ */
+
+#ifndef _PLANET_H
+#define _PLANET_H
+
+/* INCLUDES */
+#include "world_entity.h"
+
+/* FORWARD DECLARATION */
+class Material;
+class Texture;
+
+//! A Class to handle a Planet
+class Planet : public WorldEntity
+{
+ public:
+  Planet(const TiXmlElement* root);
+
+  virtual ~Planet();
+
+  void loadParams(const TiXmlElement* root);
+
+  void setSize(float size);
+  /** assumes jpg as input-format */
+  void setTexture(const char* textureName);
+
+
+  virtual void draw() const;
+
+
+
+ private:
+  Material*       material;        //!< Materials for the Planet. sorted by number (0-5) top, bottom, left, right, front, back
+  Texture*        texture;         //!< Textures for the CubeMap.
+
+  float           size;            //!< Size of the Planet. This should match the frustum maximum range.
+  float           textureSize;     //!< this is the length of a texture (assumes a square texture)
+  char*           textureName;     //!< Name of the Texture
+
+};
+
+#endif  /* _PLANET_H */
+
+
+
Index: /branches/network/src/world_entities/skybox.cc
===================================================================
--- /branches/network/src/world_entities/skybox.cc	(revision 6523)
+++ /branches/network/src/world_entities/skybox.cc	(revision 6524)
@@ -71,5 +71,5 @@
   this->setClassID(CL_SKYBOX, "SkyBox");
   this->toList(OM_ENVIRON_NOTICK);
-  this->size = 100.0;
+  //this->size = 100.0;
   this->textureSize = 1024.0f;
 
