[11230] | 1 | |
---|
[11237] | 2 | |
---|
[11230] | 3 | #ifndef _Waypoint_H__ |
---|
| 4 | #define _Waypoint_H__ |
---|
| 5 | |
---|
| 6 | #include "OrxonoxPrereqs.h" |
---|
| 7 | #include "StaticEntity.h" |
---|
[11243] | 8 | #include "graphics/Model.h" |
---|
[11258] | 9 | #include "modules/objects/triggers/DistanceTrigger.h" |
---|
[11230] | 10 | |
---|
[11237] | 11 | #include <map> |
---|
| 12 | #include <string> |
---|
| 13 | |
---|
| 14 | #include "util/OgreForwardRefs.h" |
---|
| 15 | #include "tools/interfaces/Tickable.h" |
---|
| 16 | |
---|
[11230] | 17 | namespace orxonox |
---|
| 18 | { |
---|
| 19 | /** |
---|
| 20 | @brief |
---|
| 21 | The StaticEntity is the simplest derivative of the @ref orxonox::WorldEntity class. This means all StaticEntity instances also have |
---|
| 22 | 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. |
---|
| 23 | |
---|
| 24 | In contrast to the MobileEntity the StaticEntity cannot move with respect to the parent to which it is attached. That's why |
---|
| 25 | it is called StaticEntity. It will keep the same position (always with respect to its parent) forever unless you call the |
---|
| 26 | function @see setPosition to changee it. |
---|
| 27 | |
---|
| 28 | A StaticEntity can only have the collisition type WorldEntity::None or WorldEntity::Static. The collsion types WorldEntity::Dynamic and WorldEntity::Kinematic are illegal. |
---|
| 29 | */ |
---|
| 30 | |
---|
[11243] | 31 | class _OrxonoxExport Waypoint : public StaticEntity { |
---|
| 32 | |
---|
[11230] | 33 | public: |
---|
[11243] | 34 | |
---|
[11230] | 35 | Waypoint(Context* context); |
---|
| 36 | virtual ~Waypoint(); |
---|
| 37 | |
---|
[11237] | 38 | |
---|
[11243] | 39 | virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; |
---|
[11230] | 40 | |
---|
[11258] | 41 | inline void enable_waypoint(){ |
---|
| 42 | this->waypoint_active = true; |
---|
| 43 | } |
---|
[11230] | 44 | |
---|
[11258] | 45 | inline void disable_waypoint(){ |
---|
| 46 | this->waypoint_active = false; |
---|
| 47 | } |
---|
[11237] | 48 | |
---|
[11258] | 49 | inline int getOrder(){ |
---|
| 50 | return order; |
---|
| 51 | } |
---|
| 52 | |
---|
| 53 | |
---|
| 54 | |
---|
| 55 | |
---|
[11230] | 56 | private: |
---|
[11243] | 57 | |
---|
[11230] | 58 | //virtual bool isCollisionTypeLegal(CollisionType type) const override; |
---|
[11243] | 59 | Model* model; |
---|
[11258] | 60 | DistanceTrigger* distancetrigger; |
---|
| 61 | bool waypoint_active; |
---|
| 62 | int order; |
---|
[11243] | 63 | |
---|
[11230] | 64 | // network callbacks |
---|
| 65 | }; |
---|
| 66 | } |
---|
| 67 | |
---|
[11243] | 68 | #endif /* _Waypoint_H__ */ |
---|