CubbyFlow::PointParticleEmitter2 Class Referencefinal
2-D point particle emitter. More...
#include <Core/Emitter/PointParticleEmitter2.hpp>
Inheritance diagram for CubbyFlow::PointParticleEmitter2:
Classes | |
class | Builder |
Front-end to create PointParticleEmitter2 objects step by step. More... | |
Public Member Functions | |
PointParticleEmitter2 (const Vector2D &origin, const Vector2D &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::ParticleEmitter2 | |
ParticleEmitter2 ()=default | |
Default constructor. More... | |
ParticleEmitter2 (const ParticleEmitter2 &)=default | |
Default copy constructor. More... | |
ParticleEmitter2 (ParticleEmitter2 &&) noexcept=default | |
Default move constructor. More... | |
virtual | ~ParticleEmitter2 ()=default |
Default virtual destructor. More... | |
ParticleEmitter2 & | operator= (const ParticleEmitter2 &)=default |
Default copy assignment operator. More... | |
ParticleEmitter2 & | operator= (ParticleEmitter2 &&) noexcept=default |
Default move assignment operator. More... | |
void | Update (double currentTimeInSeconds, double timeIntervalInSeconds) |
const ParticleSystemData2Ptr & | GetTarget () const |
Returns the target particle system to emit. More... | |
void | SetTarget (const ParticleSystemData2Ptr &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 ParticleEmitter2::Update function is invoked. More... | |
Static Public Member Functions | |
static Builder | GetBuilder () |
Returns builder fox PointParticleEmitter2. More... | |
Additional Inherited Members | |
Public Types inherited from CubbyFlow::ParticleEmitter2 | |
using | OnBeginUpdateCallback = std::function< void(ParticleEmitter2 *, double, double)> |
Callback function type for update calls. More... | |
Protected Member Functions inherited from CubbyFlow::ParticleEmitter2 | |
virtual void | OnSetTarget (const ParticleSystemData2Ptr &particles) |
Called when ParticleEmitter2::SetTarget is executed. More... | |
Detailed Description
2-D point particle emitter.
This class emits particles from a single point in given direction, speed, and spreading angle.
Constructor & Destructor Documentation
◆ PointParticleEmitter2()
CubbyFlow::PointParticleEmitter2::PointParticleEmitter2 | ( | const Vector2D & | origin, |
const Vector2D & | 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] origin The origin. [in] direction The direction. [in] speed The speed. [in] spreadAngleInDegrees The spread angle in degrees. [in] maxNumOfNewParticlesPerSec The max number of new particles per second. [in] maxNumOfParticles The max number of particles to be emitted. [in] seed The random seed.
Member Function Documentation
◆ GetBuilder()
|
static |
Returns builder fox PointParticleEmitter2.
◆ GetMaxNumberOfNewParticlesPerSecond()
size_t CubbyFlow::PointParticleEmitter2::GetMaxNumberOfNewParticlesPerSecond | ( | ) | const |
Returns max number of new particles per second.
◆ GetMaxNumberOfParticles()
size_t CubbyFlow::PointParticleEmitter2::GetMaxNumberOfParticles | ( | ) | const |
Returns max number of particles to be emitted.
◆ SetMaxNumberOfNewParticlesPerSecond()
void CubbyFlow::PointParticleEmitter2::SetMaxNumberOfNewParticlesPerSecond | ( | size_t | rate | ) |
Sets max number of new particles per second.
◆ SetMaxNumberOfParticles()
void CubbyFlow::PointParticleEmitter2::SetMaxNumberOfParticles | ( | size_t | maxNumberOfParticles | ) |
Sets max number of particles to be emitted.
The documentation for this class was generated from the following file:
- Core/Emitter/PointParticleEmitter2.hpp