CubbyFlow::VolumeParticleEmitter3 Class Referencefinal

3-D volumetric particle emitter. More...

#include <Core/Emitter/VolumeParticleEmitter3.hpp>

Inheritance diagram for CubbyFlow::VolumeParticleEmitter3:
CubbyFlow::ParticleEmitter3

Classes

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

Public Member Functions

 VolumeParticleEmitter3 (ImplicitSurface3Ptr implicitSurface, BoundingBox3D maxRegion, double spacing, const Vector3D &initialVel=Vector3D(), const Vector3D &linearVel=Vector3D(), const Vector3D &angularVel=Vector3D(), size_t maxNumberOfParticles=std::numeric_limits< size_t >::max(), double jitter=0.0, bool isOneShot=true, bool allowOverlapping=false, uint32_t seed=0)
 
void SetPointGenerator (const PointGenerator3Ptr &newPointsGen)
 Sets the point generator. More...
 
const ImplicitSurface3PtrGetSurface () const
 Returns source surface. More...
 
void SetSurface (const ImplicitSurface3Ptr &newSurface)
 Sets the source surface. More...
 
const BoundingBox3DGetMaxRegion () const
 Returns max particle gen region. More...
 
void SetMaxRegion (const BoundingBox3D &newMaxRegion)
 Sets the max particle gen region. More...
 
double GetJitter () const
 Returns jitter amount. More...
 
void SetJitter (double newJitter)
 Sets jitter amount between 0 and 1. More...
 
bool GetIsOneShot () const
 Returns true if particles should be emitted just once. More...
 
void SetIsOneShot (bool newValue)
 Sets the flag to true if particles are emitted just once. More...
 
bool GetAllowOverlapping () const
 Returns true if particles can be overlapped. More...
 
void SetAllowOverlapping (bool newValue)
 Sets the flag to true if particles can overlap each other. More...
 
size_t GetMaxNumberOfParticles () const
 Returns max number of particles to be emitted. More...
 
void SetMaxNumberOfParticles (size_t newMaxNumberOfParticles)
 Sets the max number of particles to be emitted. More...
 
double GetSpacing () const
 Returns the spacing between particles. More...
 
void SetSpacing (double newSpacing)
 Sets the spacing between particles. More...
 
Vector3D GetInitialVelocity () const
 Sets the initial velocity of the particles. More...
 
void SetInitialVelocity (const Vector3D &newInitialVel)
 Returns the initial velocity of the particles. More...
 
Vector3D GetLinearVelocity () const
 Returns the linear velocity of the emitter. More...
 
void SetLinearVelocity (const Vector3D &newLinearVel)
 Sets the linear velocity of the emitter. More...
 
Vector3D GetAngularVelocity () const
 Returns the angular velocity of the emitter. More...
 
void SetAngularVelocity (const Vector3D &newAngularVel)
 Sets the linear velocity of the emitter. 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 VolumeParticleEmitter3. 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 volumetric particle emitter.

This class emits particles from volumetric geometry.

Constructor & Destructor Documentation

◆ VolumeParticleEmitter3()

CubbyFlow::VolumeParticleEmitter3::VolumeParticleEmitter3 ( ImplicitSurface3Ptr  implicitSurface,
BoundingBox3D  maxRegion,
double  spacing,
const Vector3D initialVel = Vector3D(),
const Vector3D linearVel = Vector3D(),
const Vector3D angularVel = Vector3D(),
size_t  maxNumberOfParticles = std::numeric_limits< size_t >::max(),
double  jitter = 0.0,
bool  isOneShot = true,
bool  allowOverlapping = false,
uint32_t  seed = 0 
)

Constructs an emitter that spawns particles from given implicit surface which defines the volumetric geometry. Provided bounding box limits the particle generation region.

Parameters
[in]implicitSurfaceThe implicit surface.
[in]maxRegionThe max region.
[in]spacingThe spacing between particles.
[in]initialVelThe initial velocity.
[in]linearVelThe linear velocity of the emitter.
[in]angularVelThe angular velocity of the emitter.
[in]maxNumberOfParticlesThe max number of particles to be emitted.
[in]jitterThe jitter amount between 0 and 1.
[in]isOneShotTrue if emitter gets disabled after one shot.
[in]allowOverlappingTrue if particles can be overlapped.
[in]seedThe random seed.

Member Function Documentation

◆ GetAllowOverlapping()

bool CubbyFlow::VolumeParticleEmitter3::GetAllowOverlapping ( ) const

Returns true if particles can be overlapped.

◆ GetAngularVelocity()

Vector3D CubbyFlow::VolumeParticleEmitter3::GetAngularVelocity ( ) const

Returns the angular velocity of the emitter.

◆ GetBuilder()

static Builder CubbyFlow::VolumeParticleEmitter3::GetBuilder ( )
static

Returns builder fox VolumeParticleEmitter3.

◆ GetInitialVelocity()

Vector3D CubbyFlow::VolumeParticleEmitter3::GetInitialVelocity ( ) const

Sets the initial velocity of the particles.

◆ GetIsOneShot()

bool CubbyFlow::VolumeParticleEmitter3::GetIsOneShot ( ) const

Returns true if particles should be emitted just once.

◆ GetJitter()

double CubbyFlow::VolumeParticleEmitter3::GetJitter ( ) const

Returns jitter amount.

◆ GetLinearVelocity()

Vector3D CubbyFlow::VolumeParticleEmitter3::GetLinearVelocity ( ) const

Returns the linear velocity of the emitter.

◆ GetMaxNumberOfParticles()

size_t CubbyFlow::VolumeParticleEmitter3::GetMaxNumberOfParticles ( ) const

Returns max number of particles to be emitted.

◆ GetMaxRegion()

const BoundingBox3D& CubbyFlow::VolumeParticleEmitter3::GetMaxRegion ( ) const

Returns max particle gen region.

◆ GetSpacing()

double CubbyFlow::VolumeParticleEmitter3::GetSpacing ( ) const

Returns the spacing between particles.

◆ GetSurface()

const ImplicitSurface3Ptr& CubbyFlow::VolumeParticleEmitter3::GetSurface ( ) const

Returns source surface.

◆ SetAllowOverlapping()

void CubbyFlow::VolumeParticleEmitter3::SetAllowOverlapping ( bool  newValue)

Sets the flag to true if particles can overlap each other.

If true is set, the emitter will generate particles even if the new particles can find existing nearby particles within the particle spacing.

Parameters
[in]newValueTrue if particles can be overlapped.

◆ SetAngularVelocity()

void CubbyFlow::VolumeParticleEmitter3::SetAngularVelocity ( const Vector3D newAngularVel)

Sets the linear velocity of the emitter.

◆ SetInitialVelocity()

void CubbyFlow::VolumeParticleEmitter3::SetInitialVelocity ( const Vector3D newInitialVel)

Returns the initial velocity of the particles.

◆ SetIsOneShot()

void CubbyFlow::VolumeParticleEmitter3::SetIsOneShot ( bool  newValue)

Sets the flag to true if particles are emitted just once.

If true is set, the emitter will generate particles only once even after multiple emit calls. If false, it will keep generating particles from the volumetric geometry. Default value is true.

Parameters
[in]newValueTrue if particles should be emitted just once.

◆ SetJitter()

void CubbyFlow::VolumeParticleEmitter3::SetJitter ( double  newJitter)

Sets jitter amount between 0 and 1.

◆ SetLinearVelocity()

void CubbyFlow::VolumeParticleEmitter3::SetLinearVelocity ( const Vector3D newLinearVel)

Sets the linear velocity of the emitter.

◆ SetMaxNumberOfParticles()

void CubbyFlow::VolumeParticleEmitter3::SetMaxNumberOfParticles ( size_t  newMaxNumberOfParticles)

Sets the max number of particles to be emitted.

◆ SetMaxRegion()

void CubbyFlow::VolumeParticleEmitter3::SetMaxRegion ( const BoundingBox3D newMaxRegion)

Sets the max particle gen region.

◆ SetPointGenerator()

void CubbyFlow::VolumeParticleEmitter3::SetPointGenerator ( const PointGenerator3Ptr newPointsGen)

Sets the point generator.

This function sets the point generator that defines the pattern of the point distribution within the volume.

Parameters
[in]newPointsGenThe new points generator.

◆ SetSpacing()

void CubbyFlow::VolumeParticleEmitter3::SetSpacing ( double  newSpacing)

Sets the spacing between particles.

◆ SetSurface()

void CubbyFlow::VolumeParticleEmitter3::SetSurface ( const ImplicitSurface3Ptr newSurface)

Sets the source surface.


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