|
Brenta Engine 1.2
|
ParticleEmitter class. More...
#include <particles.hpp>
Data Structures | |
| class | builder |
| Builder pattern for ParticleEmitter. More... | |
| struct | config |
Public Member Functions | |
| particle_emitter (config conf) | |
| void | update_particles (float deltaTime) |
| Update the particles. | |
| void | render_particles () |
Data Fields | |
| glm::vec3 | starting_position |
| glm::vec3 | starting_velocity |
| glm::vec3 | starting_spread |
| float | starting_time_to_live |
| int | num_particles |
| float | spawn_rate |
| float | scale |
| types::buffer | fbo [2] |
| Feddback buffer objects. | |
| int | current |
| Current fbo index. | |
| int | atlas |
| Atlas texture. | |
| int | atlas_width |
| int | atlas_height |
| int | atlas_index |
| types::vao | vao |
| Vertex array object. | |
Static Public Attributes | |
| static const config | default_config |
ParticleEmitter class.
This class is used to define a particle emitter, update and render its particles. This class provides a builder pattern to create a ParticleEmitter object. The particles ban be updated and rendered using the updateParticles and renderParticles methods.
Definition at line 30 of file particles.hpp.
| particle_emitter::particle_emitter | ( | config | conf | ) |
Definition at line 33 of file particles.cpp.
| particle_emitter::~particle_emitter | ( | ) |
Definition at line 90 of file particles.cpp.
| void particle_emitter::render_particles | ( | ) |
Definition at line 147 of file particles.cpp.
| void particle_emitter::update_particles | ( | float | deltaTime | ) |
Update the particles.
| deltaTime | Time passed since last frame |
Definition at line 98 of file particles.cpp.
| int brenta::particle_emitter::atlas |
Atlas texture.
Definition at line 55 of file particles.hpp.
| int brenta::particle_emitter::atlas_height |
Definition at line 57 of file particles.hpp.
| int brenta::particle_emitter::atlas_index |
Definition at line 58 of file particles.hpp.
| int brenta::particle_emitter::atlas_width |
Definition at line 56 of file particles.hpp.
| int brenta::particle_emitter::current |
Current fbo index.
Definition at line 51 of file particles.hpp.
|
static |
Definition at line 67 of file particles.hpp.
| types::buffer brenta::particle_emitter::fbo[2] |
Feddback buffer objects.
These are used to save the new state of updated particles in the updateParticles method.
Definition at line 47 of file particles.hpp.
| int brenta::particle_emitter::num_particles |
Definition at line 38 of file particles.hpp.
| float brenta::particle_emitter::scale |
Definition at line 40 of file particles.hpp.
| float brenta::particle_emitter::spawn_rate |
Definition at line 39 of file particles.hpp.
| glm::vec3 brenta::particle_emitter::starting_position |
Definition at line 34 of file particles.hpp.
| glm::vec3 brenta::particle_emitter::starting_spread |
Definition at line 36 of file particles.hpp.
| float brenta::particle_emitter::starting_time_to_live |
Definition at line 37 of file particles.hpp.
| glm::vec3 brenta::particle_emitter::starting_velocity |
Definition at line 35 of file particles.hpp.
| types::vao brenta::particle_emitter::vao |
Vertex array object.
Definition at line 62 of file particles.hpp.