Engine
Frameworkcreatedbymeusableforthecreationofsimplegames.CurrentlysupportsOpenGL(Verysimple)andVulkan.
Particle.cpp
Go to the documentation of this file.
1 #define GLM_FORCE_SWIZZLE
2 
4 
5 #include "ThirdParty/glm/glm/gtc/random.hpp"
6 
7 namespace Engine {
8 
9  Particle::Particle(): particleType(), particleBlendMode(), colorInterpolateType(), lifetimeMin(0), lifetimeMax(0),
10  speedMin(0), speedMax(0), massMin(0), massMax(0), maxSegments(0), newSegmentsPerFrame(0),
11  lineEndAction(), startLineThicknessMin(0), startLineThicknessMax(0), endLineThicknessMin(0),
12  endLineThicknessMax(0), lineThicknessInterpolateType(), sizeInterpolateType(),
13  startRollSpeedMin(0), startRollSpeedMax(0), endRollSpeedMin(0), endRollSpeedMax(0),
14  rollSpeedInterpolateType(), rollMin(0), rollMax(0), scaleInterpolateType(),
15  rotationSpeedInterpolateType(), meshLit(false), castShadows(false)
16  {
17  }
18 
19 
21  {
22  }
23 
25  {
26  particleType = type;
27  }
28 
30  {
31  return particleType;
32  }
33 
35  {
36  particleBlendMode = mode;
37  }
38 
40  {
41  return particleBlendMode;
42  }
43 
44  void Particle::SetStartColor(glm::vec4 colorMin, glm::vec4 colorMax)
45  {
46  startColorMin = colorMin;
47  startColorMax = colorMax;
48  }
49 
50  eastl::pair<glm::vec4, glm::vec4> Particle::GetStartColor()
51  {
52  return eastl::pair<glm::vec4, glm::vec4>(startColorMin, startColorMax);
53  }
54 
55  void Particle::SetEndColor(glm::vec4 colorMin, glm::vec4 colorMax)
56  {
57  endColorMin = colorMin;
58  endColorMax = colorMax;
59  }
60 
61  eastl::pair<glm::vec4, glm::vec4> Particle::GetEndColor()
62  {
63  return eastl::pair<glm::vec4, glm::vec4>(endColorMin, endColorMax);
64  }
65 
67  {
68  colorInterpolateType = type;
69  }
70 
72  {
73  return colorInterpolateType;
74  }
75 
76  void Particle::SetForce(glm::vec3 forceMin, glm::vec3 forceMax)
77  {
78  this->forceMin = glm::vec4(forceMin, 0.f);
79  this->forceMax = glm::vec4(forceMax, 0.f);
80  }
81 
82  eastl::pair<glm::vec3, glm::vec3> Particle::GetForce()
83  {
84  return eastl::pair<glm::vec3, glm::vec3>(forceMin.xyz, forceMax.xyz);
85  }
86 
88  {
89  this->lifetimeMin = lifetimeMin;
90  this->lifetimeMax = lifetimeMax;
91  }
92 
93  eastl::pair<float, float> Particle::GetLifetime()
94  {
95  return eastl::pair<float, float>(lifetimeMin, lifetimeMax);
96  }
97 
99  {
100  this->speedMin = speedMin;
101  this->speedMax = speedMax;
102  }
103 
104  eastl::pair<float, float> Particle::GetSpeed()
105  {
106  return eastl::pair<float, float>(speedMin, speedMax);
107  }
108 
109  void Particle::SetMass(float massMin, float massMax)
110  {
111  this->massMin = massMin;
112  this->massMax = massMax;
113  }
114 
115  eastl::pair<float, float> Particle::GetMass()
116  {
117  return eastl::pair<float, float>(massMin, massMax);
118  }
119 
121  {
122  this->gravity = gravity;
123  }
124 
126  {
127  return gravity;
128  }
129 
130  void Particle::SetTexture(eastl::weak_ptr<Texture> texture)
131  {
132  texture = texture;
133  if (texture.lock() != eastl::shared_ptr<Texture>(nullptr))
134  textured = true;
135  else
136  textured = false;
137  }
138 
139  eastl::weak_ptr<Texture> Particle::GetTexture() const
140  {
141  return texture;
142  }
143 
144  bool Particle::HasTexture() const
145  {
146  return textured;
147  }
148 
149  void Particle::SetLineMaxSegments(int segments)
150  {
151  maxSegments = segments;
152  }
153 
155  {
156  return maxSegments;
157  }
158 
160  {
161  newSegmentsPerFrame = segments;
162  }
163 
165  {
166  return newSegmentsPerFrame;
167  }
168 
170  {
171  lineEndAction = action;
172  }
173 
175  {
176  return lineEndAction;
177  }
178 
179  void Particle::SetLineStartThickness(float thicknessMin, float thicknessMax)
180  {
181  startLineThicknessMin = thicknessMin;
182  startLineThicknessMax = thicknessMax;
183  }
184 
185  eastl::pair<float, float> Particle::GetLineStartThickness()
186  {
187  return eastl::pair<float, float>(startLineThicknessMin, startLineThicknessMax);
188  }
189 
190  void Particle::SetLineEndthickness(float thicknessMin, float thicknessMax)
191  {
192  endLineThicknessMin = thicknessMin;
193  endLineThicknessMax = thicknessMax;
194  }
195 
196  eastl::pair<float, float> Particle::GetLineEndThickness()
197  {
198  return eastl::pair<float, float>(endLineThicknessMin, endLineThicknessMax);
199  }
200 
202  {
204  }
205 
207  {
209  }
210 
211  void Particle::SetBillboardSizeStart(glm::vec2 sizeMin, glm::vec2 sizeMax)
212  {
213  startSizeMin = sizeMin;
214  startSizeMax = sizeMax;
215  }
216 
217  eastl::pair<glm::vec2, glm::vec2> Particle::GetBillboardSizeStart()
218  {
219  return eastl::pair<glm::vec2, glm::vec2>(startSizeMin, startSizeMax);
220  }
221 
222  void Particle::SetBillboardSizeEnd(glm::vec2 sizeMin, glm::vec2 sizeMax)
223  {
224  endSizeMin = sizeMin;
225  endSizeMax = sizeMax;
226  }
227 
228  eastl::pair<glm::vec2, glm::vec2> Particle::GetBillboardSizeEnd()
229  {
230  return eastl::pair<glm::vec2, glm::vec2>(endSizeMin, endSizeMax);
231  }
232 
234  {
235  sizeInterpolateType = type;
236  }
237 
239  {
240  return sizeInterpolateType;
241  }
242 
244  {
247  }
248 
249  eastl::pair<float, float> Particle::GetBillboardRollSpeedStart()
250  {
251  return eastl::pair<float, float>(startRollSpeedMin, startRollSpeedMax);
252  }
253 
255  {
258  }
259 
260  eastl::pair<float, float> Particle::GetBillboardRollSpeedEnd()
261  {
262  return eastl::pair<float, float>(endRollSpeedMin, endRollSpeedMax);
263  }
264 
266  {
267  this->rollMin = rollMin;
268  this->rollMax = rollMax;
269  }
270 
271  eastl::pair<float, float> Particle::GetBillboardRoll()
272  {
273  return eastl::pair<float, float>(rollMin, rollMax);
274  }
275 
277  {
279  }
280 
282  {
284  }
285 
286  void Particle::SetMesh(eastl::weak_ptr<Mesh> mesh)
287  {
288  this->mesh = mesh;
289  }
290 
291  eastl::weak_ptr<Mesh> Particle::GetMesh() const
292  {
293  return mesh;
294  }
295 
296  void Particle::SetMaterial(eastl::weak_ptr<Material> material)
297  {
298  this->material = material;
299  }
300 
301  eastl::weak_ptr<Material> Particle::GetMaterial() const
302  {
303  return material;
304  }
305 
306  void Particle::SetMeshScaleStart(glm::vec3 scaleMin, glm::vec3 scaleMax)
307  {
308  startScaleMin = glm::vec4(scaleMin, 0.f);
309  startScaleMax = glm::vec4(scaleMax, 0.f);
310  }
311 
312  eastl::pair<glm::vec3, glm::vec3> Particle::GetMeshScaleStart()
313  {
314  return eastl::pair<glm::vec3, glm::vec3>(startScaleMin.xyz, startScaleMax.xyz);
315  }
316 
317  void Particle::SetMeshScaleEnd(glm::vec3 scaleMin, glm::vec3 scaleMax)
318  {
319  endScaleMin = glm::vec4(scaleMin, 0.f);
320  endScaleMax = glm::vec4(scaleMax, 0.f);
321  }
322 
323  eastl::pair<glm::vec3, glm::vec3> Particle::GetMeshScaleEnd()
324  {
325  return eastl::pair<glm::vec3, glm::vec3>(endScaleMin.xyz, endScaleMax.xyz);
326  }
327 
329  {
330  scaleInterpolateType = type;
331  }
332 
334  {
335  return scaleInterpolateType;
336  }
337 
339  {
340  startRotationSpeedMin = glm::vec4(speedMin, 0.f);
341  startRotationSpeedMax = glm::vec4(speedMax, 0.f);
342  }
343 
344  eastl::pair<glm::vec3, glm::vec3> Particle::GetMeshRotationSpeedStart()
345  {
346  return eastl::pair<glm::vec3, glm::vec3>(startRotationSpeedMin.xyz, startRotationSpeedMax.xyz);
347  }
348 
350  {
351  endRotationSpeedMin = glm::vec4(speedMin, 0.f);
352  endRotationSpeedMax = glm::vec4(speedMax, 0.f);
353  }
354 
355  eastl::pair<glm::vec3, glm::vec3> Particle::GetMeshRotationSpeedEnd()
356  {
357  return eastl::pair<glm::vec3, glm::vec3>(endRotationSpeedMin.xyz, endRotationSpeedMax.xyz);
358  }
359 
361  {
362  this->rotationMin = glm::vec4(rotationMin, 0.f);
363  this->rotationMax = glm::vec4(rotationMax, 0.f);
364  }
365 
366  eastl::pair<glm::vec3, glm::vec3> Particle::GetMeshRotation()
367  {
368  return eastl::pair<glm::vec3, glm::vec3>(rotationMin.xyz, rotationMax.xyz);
369  }
370 
372  {
374  }
375 
377  {
379  }
380 
381  void Particle::SetMeshLit(bool lit)
382  {
383  meshLit = lit;
384  }
385 
386  bool Particle::IsMeshLit() const
387  {
388  return meshLit;
389  }
390 
392  {
393  this->castShadows = castShadows;
394  }
395 
397  {
398  return castShadows;
399  }
400 
401  Particle::ParticleData Particle::CreateParticle(glm::vec4 position, glm::vec4 direction) const
402  {
403  ParticleData ret = {};
404  ret.startColor = glm::linearRand(startColorMin, startColorMax);
405  ret.endColor = glm::linearRand(endColorMin, endColorMax);
407  ret.currentColor = ret.endColor;
408  else
409  ret.currentColor = ret.startColor;
410  ret.position = position;
411  ret.direction = direction;
412  ret.force = glm::linearRand(forceMin, forceMax);
414  ret.currentLifetime = 0.f;
417 
418  return ret;
419  }
420 
422  {
423  LineData ret;
424  ret.segmentCount = 0;
428  ret.currentThickness = ret.endThickness;
429  else
431  return ret;
432  }
433 
435  {
436  BillboardData ret = {};
437  ret.startSize = glm::linearRand(startSizeMin, startSizeMax);
438  ret.endSize = glm::linearRand(endSizeMin, endSizeMax);
440  ret.currentSize = ret.endSize;
441  else
442  ret.currentSize = ret.startSize;
447  else
450 
451  return ret;
452  }
453 
455  {
456  MeshData ret = {};
457  ret.startScale = glm::linearRand(startScaleMin, startScaleMax);
458  ret.endScale = glm::linearRand(endScaleMin, endScaleMax);
460  ret.currentScale = ret.endScale;
461  else
462  ret.currentScale = ret.startScale;
467  else
469  ret.currentRotation = glm::linearRand(rotationMin, rotationMax);
470 
471  return ret;
472  }
473 
474  float Particle::RandomFloatLinear(float min, float max) const
475  {
476  float random = (static_cast<float>(rand())) / static_cast<float>(RAND_MAX);
477  float diff = max - min;
478  float r = random * diff;
479  return min + r;
480  }
481 
482 }
BillboardData CreateParticleBillboardData() const
Definition: Particle.cpp:434
ParticleType GetParticleType() const
Returns the type of the particle.
Definition: Particle.cpp:29
LineEndAction lineEndAction
Definition: Particle.hpp:571
void SetMeshRotation(glm::vec3 rotationMin, glm::vec3 rotationMax)
Sets the range of rotations in euler angles the mesh can start with.
Definition: Particle.cpp:360
void SetStartColor(glm::vec4 colorMin, glm::vec4 colorMax)
Sets the range of possible start colors of the particle.
Definition: Particle.cpp:44
void SetBillboardSizeInterpolateType(InterpolateType type)
Sets the interpolation type for the billboard size.
Definition: Particle.cpp:233
void SetMeshScaleEnd(glm::vec3 scaleMin, glm::vec3 scaleMax)
Sets the range for the end scale of the mesh.
Definition: Particle.cpp:317
void SetForce(glm::vec3 forceMin, glm::vec3 forceMax)
Sets the min and max for the range of forces that can be applied on the particle. ...
Definition: Particle.cpp:76
void SetMeshLit(bool lit)
Sets whether or not the lightning calculations will be done when rendering the mesh. NOTE: Only works for mesh particles.
Definition: Particle.cpp:381
void SetBillboardRoll(float rollMin, float rollMax)
Sets the range of roll rotations the billboard can start with.
Definition: Particle.cpp:265
float startLineThicknessMin
Definition: Particle.hpp:573
ParticleType particleType
Definition: Particle.hpp:549
eastl::weak_ptr< Material > GetMaterial() const
Returns the material used for the mesh.
Definition: Particle.cpp:301
void SetMaterial(eastl::weak_ptr< Material > material)
Sets the material used for the mesh. Material color is overriden by the particle color.
Definition: Particle.cpp:296
void SetMass(float massMin, float massMax)
Sets the range of masses a particle can be created with. NOTE: If the mass is zero forces won&#39;t inter...
Definition: Particle.cpp:109
void SetLineThicknessInterpolateType(InterpolateType type)
Sets the interpolation type of the line thickness.
Definition: Particle.cpp:201
eastl::pair< float, float > GetLineEndThickness()
Returns the range of thicknesses a line can end with.
Definition: Particle.cpp:196
InterpolateType GetBillboardSizeInterpolateType() const
Returns the interpolation type for the billboard size.
Definition: Particle.cpp:238
void SetBillboardSizeStart(glm::vec2 sizeMin, glm::vec2 sizeMax)
Sets the range for start size of the billboard.
Definition: Particle.cpp:211
bool IsMeshLit() const
Returns whether or not the lightning calculations will be done when rendering the mesh...
Definition: Particle.cpp:386
float endRollSpeedMin
Definition: Particle.hpp:582
float startRollSpeedMax
Definition: Particle.hpp:581
float startRollSpeedMin
Definition: Particle.hpp:581
glm::vec4 forceMax
Definition: Particle.hpp:556
InterpolateType sizeInterpolateType
Definition: Particle.hpp:579
bool IsGravityEnabled() const
Returns whether or not gravity is enabled for the particle.
Definition: Particle.cpp:125
glm::vec4 endRotationSpeedMax
Definition: Particle.hpp:595
glm::vec4 endScaleMax
Definition: Particle.hpp:591
void SetBillboardSizeEnd(glm::vec2 sizeMin, glm::vec2 sizeMax)
Sets the range for the end size of the billboard.
Definition: Particle.cpp:222
void SetMeshRotationSpeedStart(glm::vec3 speedMin, glm::vec3 speedMax)
Sets the range of rotation speeds in euler angles the mesh can start with.
Definition: Particle.cpp:338
eastl::pair< glm::vec4, glm::vec4 > GetStartColor()
Returns a pair containing the range of possible start colors of the particle.
Definition: Particle.cpp:50
eastl::pair< glm::vec3, glm::vec3 > GetMeshRotation()
Returns the range of rotations in euler angles the mesh can start with.
Definition: Particle.cpp:366
glm::vec2 endSizeMin
Definition: Particle.hpp:578
glm::vec2 startSizeMax
Definition: Particle.hpp:577
glm::vec4 startScaleMin
Definition: Particle.hpp:590
void SetEndColor(glm::vec4 colorMin, glm::vec4 colorMax)
Sets the range of possible end colors of the particle.
Definition: Particle.cpp:55
glm::vec4 endColorMin
Definition: Particle.hpp:553
InterpolateType GetColorInterpolateType() const
Returns the interpolation type used for the color.
Definition: Particle.cpp:71
eastl::pair< glm::vec4, glm::vec4 > GetEndColor()
Returns a pair containing the range of possible end colors of the particle.
Definition: Particle.cpp:61
InterpolateType scaleInterpolateType
Definition: Particle.hpp:592
InterpolateType colorInterpolateType
Definition: Particle.hpp:554
InterpolateType GetBillboardRollSpeedInterpolateType() const
Returns the interpolation type for the roll speed.
Definition: Particle.cpp:281
glm::vec4 rotationMax
Definition: Particle.hpp:598
glm::vec4 startRotationSpeedMax
Definition: Particle.hpp:594
InterpolateType GetMeshRotationSpeedInterpolateType() const
Returns the interpolation type for the rotation speed.
Definition: Particle.cpp:376
ParticleData CreateParticle(glm::vec4 position, glm::vec4 direction) const
Definition: Particle.cpp:401
eastl::weak_ptr< Texture > texture
Definition: Particle.hpp:564
void SetLineStartThickness(float thicknessMin, float thicknessMax)
Sets the range of thicknesses a line can start with (interpolation is based on lifetime, not segment count).
Definition: Particle.cpp:179
eastl::pair< glm::vec3, glm::vec3 > GetMeshRotationSpeedStart()
Returns the rotation speeds in euler angles the mesh can start with.
Definition: Particle.cpp:344
void SetMeshScaleInterpolateType(InterpolateType type)
Sets the interpolation type for the mesh scale.
Definition: Particle.cpp:328
void SetLineEndAction(LineEndAction action)
Sets the action that should be taken when trying to create segments after having reached the maximum ...
Definition: Particle.cpp:169
void SetLineEndthickness(float thicknessMin, float thicknessMax)
Sets the range of thicknesses a line can end with (interpolation is based on lifetime, not segment count).
Definition: Particle.cpp:190
eastl::weak_ptr< Texture > GetTexture() const
Returns the texture used by the particle.
Definition: Particle.cpp:139
glm::vec4 endColorMax
Definition: Particle.hpp:553
glm::vec4 startRotationSpeedMin
Definition: Particle.hpp:594
eastl::pair< glm::vec2, glm::vec2 > GetBillboardSizeStart()
Returns the range of start sizes for the billboard.
Definition: Particle.cpp:217
eastl::weak_ptr< Mesh > GetMesh() const
Returns the mesh used for mesh particles.
Definition: Particle.cpp:291
bool CanCastShadows() const
Returns whether or not the particle can cast shadows.
Definition: Particle.cpp:396
InterpolateType rollSpeedInterpolateType
Definition: Particle.hpp:583
void SetBlendMode(BlendMode mode)
Sets the blend mode of the particle.
Definition: Particle.cpp:34
eastl::pair< glm::vec3, glm::vec3 > GetMeshRotationSpeedEnd()
Returns the rotation speeds in euler angles the mesh can end with.
Definition: Particle.cpp:355
InterpolateType GetLineThicknessInterpolateType() const
Returns the interpolation type of the line thickness.
Definition: Particle.cpp:206
InterpolateType rotationSpeedInterpolateType
Definition: Particle.hpp:596
void SetMeshScaleStart(glm::vec3 scaleMin, glm::vec3 scaleMax)
Sets the range for start scale of the mesh.
Definition: Particle.cpp:306
int GetNewSegmentsPerFrame() const
Returns the ammount of new segments that get created each frame.
Definition: Particle.cpp:164
void SetCastsShadows(bool castShadows)
Sets whether or not the particle can cast shadows. NOTE: This only works for mesh particles...
Definition: Particle.cpp:391
glm::vec2 endSizeMax
Definition: Particle.hpp:578
eastl::pair< float, float > GetBillboardRoll()
Returns the range of roll rotations the billboard can start with.
Definition: Particle.cpp:271
eastl::weak_ptr< Material > material
Definition: Particle.hpp:588
glm::vec4 forceMin
Definition: Particle.hpp:556
float endRollSpeedMax
Definition: Particle.hpp:582
void SetBillboardRollSpeedEnd(float speedMin, float speedMax)
Sets the range of roll rotation speeds the billboard can end with.
Definition: Particle.cpp:254
InterpolateType GetMeshScaleInterpolateType() const
Returns the interpolation type for the mesh scale.
Definition: Particle.cpp:333
BlendMode particleBlendMode
Definition: Particle.hpp:550
glm::vec4 endScaleMin
Definition: Particle.hpp:591
BlendMode GetParticleBlendMode() const
Returns the blend mode of the particle.
Definition: Particle.cpp:39
glm::vec4 rotationMin
Definition: Particle.hpp:598
LineEndAction GetLineEndAction() const
Returns the action that should be taken when trying to create segments after having reached the maxim...
Definition: Particle.cpp:174
float endLineThicknessMin
Definition: Particle.hpp:574
LineData CreateParticleLineData() const
Definition: Particle.cpp:421
eastl::weak_ptr< Mesh > mesh
Definition: Particle.hpp:587
eastl::pair< float, float > GetBillboardRollSpeedStart()
Returns the angle of roll rotation speeds the billboard can start with.
Definition: Particle.cpp:249
float startLineThicknessMax
Definition: Particle.hpp:573
glm::vec4 startColorMax
Definition: Particle.hpp:552
void SetMeshRotationSpeedInterpolateType(InterpolateType type)
Sets the interpolation type for the rotation speed.
Definition: Particle.cpp:371
void SetColorInterpolateType(InterpolateType type)
Sets the interpolation type used for the color.
Definition: Particle.cpp:66
glm::vec2 startSizeMin
Definition: Particle.hpp:577
void SetLifetime(float lifetimeMin, float lifetimeMax)
Sets the range of possible lifetimes the particle can have.
Definition: Particle.cpp:87
void SetSpeed(float speedMin, float speedMax)
Sets the range of possible speeds the particle can be created with.
Definition: Particle.cpp:98
eastl::pair< float, float > GetLineStartThickness()
Returns the range of thicknesses a line can start with.
Definition: Particle.cpp:185
float RandomFloatLinear(float min, float max) const
Definition: Particle.cpp:474
void SetGravityEnabled(bool gravity)
Turns gravity on and off for the particle. Gravitic constant will be 9.81. If you want different grav...
Definition: Particle.cpp:120
eastl::pair< float, float > GetBillboardRollSpeedEnd()
Returns the angle of roll rotation speeds the billboard can end with.
Definition: Particle.cpp:260
void SetMesh(eastl::weak_ptr< Mesh > mesh)
Sets the mesh used for mesh particles.
Definition: Particle.cpp:286
void SetMeshRotationSpeedEnd(glm::vec3 speedMin, glm::vec3 speedMax)
Sets the range of rotation speeds in euler angles the mesh can end with.
Definition: Particle.cpp:349
void SetLineMaxSegments(int segments)
Sets the maximum amount of segments a line particle can have.
Definition: Particle.cpp:149
glm::vec4 endRotationSpeedMin
Definition: Particle.hpp:595
eastl::pair< float, float > GetSpeed()
Returns the range of possible speeds the particle can be created with.
Definition: Particle.cpp:104
void SetBillboardRollSpeedInterpolateType(InterpolateType type)
Sets the interpolation type for the roll speed.
Definition: Particle.cpp:276
eastl::pair< glm::vec3, glm::vec3 > GetMeshScaleEnd()
Returns the range of end scales for the mesh.
Definition: Particle.cpp:323
void SetTexture(eastl::weak_ptr< Texture > texture)
Sets the texture of the particle. Only applies to lines and billboards. Can be left empty to use just...
Definition: Particle.cpp:130
void SetParticleType(ParticleType type)
Sets the type of the particle.
Definition: Particle.cpp:24
void SetNewSegmentsPerFrame(int segments)
Sets the amount of new segments that get created each frame.
Definition: Particle.cpp:159
eastl::pair< glm::vec3, glm::vec3 > GetMeshScaleStart()
Returns the range of start scales for the mesh.
Definition: Particle.cpp:312
eastl::pair< glm::vec3, glm::vec3 > GetForce()
Returns a pair containing the range of possible forces that can be applied on the particle...
Definition: Particle.cpp:82
bool HasTexture() const
Returns whether or not the particle has a texture.
Definition: Particle.cpp:144
float endLineThicknessMax
Definition: Particle.hpp:574
eastl::pair< float, float > GetMass()
Returns the range of possible masses the particle can be created with.
Definition: Particle.cpp:115
glm::vec4 startColorMin
Definition: Particle.hpp:552
eastl::pair< float, float > GetLifetime()
Returns the range of possible lifetimes the particle can have.
Definition: Particle.cpp:93
InterpolateType lineThicknessInterpolateType
Definition: Particle.hpp:575
int GetLineMaxSegments() const
Returns the maximum number of segments a line particle can have.
Definition: Particle.cpp:154
glm::vec4 startScaleMax
Definition: Particle.hpp:590
MeshData CreateParticleMeshData() const
Definition: Particle.cpp:454
eastl::pair< glm::vec2, glm::vec2 > GetBillboardSizeEnd()
Returns the range of end sizes for the billboard.
Definition: Particle.cpp:228
void SetBillboardRollSpeedStart(float speedMin, float speedMax)
Sets the range of roll rotation speeds the billboard can start with.
Definition: Particle.cpp:243