class
ParticleEmitterBoxShape
Inherits:
ParticleEmitterShape
Particle emitter shape that emits particles from an axis aligned box.
Particles can be emitted from box volume, surface or edges. All particles have their normals set to positive Z direction.
Public
Constructors
ParticleEmitterBoxShape
ParticleEmitterBoxShape() = default
ParticleEmitterBoxShape
ParticleEmitterBoxShape(const ParticleBoxShapeSettings &settings)
Methods
SetSettings
Options describing the shape.
GetSettings
staticCreate
Creates a new particle emitter box shape.
staticCreate
static SPtr<ParticleEmitterBoxShape> Create()
Creates a new particle emitter box shape.
staticGetRttiStatic
static RTTIType *GetRttiStatic()
Internal
Methods
SpawnInternal
u32 SpawnInternal(const Random &random, ParticleSet &particles, u32 count, const ParticleSystemState &state) const override
Spawns a new set of particles using the current shape's distribution.
- random
- Random number generator.
- particles
- Particle set in which to insert new particles.
- count
- Number of particles to spawn.
- state
- Optional state that can contain various per-frame information required for spawning the particles.
Returns: Index at which the first of the particles was inserted, with other particles following sequentially.
SpawnInternal
Spawns a single particle, generating its position and normal.
Protected
Methods
Fields
mSettings
ParticleBoxShapeSettings mSettings
mSurfaceArea
float[3] mSurfaceArea
mEdgeLengths
float[3] mEdgeLengths