Emergency 20 Dokumentation  4.2.0
RopingFromHelicopterCommandMode.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 
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 allowRopingUnderMousePosition();
104  bool getTargetUnderMouse(glm::vec3& targetPosition, qsf::Entity*& targetEntity);
105  bool allowRopingAtTarget(const glm::vec3& targetPosition, const qsf::Entity* targetEntity);
106 
107 
108  //[-------------------------------------------------------]
109  //[ Private data ]
110  //[-------------------------------------------------------]
111  private:
112  qsf::DebugDrawProxy mDebugDrawProxy;
113  qsf::Entity* mCaller;
114  qsf::Map* mMap;
115 
116 
117  //[-------------------------------------------------------]
118  //[ CAMP reflection system ]
119  //[-------------------------------------------------------]
120  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
121 
122 
123  };
124 
125 
126 //[-------------------------------------------------------]
127 //[ Namespace ]
128 //[-------------------------------------------------------]
129 } // em5
130 
131 
132 //[-------------------------------------------------------]
133 //[ CAMP reflection system ]
134 //[-------------------------------------------------------]
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
Roping from (flying) helicopter command mode.
Definition: RopingFromHelicopterCommandMode.h:48
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::RopingFromHelicopterCommandMode" unique command pluginable ID
Definition: RopingFromHelicopterCommandMode.h:56
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