CubbyFlow::GridEmitter3 Class Referenceabstract

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

#include <Core/Emitter/GridEmitter3.h>

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 ()
 Constructs an emitter. More...
 
virtual ~GridEmitter3 ()
 Destructor. More...
 
void Update (double currentTimeInSeconds, double timeIntervalInSeconds)
 
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()

CubbyFlow::GridEmitter3::GridEmitter3 ( )

Constructs an emitter.

◆ ~GridEmitter3()

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

Destructor.

Member Function Documentation

◆ CallOnBeginUpdateCallback()

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

◆ OnUpdate()

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

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