CubbyFlow::ParticleEmitter2 Class Referenceabstract

Abstract base class for 2-D particle emitter. More...

#include <Core/Emitter/ParticleEmitter2.h>

Inheritance diagram for CubbyFlow::ParticleEmitter2:
CubbyFlow::ParticleEmitterSet2 CubbyFlow::PointParticleEmitter2 CubbyFlow::VolumeParticleEmitter2

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 ParticleSystemData2PtrGetTarget () 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 CubbyFlow::ParticleEmitter2::~ParticleEmitter2 ( )
virtual

Destructor.

Member Function Documentation

◆ GetTarget()

const ParticleSystemData2Ptr& CubbyFlow::ParticleEmitter2::GetTarget ( ) const

Returns the target particle system to emit.

◆ OnSetTarget()

virtual void CubbyFlow::ParticleEmitter2::OnSetTarget ( const ParticleSystemData2Ptr particles)
protectedvirtual

Called when ParticleEmitter2::SetTarget is executed.

◆ OnUpdate()

virtual void CubbyFlow::ParticleEmitter2::OnUpdate ( double  currentTimeInSeconds,
double  timeIntervalInSeconds 
)
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]callbackThe 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: