5 #include <gtc/type_ptr.hpp>
6 #include <gtc/matrix_transform.hpp>
11 #include <unordered_map>
16 #define MAX_NUMBER_OF_PARTICLES 100
28 std::unordered_map<std::string, Object*>
objects;
30 std::unordered_map<std::string, Shader*>
shaders;
56 std::unordered_map<std::string, Shader*> &shaders,
std::string vertexShaderName,
57 std::string fragmentShaderName, glm::vec3 emitter,
bool emit);
76 void draw(glm::mat4 &viewMatrix, glm::mat4 &projMatrix);
84 std::unordered_map<std::string, Shader*> &shaders);
void makeNewParticles(std::unordered_map< std::string, Object * > &objects, std::unordered_map< std::string, Shader * > &shaders)
Definition: ParticleEffect.cpp:93
std::string objectName
Definition: ParticleEffect.h:32
bool emit
Definition: ParticleEffect.h:42
std::unordered_map< std::string, Object * > objects
Definition: ParticleEffect.h:28
Creates a ParticleEffect object that handles Particle objects.
Definition: ParticleEffect.h:22
ParticleEffect(std::string fileName, std::unordered_map< std::string, Object * > &objects, std::unordered_map< std::string, Shader * > &shaders, std::string vertexShaderName, std::string fragmentShaderName, glm::vec3 emitter, bool emit)
Definition: ParticleEffect.cpp:6
glm::vec3 emitter
Definition: ParticleEffect.h:40
std::string fragmentShaderName
Definition: ParticleEffect.h:36
~ParticleEffect()
Definition: ParticleEffect.cpp:32
void setEmitting(bool emit)
Definition: ParticleEffect.cpp:139
void update(float dt)
Definition: ParticleEffect.cpp:44
void setEmitter(glm::vec3 emitter)
Definition: ParticleEffect.cpp:130
void draw(glm::mat4 &viewMatrix, glm::mat4 &projMatrix)
Definition: ParticleEffect.cpp:80
std::unordered_map< std::string, Shader * > shaders
Definition: ParticleEffect.h:30
std::string vertexShaderName
Definition: ParticleEffect.h:34
GLsizei const GLchar *const * string
Definition: glew.h:1843
std::vector< Particle * > particles
Definition: ParticleEffect.h:26
float moveSpeed
Definition: ParticleEffect.h:38