CubbyFlow::ParticleEmitter3 Class Referenceabstract

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

#include <Core/Emitter/ParticleEmitter3.h>

Inheritance diagram for CubbyFlow::ParticleEmitter3:
CubbyFlow::ParticleEmitterSet3 CubbyFlow::PointParticleEmitter3 CubbyFlow::VolumeParticleEmitter3

Public Types

using OnBeginUpdateCallback = std::function< void(ParticleEmitter3 *, double, double)>
 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 ParticleSystemData3PtrGetTarget () const
 Returns the target particle system to emit. More...
 
void SetTarget (const ParticleSystemData3Ptr &particles)
 Sets the target particle system to emit. 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...
 

Detailed Description

Abstract base class for 3-D particle emitter.

Member Typedef Documentation

◆ OnBeginUpdateCallback

using CubbyFlow::ParticleEmitter3::OnBeginUpdateCallback = std::function<void(ParticleEmitter3*, 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

◆ ParticleEmitter3()

CubbyFlow::ParticleEmitter3::ParticleEmitter3 ( )

Default constructor.

◆ ~ParticleEmitter3()

virtual CubbyFlow::ParticleEmitter3::~ParticleEmitter3 ( )
virtual

Destructor.

Member Function Documentation

◆ GetTarget()

const ParticleSystemData3Ptr& CubbyFlow::ParticleEmitter3::GetTarget ( ) const

Returns the target particle system to emit.

◆ OnSetTarget()

virtual void CubbyFlow::ParticleEmitter3::OnSetTarget ( const ParticleSystemData3Ptr particles)
protectedvirtual

Called when ParticleEmitter3::SetTarget is executed.

◆ OnUpdate()

virtual void CubbyFlow::ParticleEmitter3::OnUpdate ( double  currentTimeInSeconds,
double  timeIntervalInSeconds 
)
protectedpure virtual

Called when ParticleEmitter3::Update is executed.

◆ SetOnBeginUpdateCallback()

void CubbyFlow::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.

Parameters
[in]callbackThe callback function.

◆ SetTarget()

void CubbyFlow::ParticleEmitter3::SetTarget ( const ParticleSystemData3Ptr particles)

Sets the target particle system to emit.

◆ Update()

void CubbyFlow::ParticleEmitter3::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: