ParticleInitializer struct
Initialization parameters for a batch of emitted particles.
Each field is a [min, max] range from which a random value is drawn per particle when ParticleSystem::
Public functions
-
void SetAmount(std::
int32_t amount) - Sets a fixed number of particles to emit.
-
void SetAmount(std::
int32_t minAmount, std:: int32_t maxAmount) - Sets the range of the number of particles to emit.
- void SetLife(float life)
- Sets a fixed particle life in seconds.
- void SetLife(float minLife, float maxLife)
- Sets the range of the particle life in seconds.
- void SetPosition(float x, float y)
- Sets a fixed initial position offset.
- void SetPosition(float minX, float minY, float maxX, float maxY)
- Sets the range of the initial position offset.
- void SetPositionAndRadius(float x, float y, float radius)
- Sets a square position range centered on the specified point.
- void SetPosition(Vector2f pos)
- Sets a fixed initial position offset.
- void SetPosition(Vector2f minPos, Vector2f maxPos)
- Sets the range of the initial position offset.
- void SetPositionAndRadius(Vector2f pos, float radius)
- Sets a square position range centered on the specified point.
- void SetPositionInDisc(float radius)
- Sets a square position range centered on the origin.
- void SetVelocity(float x, float y)
- Sets a fixed initial velocity.
- void SetVelocity(float minX, float minY, float maxX, float maxY)
- Sets the range of the initial velocity.
- void SetVelocityAndRadius(float x, float y, float radius)
- Sets a square velocity range centered on the specified vector.
- void SetVelocityAndScale(float x, float y, float minScale, float maxScale)
- Sets a velocity range by scaling the specified vector between two factors.
- void SetVelocityAndAngle(float x, float y, float angle)
- Sets a velocity range by rotating the specified vector by half the given angle in both directions.
- void SetVelocity(Vector2f vel)
- Sets a fixed initial velocity.
- void SetVelocity(Vector2f minVel, Vector2f maxVel)
- Sets the range of the initial velocity.
- void SetVelocityAndRadius(Vector2f vel, float radius)
- Sets a square velocity range centered on the specified vector.
- void SetVelocityAndScale(Vector2f vel, float minScale, float maxScale)
- Sets a velocity range by scaling the specified vector between two factors.
- void SetVelocityAndAngle(Vector2f vel, float angle)
- Sets a velocity range by rotating the specified vector by half the given angle in both directions.
- void SetRotation(float rot)
- Sets a fixed initial rotation in degrees.
- void SetRotation(float minRot, float maxRot)
- Sets the range of the initial rotation in degrees.
Public variables
- Vector2i RndAmount
- Range of the number of particles to emit.
- Vector2f RndLife
- Range of the particle life in seconds.
- Vector2f RndPositionX
- Range of the initial horizontal position offset.
- Vector2f RndPositionY
- Range of the initial vertical position offset.
- Vector2f RndVelocityX
- Range of the initial horizontal velocity.
- Vector2f RndVelocityY
- Range of the initial vertical velocity.
- Vector2f RndRotation
- Range of the initial rotation in degrees, used only when emitterRotation is
false. - bool EmitterRotation
- Whether particles are rotated to face their emission velocity instead of using rndRotation.