Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/presentationFS15/src/orxonox/worldentities/StaticEntity.h @ 10486

Last change on this file since 10486 was 10437, checked in by fvultier, 10 years ago

Removed unnecessary output to console in kump minigame. Added a small description to some classes often used by PPS students: Pawn, StaticEntity, MobileEntity, ControllableEntity.

  • Property svn:eol-style set to native
File size: 2.7 KB
Line 
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
36namespace orxonox
37{
38    /**
39    @brief
40        The StaticEntity is the simplest derivative of the @ref orxonox::WorldEntity class. This means all StaticEntity instances also have
41        a position in space, a mass, a scale, a frication, ... because every StaticEntity is a WorldEntity. You can attach StaticEntities to eachother ike @ref orxonox::WorldEntity WorldEntities.
42
43        In contrast to the MobileEntity the StaticEntity cannot move with respect to the parent to which it is attached. That's why
44        it is called StaticEntity. It will keep the same position (always with respect to its parent) forever unless you call the
45        function @see setPosition to changee it.
46    */
47
48    class _OrxonoxExport StaticEntity : public WorldEntity
49    {
50        public:
51            StaticEntity(Context* context);
52            virtual ~StaticEntity();
53
54            using WorldEntity::setPosition;
55            using WorldEntity::setOrientation;
56
57            void setPosition(const Vector3& position);
58            void setOrientation(const Quaternion& orientation);
59
60        private:
61            void registerVariables();
62            bool isCollisionTypeLegal(CollisionType type) const;
63
64            // network callbacks
65            inline void positionChanged()
66                { this->setPosition(this->getPosition()); }
67            inline void orientationChanged()
68                { this->setOrientation(this->getOrientation()); }
69
70            // Bullet btMotionState related
71            void setWorldTransform(const btTransform& worldTrans);
72            void getWorldTransform(btTransform& worldTrans) const;
73    };
74}
75
76#endif /* _StaticEntity_H__ */
Note: See TracBrowser for help on using the repository browser.