Emergency 20 Dokumentation  4.2.0
BoneToBoneLinkData.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 BoneToBoneLinkComponent;
30  }
31 }
32 
33 
34 //[-------------------------------------------------------]
35 //[ Namespace ]
36 //[-------------------------------------------------------]
37 namespace em5
38 {
39  namespace multiplayer
40  {
41 
42 
43  //[-------------------------------------------------------]
44  //[ Classes ]
45  //[-------------------------------------------------------]
50  class BoneToBoneLinkData: public DataCacheComponentExistenceTrackingBase<qsf::game::BoneToBoneLinkComponent>
51  {
52 
53 
54  //[-------------------------------------------------------]
55  //[ Public methods ]
56  //[-------------------------------------------------------]
57  public:
58  BoneToBoneLinkData(const qsf::Entity& targetEntity);
59  virtual ~BoneToBoneLinkData();
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 mLocalRotation1;
77  bool mLocalRotation1Changed;
78  glm::vec3 mLocalPosition1;
79  bool mLocalPosition1Changed;
80  std::string mBoneName;
81  bool mBoneNameChanged;
82  std::string mParentBoneName;
83  bool mParentBoneNameChanged;
84  std::string mChildBoneName1;
85  bool mChildBoneName1Changed;
86 
87  glm::quat mLocalRotation2;
88  bool mLocalRotation2Changed;
89  glm::vec3 mLocalPosition2;
90  bool mLocalPosition2Changed;
91  std::string mParentBoneName2;
92  bool mParentBoneName2Changed;
93  std::string mChildBoneName2;
94  bool mChildBoneName2Changed;
95  uint64 mParentEntity2;
96  bool mParentEntity2Changed;
97 
98  struct HistoryEntry
99  {
100  int32 tickCount;
101  glm::quat mLocalRotation1;
102  bool mLocalRotation1Changed;
103  glm::vec3 mLocalPosition1;
104  bool mLocalPosition1Changed;
105  std::string mBoneName;
106  bool mBoneNameChanged;
107  std::string mParentBoneName;
108  bool mParentBoneNameChanged;
109  std::string mChildBoneName1;
110  bool mChildBoneName1Changed;
111 
112  glm::quat mLocalRotation2;
113  bool mLocalRotation2Changed;
114  glm::vec3 mLocalPosition2;
115  bool mLocalPosition2Changed;
116  std::string mParentBoneName2;
117  bool mParentBoneName2Changed;
118  std::string mChildBoneName2;
119  bool mChildBoneName2Changed;
120  uint64 mParentEntity2;
121  bool mParentEntity2Changed;
122  };
123 
124  std::vector<HistoryEntry> mHistoryList;
125 
126  };
127 
128 
129 //[-------------------------------------------------------]
130 //[ Namespace ]
131 //[-------------------------------------------------------]
132  } // multiplayer
133 } // em5
Definition: ActionPriority.h:13
Entity class.
Definition: Entity.h:46
Clock class.
Definition: Clock.h:33
uint64_t uint64
Definition: PlatformTypes.h:184
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