Emergency 20 Dokumentation  4.2.0
TreatPersonTargetPointProvider.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 
17 
18 //[-------------------------------------------------------]
19 //[ Namespace ]
20 //[-------------------------------------------------------]
21 namespace em5
22 {
23 
24 
25  //[-------------------------------------------------------]
26  //[ Classes ]
27  //[-------------------------------------------------------]
33  {
34 
35 
36  //[-------------------------------------------------------]
37  //[ Public definitions ]
38  //[-------------------------------------------------------]
39  public:
40  static const uint32 TARGET_POINT_ID;
41 
42  static const float TargetPersonXOffset;
43  static const float TargetPersonZOffsetMale;
44  static const float TargetPersonZOffsetFemale;
45  static const float TargetPersonXOffsetStanding;
46  static const float TargetPersonZOffsetStanding;
47 
48 
49  //[-------------------------------------------------------]
50  //[ Public methods ]
51  //[-------------------------------------------------------]
52  public:
58 
59  static void calculateTargetPoints_static(qsf::Entity& target, const qsf::Transform& targetTransform, std::vector<qsf::logic::TargetPoint>& targetPoints, bool originalSide = true);
60  static glm::quat calculateRotation_static(const qsf::Transform& targetTransform, bool originalSide);
61 
62  static void calculateOffsets(qsf::Entity& target, float& xOffset, float& zOffset);
63 
64 
65  //[-------------------------------------------------------]
66  //[ Public virtual qsf::logic::TargetPointProvider methods ]
67  //[-------------------------------------------------------]
68  public:
69  virtual void calculateTargetPoints(qsf::Entity& caller, const qsf::Transform& callerTransform, qsf::Entity& target, const qsf::Transform& targetTransform, std::vector<qsf::logic::TargetPoint>& targetPoints) const override;
70 
71 
72  //[-------------------------------------------------------]
73  //[ CAMP reflection system ]
74  //[-------------------------------------------------------]
75  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
76 
77 
78  };
79 
80 
81 //[-------------------------------------------------------]
82 //[ Namespace ]
83 //[-------------------------------------------------------]
84 } // em5
85 
86 
87 //[-------------------------------------------------------]
88 //[ CAMP reflection system ]
89 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
static const float TargetPersonZOffsetFemale
Definition: TreatPersonTargetPointProvider.h:44
Target point manager class.
Definition: TargetPointManager.h:45
static const float TargetPersonZOffsetMale
Definition: TreatPersonTargetPointProvider.h:43
Entity class.
Definition: Entity.h:46
Target point provider for treat a person.
Definition: TreatPersonTargetPointProvider.h:32
unsigned int uint32
Definition: PlatformTypes.h:181
#define EM5_API_EXPORT
Definition: Export.h:28
3D transform class
Definition: Transform.h:45
#define QSF_CAMP_RTTI()
Only adds the virtual method "campClassId()", nothing more.
Definition: CampClass.h:75
A target point provider manages constraints for a type of interaction between entities. It returns actual target points that are spatial configurations which allow the interaction given the entities current setup. Since a target point is relative to the interacting as well as the interacted on entity it may be dynamic and is often invalidated as soon as one of the entities moves.
Definition: TargetPointProvider.h:53
static const float TargetPersonZOffsetStanding
Definition: TreatPersonTargetPointProvider.h:46
#define QSF_CAMP_TYPE_NONCOPYABLE(type)
See "CAMP_TYPE_NONCOPYABLE" for details.
Definition: CampClass.h:112
static const float TargetPersonXOffset
Definition: TreatPersonTargetPointProvider.h:42
static const uint32 TARGET_POINT_ID
"TreatPersonTargetPointProvider" unique identifier
Definition: TreatPersonTargetPointProvider.h:40
static const float TargetPersonXOffsetStanding
Definition: TreatPersonTargetPointProvider.h:45