Emergency 20 Dokumentation  4.2.0
FireHelper.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 
15 #include <vector>
16 
17 
18 //[-------------------------------------------------------]
19 //[ Forward declarations ]
20 //[-------------------------------------------------------]
21 namespace em5
22 {
23  class FireComponent;
24 }
25 namespace qsf
26 {
27  class Entity;
28 }
29 
30 
31 //[-------------------------------------------------------]
32 //[ Namespace ]
33 //[-------------------------------------------------------]
34 namespace em5
35 {
36 
37 
38  //[-------------------------------------------------------]
39  //[ Classes ]
40  //[-------------------------------------------------------]
46  {
47 
48 
49  //[-------------------------------------------------------]
50  //[ Public static methods ]
51  //[-------------------------------------------------------]
52  public:
53  static float getAutomatismDistanceFromCaller(qsf::Entity& callerEntity);
54  static qsf::Entity* getConnectedHydrantFromEntity(const qsf::Entity& firemanEntity);
55  static const qsf::Entity* findFreeHydrantNearEntity(qsf::Entity& firemanEntity, qsf::Entity& targetEntity, bool& foundAtLeastOneInRange);
56  static bool isHydrantInRange(const qsf::Entity& hydrantEntity, const glm::vec3& position, float radius);
57  static bool isHydrantInRange(const qsf::Entity& hydrantEntity, const qsf::Entity& targetEntity, float radius);
58  static void getExtinguishTargets(std::vector<qsf::Entity*>& outTargets, qsf::Entity& targetEntity, qsf::Entity& firefightingUnit);
59  static void getSortedTargetsInRange(std::vector<FireComponent*>& outTargets, qsf::Entity& callerEntity, float range);
60  static qsf::Entity* getAnyEffectTarget(qsf::Entity& callerEntity, qsf::Entity& targetEntity);
61  static qsf::Entity* getEffectTargetInRange(qsf::Entity& callerEntity, qsf::Entity& targetEntity, float maxExtinguishRange);
62  static bool isTargetInExtinguishRange(qsf::Entity& targetEntity, const glm::vec3& callerPosition, float maxExtinguishRange);
63  static float getExtinguishRangeFromEntity(qsf::Entity& callerEntity);
64  static float getHardRadius(qsf::Entity& callerEntity);
65 
66 
67  //[-------------------------------------------------------]
68  //[ Private methods ]
69  //[-------------------------------------------------------]
70  private:
71  FireHelper() {}
72  ~FireHelper() {}
73 
74 
75  };
76 
77 
78 //[-------------------------------------------------------]
79 //[ Namespace ]
80 //[-------------------------------------------------------]
81 } // em5
Definition: ActionPriority.h:13
Entity class.
Definition: Entity.h:46
#define EM5_API_EXPORT
Definition: Export.h:28
Definition: PickupPersonByParamedicAction.h:21
EMERGENCY 5 static fire helper class.
Definition: FireHelper.h:45