|
Jet
v1.3.3
|
Abstract base class for 3-D particle emitter. More...
#include <jet/particle_emitter3.h>
Public Types | |
| typedef std::function< void(ParticleEmitter3 *, double, double)> | OnBeginUpdateCallback |
| Callback function type for update calls. More... | |
Public Member Functions | |
| ParticleEmitter3 () | |
| Default constructor. More... | |
| virtual | ~ParticleEmitter3 () |
| Destructor. More... | |
| void | update (double currentTimeInSeconds, double timeIntervalInSeconds) |
| const ParticleSystemData3Ptr & | target () const |
| Returns the target particle system to emit. More... | |
| void | setTarget (const ParticleSystemData3Ptr &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 ParticleEmitter3::update function is invoked. More... | |
Protected Member Functions | |
| virtual void | onSetTarget (const ParticleSystemData3Ptr &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 3-D particle emitter.
| typedef std::function<void(ParticleEmitter3*, double, double)> jet::ParticleEmitter3::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::ParticleEmitter3::ParticleEmitter3 | ( | ) |
Default constructor.
|
virtual |
Destructor.
| bool jet::ParticleEmitter3::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::ParticleEmitter3::setIsEnabled | ( | bool | enabled | ) |
Sets true/false to enable/disable the emitter.
| void jet::ParticleEmitter3::setOnBeginUpdateCallback | ( | const OnBeginUpdateCallback & | callback | ) |
Sets the callback function to be called when ParticleEmitter3::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::ParticleEmitter3::setTarget | ( | const ParticleSystemData3Ptr & | particles | ) |
Sets the target particle system to emit.
| const ParticleSystemData3Ptr& jet::ParticleEmitter3::target | ( | ) | const |
Returns the target particle system to emit.
| void jet::ParticleEmitter3::update | ( | double | currentTimeInSeconds, |
| double | timeIntervalInSeconds | ||
| ) |
Updates the emitter state from currentTimeInSeconds to the following time-step.
1.8.18