-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathParticle.h
43 lines (32 loc) · 895 Bytes
/
Particle.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#pragma once
#include "GameEntity.h"
#include "Drawable.h"
class Particle : public GameEntity, public Drawable {
public:
AniMode modelAnim = PARTICLE_STOP;
Particle(ModelEnum curr);
~Particle();
// GameEntity
void FixedUpdate() override;
// Drawable
glm::mat4 GetParentTransform() override;
ModelEnum GetModelEnum() override;
AniMode GetAniMode() override;
// Information
glm::vec3 GetPosition() const;
void SetPosition(glm::vec3 position);
void SetRotation(glm::mat4 rotation);
glm::mat4 GetRotation() const;
float glowParticleHeight = -1.5;
float dustParticleHeight = -3;
float dustParticleZOffset = -3.f;
private:
// Transformations
glm::vec2* translate = nullptr;
glm::vec3* translate3D = nullptr;
glm::mat4 rotation{};
ModelEnum model;
// Get matrix transformation
glm::mat4 GetTransformation();
glm::mat4 GetTranslation();
};