CubbyFlow::GridEmitter2 Class Referenceabstract

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

#include <Core/Emitter/GridEmitter2.h>

Inheritance diagram for CubbyFlow::GridEmitter2:
CubbyFlow::GridEmitterSet2 CubbyFlow::VolumeGridEmitter2

Public Types

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

Public Member Functions

 GridEmitter2 ()
 Constructs an emitter. More...
 
virtual ~GridEmitter2 ()
 Destructor. More...
 
void Update (double currentTimeInSeconds, double timeIntervalInSeconds)
 
void SetOnBeginUpdateCallback (const OnBeginUpdateCallback &callback)
 Sets the callback function to be called when GridEmitter2::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 2-D grid-based emitters.

Member Typedef Documentation

◆ OnBeginUpdateCallback

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

◆ GridEmitter2()

CubbyFlow::GridEmitter2::GridEmitter2 ( )

Constructs an emitter.

◆ ~GridEmitter2()

virtual CubbyFlow::GridEmitter2::~GridEmitter2 ( )
virtual

Destructor.

Member Function Documentation

◆ CallOnBeginUpdateCallback()

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

◆ OnUpdate()

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

◆ SetOnBeginUpdateCallback()

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

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