CubbyFlow::ParticleEmitter3 Class Referenceabstract

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

#include <Core/Emitter/ParticleEmitter3.hpp>

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
 Default constructor. More...
 
 ParticleEmitter3 (const ParticleEmitter3 &)=default
 Default copy constructor. More...
 
 ParticleEmitter3 (ParticleEmitter3 &&) noexcept=default
 Default move constructor. More...
 
virtual ~ParticleEmitter3 ()=default
 Default virtual destructor. More...
 
ParticleEmitter3operator= (const ParticleEmitter3 &)=default
 Default copy assignment operator. More...
 
ParticleEmitter3operator= (ParticleEmitter3 &&) noexcept=default
 Default move assignment operator. 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...
 
bool GetIsEnabled () 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...
 

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() [1/3]

CubbyFlow::ParticleEmitter3::ParticleEmitter3 ( )
default

Default constructor.

◆ ParticleEmitter3() [2/3]

CubbyFlow::ParticleEmitter3::ParticleEmitter3 ( const ParticleEmitter3 )
default

Default copy constructor.

◆ ParticleEmitter3() [3/3]

CubbyFlow::ParticleEmitter3::ParticleEmitter3 ( ParticleEmitter3 &&  )
defaultnoexcept

Default move constructor.

◆ ~ParticleEmitter3()

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

Default virtual destructor.

Member Function Documentation

◆ GetIsEnabled()

bool CubbyFlow::ParticleEmitter3::GetIsEnabled ( ) const

Returns true if the emitter is enabled.

◆ 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.

◆ operator=() [1/2]

ParticleEmitter3& CubbyFlow::ParticleEmitter3::operator= ( const ParticleEmitter3 )
default

Default copy assignment operator.

◆ operator=() [2/2]

ParticleEmitter3& CubbyFlow::ParticleEmitter3::operator= ( ParticleEmitter3 &&  )
defaultnoexcept

Default move assignment operator.

◆ SetIsEnabled()

void CubbyFlow::ParticleEmitter3::SetIsEnabled ( bool  enabled)

Sets true/false to enable/disable the emitter.

◆ 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: