Emergency 20 Dokumentation  4.2.0
PlacePersonByFlyingHeliCommandMode.h
Go to the documentation of this file.
1 // Copyright (C) 2012-2018 Promotion Software GmbH
2 
3 
4 //[-------------------------------------------------------]
5 //[ Header guard ]
6 //[-------------------------------------------------------]
7 #pragma once
8 
9 
10 //[-------------------------------------------------------]
11 //[ Includes ]
12 //[-------------------------------------------------------]
13 #include "em5/Export.h"
14 
16 
18 #include <qsf/reflection/CampClass.h> // This include is not needed here directly, but most likely in a derived class
19 
20 
21 //[-------------------------------------------------------]
22 //[ Forward declarations ]
23 //[-------------------------------------------------------]
24 namespace qsf
25 {
26  class Map;
27  class Entity;
28 }
29 
30 
31 //[-------------------------------------------------------]
32 //[ Namespace ]
33 //[-------------------------------------------------------]
34 namespace em5
35 {
36 
37 
38  //[-------------------------------------------------------]
39  //[ Classes ]
40  //[-------------------------------------------------------]
49  {
50 
51 
52  //[-------------------------------------------------------]
53  //[ Public definitions ]
54  //[-------------------------------------------------------]
55  public:
56  static const uint32 PLUGINABLE_ID;
57 
58 
59  //[-------------------------------------------------------]
60  //[ Public methods ]
61  //[-------------------------------------------------------]
62  public:
68 
74 
79  void initialize(qsf::Entity& caller);
80 
81 
82  //[-------------------------------------------------------]
83  //[ Public virtual qsf::game::CommandMode methods ]
84  //[-------------------------------------------------------]
85  public:
86  virtual void startup() override;
87  virtual void shutdown() override;
88  virtual bool executeCommandContext(qsf::game::CommandContext& commandContext, const EntityIdSet& callerIds) override;
89  virtual void updateCommandMode(const qsf::Clock& clock) override;
90 
91 
92  //[-------------------------------------------------------]
93  //[ Private definitions ]
94  //[-------------------------------------------------------]
95  private:
96  static const uint32 ACTION_PRIORITY;
97 
98 
99  //[-------------------------------------------------------]
100  //[ Private methods ]
101  //[-------------------------------------------------------]
102  private:
103  bool hasCollisionOnTargetPosition(const qsf::Entity* entity, const glm::vec3& position);
104 
105  //[-------------------------------------------------------]
106  //[ Private data ]
107  //[-------------------------------------------------------]
108  private:
109  qsf::DebugDrawProxy mDebugDrawProxy;
110  qsf::Entity* mCaller;
111  qsf::Map* mMap;
112 
113 
114  //[-------------------------------------------------------]
115  //[ CAMP reflection system ]
116  //[-------------------------------------------------------]
117  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
118 
119 
120  };
121 
122 
123 //[-------------------------------------------------------]
124 //[ Namespace ]
125 //[-------------------------------------------------------]
126 } // em5
127 
128 
129 //[-------------------------------------------------------]
130 //[ CAMP reflection system ]
131 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
Entity class.
Definition: Entity.h:46
Map class.
Definition: Map.h:93
unsigned int uint32
Definition: PlatformTypes.h:181
Clock class.
Definition: Clock.h:33
#define EM5_API_EXPORT
Definition: Export.h:28
Definition: PickupPersonByParamedicAction.h:21
Debug draw proxy class.
Definition: DebugDrawProxy.h:46
#define QSF_CAMP_RTTI()
Only adds the virtual method "campClassId()", nothing more.
Definition: CampClass.h:75
#define QSF_CAMP_TYPE_NONCOPYABLE(type)
See "CAMP_TYPE_NONCOPYABLE" for details.
Definition: CampClass.h:112
static const uint32 PLUGINABLE_ID
"em5::PlacePersonByFlyingHeliCommandMode" unique command pluginable ID
Definition: PlacePersonByFlyingHeliCommandMode.h:56
Place person by flying heli command mode.
Definition: PlacePersonByFlyingHeliCommandMode.h:48
Command mode base class.
Definition: CommandMode.h:51
boost::container::flat_set< uint64 > EntityIdSet
Definition: CommandMode.h:59
Command context base class.
Definition: CommandContext.h:48