Particle emitter that integrates with the scene system.
More...
#include <particles.h>
|
| asw::Quad< float > | transform |
| | The transform of the object.
|
| |
| float | rotation {0.0F} |
| | The rotation of the object in radians.
|
| |
| int | zIndex {0} |
| | The layer that the object is on.
|
| |
| bool | active {true} |
| | Whether or not the object is active.
|
| |
| float | alpha {1.0F} |
| | Opacity of the object.
|
| |
| Physics | body |
| | Physics body of the object.
|
| |
| bool | alive {true} |
| | Alive state.
|
| |
Particle emitter that integrates with the scene system.
Definition at line 53 of file particles.h.
◆ ParticleEmitter() [1/2]
| asw::ParticleEmitter::ParticleEmitter |
( |
| ) |
|
|
default |
◆ ParticleEmitter() [2/2]
| asw::ParticleEmitter::ParticleEmitter |
( |
const ParticleConfig & | config, |
|
|
int | maxParticles = 256 ) |
|
explicit |
Construct a new ParticleEmitter.
- Parameters
-
| config | The particle configuration. |
| maxParticles | Maximum number of particles in the pool. |
Definition at line 19 of file particles.cpp.
◆ draw()
| void asw::ParticleEmitter::draw |
( |
| ) |
|
|
overridevirtual |
◆ emit()
| void asw::ParticleEmitter::emit |
( |
int | count | ) |
|
Emit a burst of particles at current position.
- Parameters
-
| count | Number of particles to emit. |
Definition at line 27 of file particles.cpp.
◆ getAliveCount()
| int asw::ParticleEmitter::getAliveCount |
( |
| ) |
const |
Get the number of alive particles.
- Returns
- The alive particle count.
Definition at line 106 of file particles.cpp.
◆ setEmissionRate()
| void asw::ParticleEmitter::setEmissionRate |
( |
float | rate | ) |
|
Set emission rate (particles per second), 0 to disable auto-emit.
- Parameters
-
| rate | Particles per second. |
Definition at line 23 of file particles.cpp.
◆ spawnParticle()
| void asw::ParticleEmitter::spawnParticle |
( |
| ) |
|
|
private |
◆ start()
| void asw::ParticleEmitter::start |
( |
| ) |
|
◆ stop()
| void asw::ParticleEmitter::stop |
( |
| ) |
|
◆ update()
| void asw::ParticleEmitter::update |
( |
float | deltaTime | ) |
|
|
overridevirtual |
◆ aliveCount
| int asw::ParticleEmitter::aliveCount {0} |
|
private |
◆ config
◆ emissionAccumulator
| float asw::ParticleEmitter::emissionAccumulator {0.0F} |
|
private |
◆ emissionRate
| float asw::ParticleEmitter::emissionRate {0.0F} |
|
private |
◆ emitting
| bool asw::ParticleEmitter::emitting {false} |
|
private |
◆ particles
| std::vector<Particle> asw::ParticleEmitter::particles |
|
private |
The documentation for this class was generated from the following files: