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

3-D volumetric particle emitter. More...

#include <jet/volume_particle_emitter3.h>

Inheritance diagram for jet::VolumeParticleEmitter3:
jet::ParticleEmitter3

Classes

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

Public Member Functions

 VolumeParticleEmitter3 (const ImplicitSurface3Ptr &implicitSurface, const BoundingBox3D &maxRegion, double spacing, const Vector3D &initialVel=Vector3D(), const Vector3D &linearVel=Vector3D(), const Vector3D &angularVel=Vector3D(), size_t maxNumberOfParticles=kMaxSize, 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 ImplicitSurface3Ptrsurface () const
 Returns source surface. More...
 
void setSurface (const ImplicitSurface3Ptr &newSurface)
 Sets the source surface. More...
 
const BoundingBox3DmaxRegion () const
 Returns max particle gen region. More...
 
void setMaxRegion (const BoundingBox3D &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 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 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...
 
Vector3D initialVelocity () const
 Sets the initial velocity of the particles. More...
 
void setInitialVelocity (const Vector3D &newInitialVel)
 Returns the initial velocity of the particles. More...
 
Vector3D linearVelocity () const
 Returns the linear velocity of the emitter. More...
 
void setLinearVelocity (const Vector3D &newLinearVel)
 Sets the linear velocity of the emitter. More...
 
Vector3D angularVelocity () 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 jet::ParticleEmitter3
 ParticleEmitter3 ()
 Default constructor. More...
 
virtual ~ParticleEmitter3 ()
 Destructor. More...
 
void update (double currentTimeInSeconds, double timeIntervalInSeconds)
 
const ParticleSystemData3Ptrtarget () const
 Returns the target particle system to emit. More...
 
void setTarget (const ParticleSystemData3Ptr &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 ParticleEmitter3::update function is invoked. More...
 

Static Public Member Functions

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

Additional Inherited Members

- Public Types inherited from jet::ParticleEmitter3
typedef std::function< void(ParticleEmitter3 *, double, double)> OnBeginUpdateCallback
 Callback function type for update calls. More...
 
- Protected Member Functions inherited from jet::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()

jet::VolumeParticleEmitter3::VolumeParticleEmitter3 ( const ImplicitSurface3Ptr implicitSurface,
const BoundingBox3D maxRegion,
double  spacing,
const Vector3D initialVel = Vector3D(),
const Vector3D linearVel = Vector3D(),
const Vector3D angularVel = Vector3D(),
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.
[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::VolumeParticleEmitter3::allowOverlapping ( ) const

Returns true if particles can be overlapped.

◆ angularVelocity()

Vector3D jet::VolumeParticleEmitter3::angularVelocity ( ) const

Returns the angular velocity of the emitter.

◆ builder()

static Builder jet::VolumeParticleEmitter3::builder ( )
static

Returns builder fox VolumeParticleEmitter3.

◆ initialVelocity()

Vector3D jet::VolumeParticleEmitter3::initialVelocity ( ) const

Sets the initial velocity of the particles.

◆ isOneShot()

bool jet::VolumeParticleEmitter3::isOneShot ( ) const

Returns true if particles should be emitted just once.

◆ jitter()

double jet::VolumeParticleEmitter3::jitter ( ) const

Returns jitter amount.

◆ linearVelocity()

Vector3D jet::VolumeParticleEmitter3::linearVelocity ( ) const

Returns the linear velocity of the emitter.

◆ maxNumberOfParticles()

size_t jet::VolumeParticleEmitter3::maxNumberOfParticles ( ) const

Returns max number of particles to be emitted.

◆ maxRegion()

const BoundingBox3D& jet::VolumeParticleEmitter3::maxRegion ( ) const

Returns max particle gen region.

◆ setAllowOverlapping()

void jet::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 jet::VolumeParticleEmitter3::setAngularVelocity ( const Vector3D newAngularVel)

Sets the linear velocity of the emitter.

◆ setInitialVelocity()

void jet::VolumeParticleEmitter3::setInitialVelocity ( const Vector3D newInitialVel)

Returns the initial velocity of the particles.

◆ setIsOneShot()

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

Sets jitter amount between 0 and 1.

◆ setLinearVelocity()

void jet::VolumeParticleEmitter3::setLinearVelocity ( const Vector3D newLinearVel)

Sets the linear velocity of the emitter.

◆ setMaxNumberOfParticles()

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

Sets the max number of particles to be emitted.

◆ setMaxRegion()

void jet::VolumeParticleEmitter3::setMaxRegion ( const BoundingBox3D newBox)

Sets the max particle gen region.

◆ setPointGenerator()

void jet::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 jet::VolumeParticleEmitter3::setSpacing ( double  newSpacing)

Sets the spacing between particles.

◆ setSurface()

void jet::VolumeParticleEmitter3::setSurface ( const ImplicitSurface3Ptr newSurface)

Sets the source surface.

◆ spacing()

double jet::VolumeParticleEmitter3::spacing ( ) const

Returns the spacing between particles.

◆ surface()

const ImplicitSurface3Ptr& jet::VolumeParticleEmitter3::surface ( ) const

Returns source surface.


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