CubbyFlow::GridEmitter3 Class Referenceabstract

Abstract base class for 3-D grid-based emitters. More...

#include <Core/Emitter/GridEmitter3.hpp>

Inheritance diagram for CubbyFlow::GridEmitter3:
CubbyFlow::GridEmitterSet3 CubbyFlow::VolumeGridEmitter3

Public Types

using OnBeginUpdateCallback = std::function< void(GridEmitter3 *, double, double)>
 Callback function type for update calls. More...
 

Public Member Functions

 GridEmitter3 ()=default
 Default constructor. More...
 
 GridEmitter3 (const GridEmitter3 &)=default
 Default copy constructor. More...
 
 GridEmitter3 (GridEmitter3 &&) noexcept=default
 Default move constructor. More...
 
virtual ~GridEmitter3 ()=default
 Default virtual destructor. More...
 
GridEmitter3operator= (const GridEmitter3 &)=default
 Default copy assignment operator. More...
 
GridEmitter3operator= (GridEmitter3 &&) noexcept=default
 Default copy assignment operator. More...
 
void Update (double currentTimeInSeconds, double timeIntervalInSeconds)
 
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 GridEmitter3::Update function is invoked. More...
 

Protected Member Functions

virtual void OnUpdate (double currentTimeInSeconds, double timeIntervalInSeconds)=0
 
void CallOnBeginUpdateCallback (double currentTimeInSeconds, double timeIntervalInSeconds)
 

Detailed Description

Abstract base class for 3-D grid-based emitters.

Member Typedef Documentation

◆ OnBeginUpdateCallback

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

◆ GridEmitter3() [1/3]

CubbyFlow::GridEmitter3::GridEmitter3 ( )
default

Default constructor.

◆ GridEmitter3() [2/3]

CubbyFlow::GridEmitter3::GridEmitter3 ( const GridEmitter3 )
default

Default copy constructor.

◆ GridEmitter3() [3/3]

CubbyFlow::GridEmitter3::GridEmitter3 ( GridEmitter3 &&  )
defaultnoexcept

Default move constructor.

◆ ~GridEmitter3()

virtual CubbyFlow::GridEmitter3::~GridEmitter3 ( )
virtualdefault

Default virtual destructor.

Member Function Documentation

◆ CallOnBeginUpdateCallback()

void CubbyFlow::GridEmitter3::CallOnBeginUpdateCallback ( double  currentTimeInSeconds,
double  timeIntervalInSeconds 
)
protected

◆ GetIsEnabled()

bool CubbyFlow::GridEmitter3::GetIsEnabled ( ) const

Returns true if the emitter is enabled.

◆ OnUpdate()

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

◆ operator=() [1/2]

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

Default copy assignment operator.

◆ operator=() [2/2]

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

Default copy assignment operator.

◆ SetIsEnabled()

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

Sets true/false to enable/disable the emitter.

◆ SetOnBeginUpdateCallback()

void CubbyFlow::GridEmitter3::SetOnBeginUpdateCallback ( const OnBeginUpdateCallback callback)

Sets the callback function to be called when GridEmitter3::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.

◆ Update()

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