Orxonox  0.0.5 Codename: Arcturus
AbstractRadiusHeightCollisionShape.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  * Reto Grieder
24  * Co-authors:
25  * Fabian 'x3n' Landau
26  *
27  */
28 
35 #ifndef _AbstractRadiusHeightCollisionShape_H__
36 #define _AbstractRadiusHeightCollisionShape_H__
37 
38 #include "objects/ObjectsPrereqs.h"
40 
41 namespace orxonox
42 {
43 
51  {
52  public:
54 
55  virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
56 
63  inline bool setRadius(float value)
64  { if(this->radius_ == value) return false; this->radius_ = value; updateShape(); return true; }
69  inline float getRadius() const
70  { return radius_; }
71 
78  inline bool setHeight(float value)
79  { if(this->height_ == value) return false; this->height_ = value; updateShape(); return true; }
84  inline float getHeight() const
85  { return this->height_; }
86 
87  virtual void changedScale(); // Is called when the scale of the AbstractRadiusHeightCollisionShape has changed.
88 
89  private:
90  void registerVariables();
91 
92  float radius_;
93  float height_;
94  };
95 }
96 
97 #endif /* _AbstractRadiusHeightCollisionShape_H__ */
#define _ObjectsExport
Definition: ObjectsPrereqs.h:60
float height_
The height of the AbstractRadiusHeightCollisionShape.
Definition: AbstractRadiusHeightCollisionShape.h:93
float getRadius() const
Get the radius of the AbstractRadiusHeightCollisionShape.
Definition: AbstractRadiusHeightCollisionShape.h:69
bool setHeight(float value)
Set the height of the AbstractRadiusHeightCollisionShape.
Definition: AbstractRadiusHeightCollisionShape.h:78
float radius_
The radius of the AbstractRadiusHeightCollisionShape.
Definition: AbstractRadiusHeightCollisionShape.h:92
xmlelement
Definition: Super.h:519
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
Wrapper for the bullet collision shapes with radius and height.
Definition: AbstractRadiusHeightCollisionShape.h:50
Mode
Definition: CorePrereqs.h:102
Definition of the CollisionShape class.
Definition: Context.h:45
Shared library macros, enums, constants and forward declarations for the objects module ...
Wrapper for bullet collision shape class btCollisionShape.
Definition: CollisionShape.h:57
float getHeight() const
Get the height of the AbstractRadiusHeightCollisionShape.
Definition: AbstractRadiusHeightCollisionShape.h:84
bool setRadius(float value)
Set the radius of the AbstractRadiusHeightCollisionShape.
Definition: AbstractRadiusHeightCollisionShape.h:63