|
Jet
v1.3.3
|
Abstract base class for 2-D particle emitter. More...
#include <jet/particle_emitter2.h>
Public Types | |
| typedef std::function< void(ParticleEmitter2 *, double, double)> | OnBeginUpdateCallback |
| Callback function type for update calls. More... | |
Public Member Functions | |
| ParticleEmitter2 () | |
| Default constructor. More... | |
| virtual | ~ParticleEmitter2 () |
| Destructor. More... | |
| void | update (double currentTimeInSeconds, double timeIntervalInSeconds) |
| const ParticleSystemData2Ptr & | target () const |
| Returns the target particle system to emit. More... | |
| void | setTarget (const ParticleSystemData2Ptr &particles) |
| Sets the target particle system to emit. More... | |
| bool | isEnabled () const |
| Returns true if the emitter is enabled. More... | |
| void | setIsEnabled (bool enabled) |
| Sets true/false to enable/disable the emitter. More... | |
| void | setOnBeginUpdateCallback (const OnBeginUpdateCallback &callback) |
| Sets the callback function to be called when ParticleEmitter2::update function is invoked. More... | |
Protected Member Functions | |
| virtual void | onSetTarget (const ParticleSystemData2Ptr &particles) |
| Called when ParticleEmitter3::setTarget is executed. More... | |
| virtual void | onUpdate (double currentTimeInSeconds, double timeIntervalInSeconds)=0 |
| Called when ParticleEmitter3::update is executed. More... | |
Abstract base class for 2-D particle emitter.
| typedef std::function<void(ParticleEmitter2*, double, double)> jet::ParticleEmitter2::OnBeginUpdateCallback |
Callback function type for update calls.
This type of callback function will take the emitter pointer, current time, and time interval in seconds.
| jet::ParticleEmitter2::ParticleEmitter2 | ( | ) |
Default constructor.
|
virtual |
Destructor.
| bool jet::ParticleEmitter2::isEnabled | ( | ) | const |
Returns true if the emitter is enabled.
|
protectedvirtual |
Called when ParticleEmitter3::setTarget is executed.
|
protectedpure virtual |
Called when ParticleEmitter3::update is executed.
| void jet::ParticleEmitter2::setIsEnabled | ( | bool | enabled | ) |
Sets true/false to enable/disable the emitter.
| void jet::ParticleEmitter2::setOnBeginUpdateCallback | ( | const OnBeginUpdateCallback & | callback | ) |
Sets the callback function to be called when ParticleEmitter2::update function is invoked.
The callback function takes current simulation time in seconds unit. Use this callback to track any motion or state changes related to this emitter.
| [in] | callback | The callback function. |
| void jet::ParticleEmitter2::setTarget | ( | const ParticleSystemData2Ptr & | particles | ) |
Sets the target particle system to emit.
| const ParticleSystemData2Ptr& jet::ParticleEmitter2::target | ( | ) | const |
Returns the target particle system to emit.
| void jet::ParticleEmitter2::update | ( | double | currentTimeInSeconds, |
| double | timeIntervalInSeconds | ||
| ) |
Updates the emitter state from currentTimeInSeconds to the following time-step.
1.8.18