Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/cleanup/src/world_entities/environments/planet.h @ 10727

Last change on this file since 10727 was 10618, checked in by bknecht, 18 years ago

merged cleanup into trunk (only improvements)

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