Jet  v1.3.3
Public Types | Public Member Functions | Protected Member Functions | List of all members
jet::GridEmitter2 Class Referenceabstract

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

#include <jet/grid_emitter2.h>

Inheritance diagram for jet::GridEmitter2:
jet::GridEmitterSet2 jet::VolumeGridEmitter2

Public Types

typedef std::function< void(double, double)> OnBeginUpdateCallback
 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)
 
bool isEnabled () 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 GridEmitter2::update function is invoked. More...
 

Protected Member Functions

virtual void onUpdate (double currentTimeInSeconds, double timeIntervalInSeconds)=0
 

Detailed Description

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

Member Typedef Documentation

◆ OnBeginUpdateCallback

typedef std::function<void(double, double)> jet::GridEmitter2::OnBeginUpdateCallback

Callback function type for update calls.

This type of callback function will take the current time and time interval in seconds.

Constructor & Destructor Documentation

◆ GridEmitter2()

jet::GridEmitter2::GridEmitter2 ( )

Constructs an emitter.

◆ ~GridEmitter2()

virtual jet::GridEmitter2::~GridEmitter2 ( )
virtual

Destructor.

Member Function Documentation

◆ isEnabled()

bool jet::GridEmitter2::isEnabled ( ) const

Returns true if the emitter is enabled.

◆ onUpdate()

virtual void jet::GridEmitter2::onUpdate ( double  currentTimeInSeconds,
double  timeIntervalInSeconds 
)
protectedpure virtual

◆ setIsEnabled()

void jet::GridEmitter2::setIsEnabled ( bool  enabled)

Sets true/false to enable/disable the emitter.

◆ setOnBeginUpdateCallback()

void jet::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 jet::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: