Emergency 20 Dokumentation  4.2.0
BoneLinkData.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 //[-------------------------------------------------------]
14 
15 #include <glm/gtc/quaternion.hpp>
16 
17 
18 //[-------------------------------------------------------]
19 //[ Forward declarations ]
20 //[-------------------------------------------------------]
21 namespace em5
22 {
23  class FireComponent;
24 }
25 namespace qsf
26 {
27  namespace game
28  {
29  class BoneLinkComponent;
30  }
31 }
32 
33 
34 //[-------------------------------------------------------]
35 //[ Namespace ]
36 //[-------------------------------------------------------]
37 namespace em5
38 {
39  namespace multiplayer
40  {
41 
42 
43  //[-------------------------------------------------------]
44  //[ Classes ]
45  //[-------------------------------------------------------]
50  class BoneLinkData: public DataCacheComponentExistenceTrackingBase<qsf::game::BoneLinkComponent>
51  {
52 
53 
54  //[-------------------------------------------------------]
55  //[ Public methods ]
56  //[-------------------------------------------------------]
57  public:
58  BoneLinkData(const qsf::Entity& targetEntity);
59  virtual ~BoneLinkData();
60 
61 
62  //[-------------------------------------------------------]
63  //[ Public virtual em5::multiplayer::DataCacheBase methods ]
64  //[-------------------------------------------------------]
65  public:
66  virtual bool prepareForUpdate(const qsf::Entity& targetEntity, const qsf::Clock& clock) override;
67  virtual void updateData(qsf::game::BitStream& bitStream, bool force) override;
68  virtual void setData(const qsf::game::BitStream& bitStream, const int32 receivedHostTickCount) override;
69  virtual void interpolate(qsf::Entity& targetEntity, const qsf::Clock& clock, const int32 receivedHostTickCount) override;
70 
71 
72  //[-------------------------------------------------------]
73  //[ Private data ]
74  //[-------------------------------------------------------]
75  private:
76  glm::quat mLocalRotation;
77  bool mLocalRotationChanged;
78  glm::vec3 mLocalPosition;
79  bool mLocalPositionChanged;
80  std::string mBoneName;
81  bool mBoneNameChanged;
82 
83  struct HistoryEntry
84  {
85  int32 tickCount;
86  glm::quat mLocalRotation;
87  bool mLocalRotationChanged;
88  glm::vec3 mLocalPosition;
89  bool mLocalPositionChanged;
90  std::string mBoneName;
91  bool mBoneNameChanged;
92  };
93 
94  std::vector<HistoryEntry> mHistoryList;
95 
96 
97  };
98 
99 
100 //[-------------------------------------------------------]
101 //[ Namespace ]
102 //[-------------------------------------------------------]
103  } // multiplayer
104 } // em5
Definition: ActionPriority.h:13
Entity class.
Definition: Entity.h:46
Clock class.
Definition: Clock.h:33
Game bit stream class (just a wrapper for linnet bit stream)
Definition: BitStream.h:40
Definition: PickupPersonByParamedicAction.h:21
signed int int32
Definition: PlatformTypes.h:180
EMERGENCY 5 multiplayer data cache base class which tracks component existence.
Definition: DataCacheComponentExistenceTrackingBase.h:36