Creates a ParticleEffect object that handles Particle objects.
More...
#include <ParticleEffect.h>
|
| | 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) |
| |
| | ~ParticleEffect () |
| |
| void | update (float dt) |
| |
| void | draw (glm::mat4 &viewMatrix, glm::mat4 &projMatrix) |
| |
| void | makeNewParticles (std::unordered_map< std::string, Object * > &objects, std::unordered_map< std::string, Shader * > &shaders) |
| |
| void | setEmitter (glm::vec3 emitter) |
| |
| void | setEmitting (bool emit) |
| |
Creates a ParticleEffect object that handles Particle objects.
- Author
- Jamie Slowgrove
Constructs a ParticleEffect Object.
- Parameters
-
| objectName | The file name of the model that the Particle will use. |
| objects | A reference to the loaded Object files |
| shaders | A reference to the loaded Shader files |
| vertexShaderName | The name of the vertex shader. |
| fragmentShaderName | The name of the fragment shader. |
| emitter | The position that the particle effect emits from. |
| emit | The new value of the emit boolean. |
| ParticleEffect::~ParticleEffect |
( |
| ) |
|
| void ParticleEffect::draw |
( |
glm::mat4 & |
viewMatrix, |
|
|
glm::mat4 & |
projMatrix |
|
) |
| |
Draws the ParticleEffect.
- Parameters
-
| viewMatrix | A reference to the camera view matrix. |
| projMatrix | A reference to the camera projection matrix. |
Creates the new Particle objects.
- Parameters
-
| objects | A reference to the loaded Object files |
| shaders | A reference to the loaded Shader files |
| void ParticleEffect::setEmitter |
( |
glm::vec3 |
emitter | ) |
|
Setter # The position of the emitter.
- Parameters
-
| emitter | The new position of the emitter. |
| void ParticleEffect::setEmitting |
( |
bool |
emit | ) |
|
Setter # The value of the emit boolean.
- Parameters
-
| emit | The new value of the emit boolean. |
| void ParticleEffect::update |
( |
float |
dt | ) |
|
| bool ParticleEffect::emit |
|
private |
| glm::vec3 ParticleEffect::emitter |
|
private |
The name of the fragment shader
| float ParticleEffect::moveSpeed |
|
private |
The move speed of the particles
The name of the object for the model
| std::vector<Particle*> ParticleEffect::particles |
|
private |
The name of the vertex shader
The documentation for this class was generated from the following files: