class ParticleEmitterConeShape

Particle emitter shape that emits particles from a cone.

Particles can be created on cone base or volume, while controlling the radial arc of the emitted portion of the volume, as well as thickness of the cone emission volume. All particles will have random normals within the distribution of the cone.

Public

Constructors

ParticleEmitterConeShape

ParticleEmitterConeShape(const ParticleConeShapeSettings &settings)

ParticleEmitterConeShape

ParticleEmitterConeShape() = default

Methods

~ParticleEmitterConeShape

virtual ~ParticleEmitterConeShape() noexcept = default

SetSettings

void SetSettings(const ParticleConeShapeSettings &settings)

Options describing the shape.

GetSettings

const ParticleConeShapeSettings &GetSettings() const

staticCreate

static SPtr<ParticleEmitterConeShape> Create(const ParticleConeShapeSettings &settings)

Creates a new particle emitter cone shape.

staticCreate

static SPtr<ParticleEmitterConeShape> Create()

Creates a new particle emitter cone shape.

staticGetRttiStatic

static RTTIType *GetRttiStatic()

GetRtti

RTTIType *GetRtti() const override

Returns an interface you can use to access class' Run Time Type Information.

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

void SpawnInternal(const Random &random, Vector3 &position, Vector3 &normal) const

Spawns a single particle randomly, generating its position and normal.

SpawnInternal

void SpawnInternal(float t, Vector3 &position, Vector3 &normal) const

Spawns a single particle on the specified point on the cone, generating its position and normal.

Protected

Methods

CalcBounds

void CalcBounds(AABox &shape, AABox &velocity) const override

Calculates the bounds of the emitter shape.

shape
AABB for the emitter shape itself.
velocity
AABB for the generated normals.

GetPointInCone

void GetPointInCone(const Vector2 &pos2D, float distance, Vector3 &position, Vector3 &normal) const

Generates a position and normal of a particle based on the input 2D position on the cone circle base.

Fields

mSettings