Emergency 20 Dokumentation  4.2.0
SimpleDamageData-inl.h
Go to the documentation of this file.
1 // Copyright (C) 2012-2018 Promotion Software GmbH
2 
3 
4 //[-------------------------------------------------------]
5 //[ Includes ]
6 //[-------------------------------------------------------]
7 #include <camp/arraymapper.hpp>
8 
9 
10 //[-------------------------------------------------------]
11 //[ Namespace ]
12 //[-------------------------------------------------------]
13 namespace em5
14 {
15 
16 
17  //[-------------------------------------------------------]
18  //[ Public methods ]
19  //[-------------------------------------------------------]
21  DamagedLevel1Particles(*this, mDamagedLevel1ParticleIds),
22  DamagedLevel2Particles(*this, mDamagedLevel2ParticleIds),
23  DamagedLevel3Particles(*this, mDamagedLevel3ParticleIds),
24  DestroyedParticles(*this, mDestroyedParticleIds)
25  {
26  // Nothing to do in here
27  }
28 
30  {
31  // Nothing to do in here
32  }
33 
35  {
36  return mIntactMesh;
37  }
38 
40  {
41  mIntactMesh = mesh;
42  }
43 
45  {
46  return mDamagedMesh;
47  }
48 
50  {
51  mDamagedMesh = mesh;
52  }
53 
55  {
56  return mDestroyedMesh;
57  }
58 
60  {
61  mDestroyedMesh = mesh;
62  }
63 
65  {
66  return mSmutTexture;
67  }
68 
69  inline void SimpleDamageData::setSmutTexture(const qsf::AssetProxy& smutTexture)
70  {
71  mSmutTexture = smutTexture;
72  }
73 
75  {
76  return mDamageTexture;
77  }
78 
79  inline void SimpleDamageData::setDamageTexture(const qsf::AssetProxy& damageTexture)
80  {
81  mDamageTexture = damageTexture;
82  }
83 
84 
85  //[-------------------------------------------------------]
86  //[ CAMP reflection system ]
87  //[-------------------------------------------------------]
88  inline std::size_t SimpleDamageData::EntityIdArrayInterface::size() const
89  {
90  return getVariable().size();
91  }
92 
93  inline const uint64& SimpleDamageData::EntityIdArrayInterface::get(std::size_t index) const
94  {
95  return getVariable()[index];
96  }
97 
98  inline void SimpleDamageData::EntityIdArrayInterface::set(std::size_t index, const uint64& value)
99  {
100  getVariable()[index] = value;
101  }
102 
103  inline void SimpleDamageData::EntityIdArrayInterface::insert(std::size_t before, const uint64& value)
104  {
105  getVariable().insert(getVariable().begin() + before, value);
106  }
107 
108  inline void SimpleDamageData::EntityIdArrayInterface::remove(std::size_t index)
109  {
110  getVariable().erase(getVariable().begin() + index);
111  }
112 
113 
114 //[-------------------------------------------------------]
115 //[ Namespace ]
116 //[-------------------------------------------------------]
117 } // em5
void setDamagedMesh(const qsf::AssetProxy &mesh)
Definition: SimpleDamageData-inl.h:49
Definition: ActionPriority.h:13
SimpleDamageData()
Constructor.
Definition: SimpleDamageData-inl.h:20
void setDamageTexture(const qsf::AssetProxy &damageTexture)
Definition: SimpleDamageData-inl.h:79
void setIntactMesh(const qsf::AssetProxy &mesh)
Definition: SimpleDamageData-inl.h:39
const qsf::AssetProxy & getDamagedMesh() const
Definition: SimpleDamageData-inl.h:44
const qsf::AssetProxy & getDamageTexture() const
Definition: SimpleDamageData-inl.h:74
uint64_t uint64
Definition: PlatformTypes.h:184
const qsf::AssetProxy & getDestroyedMesh() const
Definition: SimpleDamageData-inl.h:54
const qsf::AssetProxy & getIntactMesh() const
Definition: SimpleDamageData-inl.h:34
Asset proxy class.
Definition: AssetProxy.h:57
const qsf::AssetProxy & getSmutTexture() const
Definition: SimpleDamageData-inl.h:64
void setDestroyedMesh(const qsf::AssetProxy &mesh)
Definition: SimpleDamageData-inl.h:59
virtual ~SimpleDamageData()
Destructor.
Definition: SimpleDamageData-inl.h:29
void setSmutTexture(const qsf::AssetProxy &smutTexture)
Definition: SimpleDamageData-inl.h:69