Jet  v1.3.3
Classes | Public Member Functions | Static Public Member Functions | List of all members
jet::VolumeParticleEmitter2 Class Referencefinal

2-D volumetric particle emitter. More...

#include <jet/volume_particle_emitter2.h>

Inheritance diagram for jet::VolumeParticleEmitter2:
jet::ParticleEmitter2

Classes

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

Public Member Functions

 VolumeParticleEmitter2 (const ImplicitSurface2Ptr &implicitSurface, const BoundingBox2D &maxRegion, double spacing, const Vector2D &initialVel=Vector2D(), const Vector2D &linearVel=Vector2D(), double angularVel=0.0, size_t maxNumberOfParticles=kMaxSize, double jitter=0.0, bool isOneShot=true, bool allowOverlapping=false, uint32_t seed=0)
 
void setPointGenerator (const PointGenerator2Ptr &newPointsGen)
 Sets the point generator. More...
 
const ImplicitSurface2Ptrsurface () const
 Returns source surface. More...
 
void setSurface (const ImplicitSurface2Ptr &newSurface)
 Sets the source surface. More...
 
const BoundingBox2DmaxRegion () const
 Returns max particle gen region. More...
 
void setMaxRegion (const BoundingBox2D &newBox)
 Sets the max particle gen region. More...
 
double jitter () const
 Returns jitter amount. More...
 
void setJitter (double newJitter)
 Sets jitter amount between 0 and 1. More...
 
bool isOneShot () 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 allowOverlapping () const
 Returns trhe if particles can be overlapped. More...
 
void setAllowOverlapping (bool newValue)
 Sets the flag to true if particles can overlap each other. More...
 
size_t maxNumberOfParticles () 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 spacing () const
 Returns the spacing between particles. More...
 
void setSpacing (double newSpacing)
 Sets the spacing between particles. More...
 
Vector2D initialVelocity () const
 Sets the initial velocity of the particles. More...
 
void setInitialVelocity (const Vector2D &newInitialVel)
 Returns the initial velocity of the particles. More...
 
Vector2D linearVelocity () const
 Returns the linear velocity of the emitter. More...
 
void setLinearVelocity (const Vector2D &newLinearVel)
 Sets the linear velocity of the emitter. More...
 
double angularVelocity () const
 Returns the angular velocity of the emitter. More...
 
void setAngularVelocity (double newAngularVel)
 Sets the linear velocity of the emitter. More...
 
- Public Member Functions inherited from jet::ParticleEmitter2
 ParticleEmitter2 ()
 Default constructor. More...
 
virtual ~ParticleEmitter2 ()
 Destructor. More...
 
void update (double currentTimeInSeconds, double timeIntervalInSeconds)
 
const ParticleSystemData2Ptrtarget () const
 Returns the target particle system to emit. More...
 
void setTarget (const ParticleSystemData2Ptr &particles)
 Sets the target particle system to emit. More...
 
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 ParticleEmitter2::update function is invoked. More...
 

Static Public Member Functions

static Builder builder ()
 Returns builder fox VolumeParticleEmitter2. More...
 

Additional Inherited Members

- Public Types inherited from jet::ParticleEmitter2
typedef std::function< void(ParticleEmitter2 *, double, double)> OnBeginUpdateCallback
 Callback function type for update calls. More...
 
- Protected Member Functions inherited from jet::ParticleEmitter2
virtual void onSetTarget (const ParticleSystemData2Ptr &particles)
 Called when ParticleEmitter3::setTarget is executed. More...
 

Detailed Description

2-D volumetric particle emitter.

This class emits particles from volumetric geometry.

Constructor & Destructor Documentation

◆ VolumeParticleEmitter2()

jet::VolumeParticleEmitter2::VolumeParticleEmitter2 ( const ImplicitSurface2Ptr implicitSurface,
const BoundingBox2D maxRegion,
double  spacing,
const Vector2D initialVel = Vector2D(),
const Vector2D linearVel = Vector2D(),
double  angularVel = 0.0,
size_t  maxNumberOfParticles = kMaxSize,
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 of new particles.
[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

◆ allowOverlapping()

bool jet::VolumeParticleEmitter2::allowOverlapping ( ) const

Returns trhe if particles can be overlapped.

◆ angularVelocity()

double jet::VolumeParticleEmitter2::angularVelocity ( ) const

Returns the angular velocity of the emitter.

◆ builder()

static Builder jet::VolumeParticleEmitter2::builder ( )
static

Returns builder fox VolumeParticleEmitter2.

◆ initialVelocity()

Vector2D jet::VolumeParticleEmitter2::initialVelocity ( ) const

Sets the initial velocity of the particles.

◆ isOneShot()

bool jet::VolumeParticleEmitter2::isOneShot ( ) const

Returns true if particles should be emitted just once.

◆ jitter()

double jet::VolumeParticleEmitter2::jitter ( ) const

Returns jitter amount.

◆ linearVelocity()

Vector2D jet::VolumeParticleEmitter2::linearVelocity ( ) const

Returns the linear velocity of the emitter.

◆ maxNumberOfParticles()

size_t jet::VolumeParticleEmitter2::maxNumberOfParticles ( ) const

Returns max number of particles to be emitted.

◆ maxRegion()

const BoundingBox2D& jet::VolumeParticleEmitter2::maxRegion ( ) const

Returns max particle gen region.

◆ setAllowOverlapping()

void jet::VolumeParticleEmitter2::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 jet::VolumeParticleEmitter2::setAngularVelocity ( double  newAngularVel)

Sets the linear velocity of the emitter.

◆ setInitialVelocity()

void jet::VolumeParticleEmitter2::setInitialVelocity ( const Vector2D newInitialVel)

Returns the initial velocity of the particles.

◆ setIsOneShot()

void jet::VolumeParticleEmitter2::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 jet::VolumeParticleEmitter2::setJitter ( double  newJitter)

Sets jitter amount between 0 and 1.

◆ setLinearVelocity()

void jet::VolumeParticleEmitter2::setLinearVelocity ( const Vector2D newLinearVel)

Sets the linear velocity of the emitter.

◆ setMaxNumberOfParticles()

void jet::VolumeParticleEmitter2::setMaxNumberOfParticles ( size_t  newMaxNumberOfParticles)

Sets the max number of particles to be emitted.

◆ setMaxRegion()

void jet::VolumeParticleEmitter2::setMaxRegion ( const BoundingBox2D newBox)

Sets the max particle gen region.

◆ setPointGenerator()

void jet::VolumeParticleEmitter2::setPointGenerator ( const PointGenerator2Ptr 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 jet::VolumeParticleEmitter2::setSpacing ( double  newSpacing)

Sets the spacing between particles.

◆ setSurface()

void jet::VolumeParticleEmitter2::setSurface ( const ImplicitSurface2Ptr newSurface)

Sets the source surface.

◆ spacing()

double jet::VolumeParticleEmitter2::spacing ( ) const

Returns the spacing between particles.

◆ surface()

const ImplicitSurface2Ptr& jet::VolumeParticleEmitter2::surface ( ) const

Returns source surface.


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