|
hx3d
1
2D/3D Simple Game Framework
|
Emit particles with parameters. More...
#include <particle_emitter.hpp>
Public Member Functions | |
| ParticleEmitter (const unsigned int maxParticles) | |
| Construct an emitter with a max particle number. More... | |
| void | emit (const unsigned int qty) |
| Emit particles. More... | |
| void | update (const float delta) |
| Update the emitter. More... | |
| void | draw (Batch &batch) |
| Draw the particles. More... | |
| void | setTexture (const Ptr< Texture > &texture) |
| Set the emitter texture. More... | |
| unsigned int | getParticleCount () |
| Get the active particle count. More... | |
Public Attributes | |
| glm::vec3 | position |
| Emitter position. | |
| glm::vec3 | emitter_size |
| Emitter size. | |
| glm::vec3 | particle_size |
| Particles size. | |
| glm::vec3 | gravity |
| Particles gravity. | |
| glm::vec3 | velocity |
| Particles velocity. | |
| float | rotationSpeed |
| Particles Z-rotation speed. | |
| float | life |
| Particles life. | |
Emit particles with parameters.
Definition at line 33 of file particle_emitter.hpp.
| hx3d::graphics::ParticleEmitter::ParticleEmitter | ( | const unsigned int | maxParticles | ) |
Construct an emitter with a max particle number.
| maxParticles | Max particle count |
Definition at line 28 of file particle_emitter.cpp.
| void hx3d::graphics::ParticleEmitter::draw | ( | Batch & | batch | ) |
| void hx3d::graphics::ParticleEmitter::emit | ( | const unsigned int | qty | ) |
| unsigned int hx3d::graphics::ParticleEmitter::getParticleCount | ( | ) |
Get the active particle count.
Definition at line 64 of file particle_emitter.cpp.
Set the emitter texture.
| texture | Texture (Ptr) |
Definition at line 60 of file particle_emitter.cpp.
| void hx3d::graphics::ParticleEmitter::update | ( | const float | delta | ) |
1.8.11