| [6524] | 1 | /*! | 
|---|
 | 2 |  * @file planet.h | 
|---|
 | 3 |  *  Definition of the Planet, that handles the Display of an atmosphere for orxonox. | 
|---|
 | 4 |  */ | 
|---|
 | 5 |  | 
|---|
 | 6 | #ifndef _PLANET_H | 
|---|
 | 7 | #define _PLANET_H | 
|---|
 | 8 |  | 
|---|
 | 9 | /* INCLUDES */ | 
|---|
 | 10 | #include "world_entity.h" | 
|---|
| [7221] | 11 | #include "material.h" | 
|---|
| [6524] | 12 | /* FORWARD DECLARATION */ | 
|---|
 | 13 | class Texture; | 
|---|
 | 14 |  | 
|---|
 | 15 | //! A Class to handle a Planet | 
|---|
 | 16 | class Planet : public WorldEntity | 
|---|
 | 17 | { | 
|---|
| [9869] | 18 |   ObjectListDeclaration(Planet); | 
|---|
 | 19 |  | 
|---|
| [6524] | 20 |  public: | 
|---|
 | 21 |   Planet(const TiXmlElement* root); | 
|---|
 | 22 |  | 
|---|
 | 23 |   virtual ~Planet(); | 
|---|
 | 24 |  | 
|---|
| [6959] | 25 |   virtual void loadParams(const TiXmlElement* root); | 
|---|
| [6524] | 26 |  | 
|---|
 | 27 |   void setSize(float size); | 
|---|
 | 28 |   /** assumes jpg as input-format */ | 
|---|
| [7221] | 29 |   void setTexture(const std::string& textureName); | 
|---|
| [10387] | 30 |   void setCloudTexture(const std::string& textureName); | 
|---|
| [10391] | 31 |   void setCloudRotation(float rotationSpeed); | 
|---|
| [6524] | 32 |  | 
|---|
 | 33 |  | 
|---|
| [10387] | 34 |  | 
|---|
| [10391] | 35 |   virtual void tick( float dt); | 
|---|
| [6524] | 36 |   virtual void draw() const; | 
|---|
 | 37 |  | 
|---|
 | 38 |  | 
|---|
 | 39 |  | 
|---|
 | 40 |  private: | 
|---|
| [10387] | 41 |   Material        materialPlanet;  //!< Materials for the Planet. sorted by number (0-5) top, bottom, left, right, front, back | 
|---|
 | 42 |   Material        materialCloud;   //!< the material for the cloud surrounding the planet | 
|---|
| [6524] | 43 |  | 
|---|
| [10387] | 44 |   Model*          cloudModel;      //!< the model for the cloud | 
|---|
 | 45 |  | 
|---|
| [10392] | 46 |   bool            bClouds;         //!< true if there are clouds defined | 
|---|
| [10391] | 47 |   float           rotSpeedCloud;   //! cloud rotation speed | 
|---|
 | 48 |   float           rotSpeedPlanet;  //! planet rotation speed | 
|---|
| [6524] | 49 |   float           size;            //!< Size of the Planet. This should match the frustum maximum range. | 
|---|
 | 50 |   float           textureSize;     //!< this is the length of a texture (assumes a square texture) | 
|---|
 | 51 |   char*           textureName;     //!< Name of the Texture | 
|---|
 | 52 |  | 
|---|
 | 53 | }; | 
|---|
 | 54 |  | 
|---|
 | 55 | #endif  /* _PLANET_H */ | 
|---|
 | 56 |  | 
|---|
 | 57 |  | 
|---|
 | 58 |  | 
|---|