Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/world_entities/environments/planet.h @ 10706

Last change on this file since 10706 was 10653, checked in by snellen, 18 years ago

planet rotation now xml-loadable

File size: 1.8 KB
RevLine 
[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 */
13class Texture;
[10432]14class Billboard;
[6524]15
16//! A Class to handle a Planet
17class Planet : public WorldEntity
18{
[9869]19  ObjectListDeclaration(Planet);
20
[6524]21 public:
22  Planet(const TiXmlElement* root);
23
24  virtual ~Planet();
25
[6959]26  virtual void loadParams(const TiXmlElement* root);
[6524]27
28  void setSize(float size);
29  /** assumes jpg as input-format */
[7221]30  void setTexture(const std::string& textureName);
[10387]31  void setCloudTexture(const std::string& textureName);
[10391]32  void setCloudRotation(float rotationSpeed);
[10653]33  void setPlanetRotationSpeed(float rotationSpeed){ this->rotSpeedPlanet = rotationSpeed;}
34  void setPlanetRotationAxis(float x, float y, float z){ this->rotVecPlanet = Vector(x,y,z);}
[6524]35
36
[10387]37
[10391]38  virtual void tick( float dt);
[6524]39  virtual void draw() const;
40
41
42
43 private:
[10387]44  Material        materialPlanet;  //!< Materials for the Planet. sorted by number (0-5) top, bottom, left, right, front, back
45  Material        materialCloud;   //!< the material for the cloud surrounding the planet
[6524]46
[10387]47  Model*          cloudModel;      //!< the model for the cloud
48
[10392]49  bool            bClouds;         //!< true if there are clouds defined
[10391]50  float           rotSpeedCloud;   //! cloud rotation speed
51  float           rotSpeedPlanet;  //! planet rotation speed
[10653]52  Vector          rotVecPlanet;    //! planet rotation vector
[6524]53  float           size;            //!< Size of the Planet. This should match the frustum maximum range.
54  float           textureSize;     //!< this is the length of a texture (assumes a square texture)
55  char*           textureName;     //!< Name of the Texture
56
57};
58
59#endif  /* _PLANET_H */
60
61
62
Note: See TracBrowser for help on using the repository browser.