Orxonox  0.0.5 Codename: Arcturus
StaticEntity.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  * Fabian 'x3n' Landau
24  * Reto Grieder
25  * Co-authors:
26  * ...
27  *
28  */
29 
30 #ifndef _StaticEntity_H__
31 #define _StaticEntity_H__
32 
33 #include "OrxonoxPrereqs.h"
34 #include "WorldEntity.h"
35 
36 namespace orxonox
37 {
51  {
52  public:
53  StaticEntity(Context* context);
54  virtual ~StaticEntity();
55 
58 
59  virtual void setPosition(const Vector3& position) override;
60  virtual void setOrientation(const Quaternion& orientation) override;
61 
62  private:
63  void registerVariables();
64  virtual bool isCollisionTypeLegal(CollisionType type) const override;
65 
66  // network callbacks
67  inline void positionChanged()
68  { this->setPosition(this->getPosition()); }
69  inline void orientationChanged()
70  { this->setOrientation(this->getOrientation()); }
71 
72  // Bullet btMotionState related
73  virtual void setWorldTransform(const btTransform& worldTrans) override;
74  virtual void getWorldTransform(btTransform& worldTrans) const override;
75  };
76 }
77 
78 #endif /* _StaticEntity_H__ */
virtual void setOrientation(const Quaternion &orientation)=0
The StaticEntity is the simplest derivative of the orxonox::WorldEntity class.
Definition: StaticEntity.h:50
void positionChanged()
Definition: StaticEntity.h:67
The WorldEntity represents everything that can be put in a Scene at a certain location.
Definition: WorldEntity.h:72
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
CollisionType
Denotes the possible types of physical objects in a Scene.
Definition: WorldEntity.h:265
Shared library macros, enums, constants and forward declarations for the orxonox library ...
Definition: Context.h:45
#define _OrxonoxExport
Definition: OrxonoxPrereqs.h:60
void orientationChanged()
Definition: StaticEntity.h:69
virtual void setPosition(const Vector3 &position)=0