Orxonox  0.0.5 Codename: Arcturus
Planet.h
Go to the documentation of this file.
1 /*
2  * ORXONOX - the hottest 3D action shooter ever to exist
3  * > www.orxonox.net <
4  *
5  *
6  * License notice:
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21  *
22  * Author:
23  * Marian Runo
24  * Co-authors:
25  * ...
26  *
27  */
28 
35 #ifndef _Planet_H__
36 #define _Planet_H__
37 
38 #include "objects/ObjectsPrereqs.h"
39 
40 #include <string>
41 #include "tools/BillboardSet.h"
43 #include "graphics/Model.h"
44 
45 namespace orxonox
46 {
47  class _ObjectsExport Planet : public Model, public Tickable
48  {
49  public:
50  Planet(Context* context);
51 
52  virtual ~Planet();
53 
54  virtual void tick(float dt) override;
55 
56  virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
57 
58  virtual void changedVisibility() override;
59 
60  inline void setAtmosphereSize(float size){
61  this->atmosphereSize = size;
62  }
63 
64  inline float getAtmosphereSize(){
65  return this->atmosphereSize;
66  }
67 
68  inline void setAtmosphere(const std::string& atmosphere){
69  this->atmosphere_ = atmosphere;
70  this->changedAtmosphere();
71  }
72 
73  inline const std::string& getAtmosphere(){
74  return this->atmosphere_;
75  }
76 
77  inline void setImageSize(float size){
78  this->imageSize = size;
79  }
80 
81  inline float getImageSize(){
82  return this->imageSize;
83  }
84 
85  protected:
86 
87  private:
88  void registerVariables();
89 
90  void changedAtmosphere();
91 
94  float imageSize;
96 
97  };
98 }
99 
100 #endif
101 
#define _ObjectsExport
Definition: ObjectsPrereqs.h:60
const std::string & getAtmosphere()
Definition: Planet.h:73
float getImageSize()
Definition: Planet.h:81
std::string atmosphere_
Definition: Planet.h:92
float atmosphereSize
Definition: Planet.h:93
Definition of Model Class.
Declaration of the Tickable interface.
Definition: Planet.h:47
void setImageSize(float size)
Definition: Planet.h:77
::std::string string
Definition: gtest-port.h:756
void setAtmosphereSize(float size)
Definition: Planet.h:60
xmlelement
Definition: Super.h:519
float imageSize
Definition: Planet.h:94
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
Mode
Definition: CorePrereqs.h:102
Definition: Context.h:45
Shared library macros, enums, constants and forward declarations for the objects module ...
Definition: BillboardSet.h:37
float getAtmosphereSize()
Definition: Planet.h:64
Definition: Model.h:46
The Tickable interface provides a tick(dt) function, that gets called every frame.
Definition: Tickable.h:52
void setAtmosphere(const std::string &atmosphere)
Definition: Planet.h:68
BillboardSet billboard_
Definition: Planet.h:95