Abstract base class for 2-D particle emitter. More...
#include <Core/Emitter/ParticleEmitter2.h>
Public Types | |
using | OnBeginUpdateCallback = std::function< void(ParticleEmitter2 *, double, double)> |
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 & | GetTarget () const |
Returns the target particle system to emit. More... | |
void | SetTarget (const ParticleSystemData2Ptr &particles) |
Sets the target particle system to emit. 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 ParticleEmitter2::SetTarget is executed. More... | |
virtual void | OnUpdate (double currentTimeInSeconds, double timeIntervalInSeconds)=0 |
Called when ParticleEmitter2::Update is executed. More... | |
Detailed Description
Abstract base class for 2-D particle emitter.
Member Typedef Documentation
◆ OnBeginUpdateCallback
using CubbyFlow::ParticleEmitter2::OnBeginUpdateCallback = std::function<void(ParticleEmitter2*, double, double)> |
Callback function type for update calls.
This type of callback function will take the emitter pointer, current time, and time interval in seconds.
Constructor & Destructor Documentation
◆ ParticleEmitter2()
CubbyFlow::ParticleEmitter2::ParticleEmitter2 | ( | ) |
Default constructor.
◆ ~ParticleEmitter2()
|
virtual |
Destructor.
Member Function Documentation
◆ GetTarget()
const ParticleSystemData2Ptr& CubbyFlow::ParticleEmitter2::GetTarget | ( | ) | const |
Returns the target particle system to emit.
◆ OnSetTarget()
|
protectedvirtual |
Called when ParticleEmitter2::SetTarget is executed.
◆ OnUpdate()
|
protectedpure virtual |
Called when ParticleEmitter2::Update is executed.
◆ SetOnBeginUpdateCallback()
void CubbyFlow::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.
- Parameters
-
[in] callback The callback function.
◆ SetTarget()
void CubbyFlow::ParticleEmitter2::SetTarget | ( | const ParticleSystemData2Ptr & | particles | ) |
Sets the target particle system to emit.
◆ Update()
void CubbyFlow::ParticleEmitter2::Update | ( | double | currentTimeInSeconds, |
double | timeIntervalInSeconds | ||
) |
Updates the emitter state from currentTimeInSeconds
to the following time-step.
The documentation for this class was generated from the following file:
- Core/Emitter/ParticleEmitter2.h