Orxonox  0.0.5 Codename: Arcturus
SpicedAsteroidField.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  * remartin
24  * Co-authors:
25  *
26  */
27 
40 #ifndef _SpicedAsteroidField_H__
41 #define _SpicedAsteroidField_H__
42 
43 #include "AsteroidMiningPrereqs.h"
44 
45 #include "core/BaseObject.h"
47 
48 namespace orxonox // tolua_export
49 {
50 
51  // tolua_export
53  { // tolua_export
54 
55  public:
56  SpicedAsteroidField(Context* context);
57  virtual ~SpicedAsteroidField();
58 
59  virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
60  virtual void tick(float dt) override;
61 
62  inline void setCount(int s){this->count = s;}
63  inline int getCount(){return this->count;}
64 
65  inline void setMineralDensity(float d){this->mDensity = d;}
66  inline float getMineralDensity(){return this->mDensity;}
67 
68  inline void setPosition(const Vector3& v){this->position = v;}
69  inline const Vector3& getPosition(){return this->position;}
70 
71  inline void setMaxSize(float i){this->maxSize = i;}
72  inline float getMaxSize(){return this->maxSize;}
73 
74  inline void setMinSize(float i){this->minSize = i;}
75  inline float getMinSize(){return this->minSize;}
76 
77  inline void setRadius(float r){this->radius = r;}
78  inline float getRadius(){return this->radius;}
79 
80  inline void setFog(bool f){this->foggy = f;}
81  inline bool isFoggy(){return this->foggy;}
82 
83  inline void setFogDensity(float fd){this->fogDensity = fd;}
84  inline float getFogDensity(){return this->fogDensity;}
85 
86  protected:
87 
88  int count;
89  float mDensity;
90 
91  Vector3 position;
92 
93  float maxSize;
94  float minSize;
95 
96  float radius;
97  bool foggy;
98  float fogDensity;
99 
100 
101  private:
102  virtual void create();
103 
104 
105  }; // tolua_export
106 } // tolua_export
107 
108 #endif /* _SpicedAsteroidField_H__ */
The BaseObject is the parent of all classes representing an instance in the game. ...
Definition: BaseObject.h:63
int getCount()
Definition: SpicedAsteroidField.h:63
void setFogDensity(float fd)
Definition: SpicedAsteroidField.h:83
void setFog(bool f)
Definition: SpicedAsteroidField.h:80
void setMaxSize(float i)
Definition: SpicedAsteroidField.h:71
Shared library macros, enums, constants and forward declarations for the AsteroidMining module ...
float mDensity
Mineral density, between 0 and 1;.
Definition: SpicedAsteroidField.h:89
Declaration of the Tickable interface.
float getRadius()
Definition: SpicedAsteroidField.h:78
const Vector3 & getPosition()
Definition: SpicedAsteroidField.h:69
void setRadius(float r)
Definition: SpicedAsteroidField.h:77
bool isFoggy()
Definition: SpicedAsteroidField.h:81
void setPosition(const Vector3 &v)
Definition: SpicedAsteroidField.h:68
void setMineralDensity(float d)
Definition: SpicedAsteroidField.h:65
float getFogDensity()
Definition: SpicedAsteroidField.h:84
Definition: SpicedAsteroidField.h:52
float maxSize
Upper bound to asteroid size.
Definition: SpicedAsteroidField.h:93
xmlelement
Definition: Super.h:519
void setMinSize(float i)
Definition: SpicedAsteroidField.h:74
float getMinSize()
Definition: SpicedAsteroidField.h:75
float fogDensity
Definition: SpicedAsteroidField.h:98
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
bool foggy
Whether there&#39;s fog.
Definition: SpicedAsteroidField.h:97
float getMaxSize()
Definition: SpicedAsteroidField.h:72
Mode
Definition: CorePrereqs.h:102
float radius
Asteroids can appear within a sphere.
Definition: SpicedAsteroidField.h:96
int count
Number of asteroids generated.
Definition: SpicedAsteroidField.h:88
Declaration of BaseObject, the base class of all objects in Orxonox.
Definition: Context.h:45
#define _AsteroidMiningExport
Definition: AsteroidMiningPrereqs.h:60
float getMineralDensity()
Definition: SpicedAsteroidField.h:66
Vector3 position
The center.
Definition: SpicedAsteroidField.h:91
The Tickable interface provides a tick(dt) function, that gets called every frame.
Definition: Tickable.h:52
void setCount(int s)
Definition: SpicedAsteroidField.h:62
float minSize
Lower bound to asteroid size.
Definition: SpicedAsteroidField.h:94