Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/archive/Presentation_HS16/src/modules/waypoints/Waypoint.h @ 11475

Last change on this file since 11475 was 11318, checked in by ooguz, 8 years ago

Distance Trigger Added

File size: 2.3 KB
Line 
1
2
3#ifndef _Waypoint_H__
4#define _Waypoint_H__
5
6#include "OrxonoxPrereqs.h"
7#include "Waypointprereqs.h"
8#include "worldentities/StaticEntity.h"
9#include "graphics/Model.h"
10#include "objects/triggers/DistanceTrigger.h"
11
12#include <map>
13#include <string>
14
15#include "util/OgreForwardRefs.h"
16#include "tools/interfaces/Tickable.h"
17#include "WaypointGroup.h"
18
19
20namespace 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
42            virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode) override;
43
44            inline void enable_waypoint(){
45                this->waypoint_actived = true;
46            }
47
48            inline void setOrder(int number){
49                this->order = number;
50            }
51
52            inline int getOrder(){
53                return this->order;
54            }
55
56            inline void setWaypointGroup(WaypointGroup* waypointgroup_){
57                this->waypointgroup = waypointgroup_;
58            }
59
60            void activate();
61
62           
63            bool waypoint_actived;
64
65        private:
66   
67            //virtual bool isCollisionTypeLegal(CollisionType type) const override;
68            Model* model;
69            DistanceTrigger* distancetrigger;
70            unsigned int order = 0;
71            WaypointGroup* waypointgroup;
72
73            // network callbacks
74    };
75}
76
77#endif /* _Waypoint_H__ */
Note: See TracBrowser for help on using the repository browser.