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