CubbyFlow::PointParticleEmitter3 Class Referencefinal

3-D point particle emitter. More...

#include <Core/Emitter/PointParticleEmitter3.hpp>

Inheritance diagram for CubbyFlow::PointParticleEmitter3:
CubbyFlow::ParticleEmitter3

Classes

class  Builder
 Front-end to create PointParticleEmitter3 objects step by step. More...
 

Public Member Functions

 PointParticleEmitter3 (const Vector3D &origin, const Vector3D &direction, double speed, double spreadAngleInDegrees, size_t maxNumOfNewParticlesPerSec=1, size_t maxNumOfParticles=std::numeric_limits< size_t >::max(), uint32_t seed=0)
 
size_t GetMaxNumberOfNewParticlesPerSecond () const
 Returns max number of new particles per second. More...
 
void SetMaxNumberOfNewParticlesPerSecond (size_t rate)
 Sets max number of new particles per second. More...
 
size_t GetMaxNumberOfParticles () const
 Returns max number of particles to be emitted. More...
 
void SetMaxNumberOfParticles (size_t maxNumberOfParticles)
 Sets max number of particles to be emitted. More...
 
- Public Member Functions inherited from CubbyFlow::ParticleEmitter3
 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...
 

Static Public Member Functions

static Builder GetBuilder ()
 Returns builder fox PointParticleEmitter3. More...
 

Additional Inherited Members

- Public Types inherited from CubbyFlow::ParticleEmitter3
using OnBeginUpdateCallback = std::function< void(ParticleEmitter3 *, double, double)>
 Callback function type for update calls. More...
 
- Protected Member Functions inherited from CubbyFlow::ParticleEmitter3
virtual void OnSetTarget (const ParticleSystemData3Ptr &particles)
 Called when ParticleEmitter3::SetTarget is executed. More...
 

Detailed Description

3-D point particle emitter.

This class emits particles from a single point in given direction, speed, and spreading angle.

Constructor & Destructor Documentation

◆ PointParticleEmitter3()

CubbyFlow::PointParticleEmitter3::PointParticleEmitter3 ( const Vector3D origin,
const Vector3D direction,
double  speed,
double  spreadAngleInDegrees,
size_t  maxNumOfNewParticlesPerSec = 1,
size_t  maxNumOfParticles = std::numeric_limits< size_t >::max(),
uint32_t  seed = 0 
)

Constructs an emitter that spawns particles from given origin, direction, speed, spread angle, max number of new particles per second, max total number of particles to be emitted, and random seed.

Parameters
[in]originThe origin.
[in]directionThe direction.
[in]speedThe speed.
[in]spreadAngleInDegreesThe spread angle in degrees.
[in]maxNumOfNewParticlesPerSecThe max number of new particles per second.
[in]maxNumOfParticlesThe max number of particles to be emitted.
[in]seedThe random seed.

Member Function Documentation

◆ GetBuilder()

static Builder CubbyFlow::PointParticleEmitter3::GetBuilder ( )
static

Returns builder fox PointParticleEmitter3.

◆ GetMaxNumberOfNewParticlesPerSecond()

size_t CubbyFlow::PointParticleEmitter3::GetMaxNumberOfNewParticlesPerSecond ( ) const

Returns max number of new particles per second.

◆ GetMaxNumberOfParticles()

size_t CubbyFlow::PointParticleEmitter3::GetMaxNumberOfParticles ( ) const

Returns max number of particles to be emitted.

◆ SetMaxNumberOfNewParticlesPerSecond()

void CubbyFlow::PointParticleEmitter3::SetMaxNumberOfNewParticlesPerSecond ( size_t  rate)

Sets max number of new particles per second.

◆ SetMaxNumberOfParticles()

void CubbyFlow::PointParticleEmitter3::SetMaxNumberOfParticles ( size_t  maxNumberOfParticles)

Sets max number of particles to be emitted.


The documentation for this class was generated from the following file: