Go to the documentation of this file.
7 #ifndef INCLUDE_JET_VOLUME_PARTICLE_EMITTER3_H_
8 #define INCLUDE_JET_VOLUME_PARTICLE_EMITTER3_H_
161 size_t _maxNumberOfParticles =
kMaxSize;
162 size_t _numberOfEmittedParticles = 0;
164 double _jitter = 0.0;
165 bool _isOneShot =
true;
166 bool _allowOverlapping =
false;
175 double currentTimeInSeconds,
176 double timeIntervalInSeconds)
override;
241 bool _isBoundSet =
false;
243 double _spacing = 0.1;
247 size_t _maxNumberOfParticles =
kMaxSize;
248 double _jitter = 0.0;
249 bool _isOneShot =
true;
250 bool _allowOverlapping =
false;
256 #endif // INCLUDE_JET_VOLUME_PARTICLE_EMITTER3_H_
void setMaxRegion(const BoundingBox3D &newBox)
Sets the max particle gen region.
1-D array class.
Definition: array1.h:31
Front-end to create VolumeParticleEmitter3 objects step by step.
Definition: volume_particle_emitter3.h:195
Builder & withIsOneShot(bool isOneShot)
Returns builder with one-shot flag.
std::shared_ptr< ImplicitSurface3 > ImplicitSurface3Ptr
Shared pointer type for the ImplicitSurface3.
Definition: implicit_surface3.h:43
std::shared_ptr< ParticleSystemData3 > ParticleSystemData3Ptr
Shared pointer type of ParticleSystemData3.
Definition: particle_system_data3.h:250
Builder & withAllowOverlapping(bool allowOverlapping)
Returns builder with overlapping flag.
Vector3D initialVelocity() const
Sets the initial velocity of the particles.
const BoundingBox3D & maxRegion() const
Returns max particle gen region.
3-D axis-aligned bounding box class.
Definition: bounding_box3.h:41
Builder & withJitter(double jitter)
Returns builder with jitter amount.
Abstract base class for 3-D particle emitter.
Definition: particle_emitter3.h:18
Builder & withImplicitSurface(const ImplicitSurface3Ptr &implicitSurface)
Returns builder with implicit surface defining volume shape.
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)
VolumeParticleEmitter3 build() const
Builds VolumeParticleEmitter3.
Builder & withSurface(const Surface3Ptr &surface)
Returns builder with surface defining volume shape.
VolumeParticleEmitter3Ptr makeShared() const
Builds shared pointer of VolumeParticleEmitter3 instance.
static Builder builder()
Returns builder fox VolumeParticleEmitter3.
Builder & withInitialVelocity(const Vector3D &initialVel)
Returns builder with initial velocity.
void setInitialVelocity(const Vector3D &newInitialVel)
Returns the initial velocity of the particles.
constexpr size_t kMaxSize
Max size_t.
Definition: constants.h:79
std::shared_ptr< Surface3 > Surface3Ptr
Shared pointer for the Surface3 type.
Definition: surface3.h:109
Builder & withMaxNumberOfParticles(size_t maxNumberOfParticles)
Returns builder with max number of particles.
void setAllowOverlapping(bool newValue)
Sets the flag to true if particles can overlap each other.
void setPointGenerator(const PointGenerator3Ptr &newPointsGen)
Sets the point generator.
Definition: advection_solver2.h:18
void setMaxNumberOfParticles(size_t newMaxNumberOfParticles)
Sets the max number of particles to be emitted.
3-D volumetric particle emitter.
Definition: volume_particle_emitter3.h:26
Builder & withSpacing(double spacing)
Returns builder with spacing.
void setSurface(const ImplicitSurface3Ptr &newSurface)
Sets the source surface.
void setIsOneShot(bool newValue)
Sets the flag to true if particles are emitted just once.
void setJitter(double newJitter)
Sets jitter amount between 0 and 1.
Builder & withLinearVelocity(const Vector3D &linearVel)
Returns builder with linear velocity.
std::shared_ptr< PointGenerator3 > PointGenerator3Ptr
Shared pointer for the PointGenerator3 type.
Definition: point_generator3.h:56
const ImplicitSurface3Ptr & surface() const
Returns source surface.
Builder & withMaxRegion(const BoundingBox3D &bounds)
Returns builder with max region.
void setAngularVelocity(const Vector3D &newAngularVel)
Sets the linear velocity of the emitter.
Vector3< double > Vector3D
Double-type 3D vector.
Definition: vector3.h:349
Builder & withRandomSeed(uint32_t seed)
Returns builder with random seed.
3-D vector class.
Definition: vector3.h:25
void setLinearVelocity(const Vector3D &newLinearVel)
Sets the linear velocity of the emitter.
double jitter() const
Returns jitter amount.
Vector3D angularVelocity() const
Returns the angular velocity of the emitter.
bool isOneShot() const
Returns true if particles should be emitted just once.
bool allowOverlapping() const
Returns true if particles can be overlapped.
Builder & withAngularVelocity(const Vector3D &angularVel)
Returns builder with angular velocity.
size_t maxNumberOfParticles() const
Returns max number of particles to be emitted.
Vector3D linearVelocity() const
Returns the linear velocity of the emitter.
void setSpacing(double newSpacing)
Sets the spacing between particles.
double spacing() const
Returns the spacing between particles.
std::shared_ptr< VolumeParticleEmitter3 > VolumeParticleEmitter3Ptr
Shared pointer for the VolumeParticleEmitter3 type.
Definition: volume_particle_emitter3.h:189