ParticleUpdater

Description

abstract class Tinman.Engine.Particles.ParticleUpdater

Derived from

IParticleUpdater

Abstract base class for IParticleUpdater implementations.

Public / Constructors

Color​Scale


public static method ColorScale → (3)

color in : IColorRamp

The color-ramp to use for generating low-dynamic range colors or null to use the uniform color white.

intensity in : ICurve

The curve to use for obtaining the high-dynamic intensity factor for color in or null to use the uniform intensity factor 1.

scale in : ICurve

The curve to use for generating the particle size scale factor or null to use the uniform scale factor of 1.

returns → IParticleUpdater

The created IParticleUpdater object.

Creates a IParticleUpdater that generates data based on the particle age.

This updater creates the following particle data, if necessary:

When querying the given color ramp and curves, the relative particle age R = A / M is used, where A is the current particle age and M is the maximum particle age. For color in, R is passed to IColorRamp.Get. For intensity in and scale in, R * S is passed to ICurve.Compute1D, where S is ICurve.Count minus one.

Damping

2 overloads


public static method Damping1 → (1)

damping opt : float64 = 0.9

[>=0]
The damping factor to apply to the velocities, over the duration of one second. For example, using 0.9 will reduce velocities to approximately 35% after 10 seconds.

returns → IParticleUpdater

The created IParticleUpdater object.

Creates a IParticleUpdater that applies damping to velocities.

This updater modifies the following particle data, if present:


public static method Damping2 → (1)

damping in : Vec2D

The damping factors to apply to the linear velocities (Vec2D.X) and the angular velocities (Vec2D.Y), over the duration of one second. For example, using 0.9 will reduce velocities to approximately 35% after 10 seconds.

returns → IParticleUpdater

The created IParticleUpdater object.

Creates a IParticleUpdater that applies damping to velocities.

This updater modifies the following particle data, if present:

Gravity​Point


public static method GravityPoint → (2)

center in : Vec3D

The center of gravity.

acceleration opt : float64 = 9.8

The gravity acceleration (in world-units per square second).

returns → IParticleUpdater

The created IParticleUpdater object.

Creates a IParticleUpdater that applies gravity to linear velocity.

This updater creates the following particle data, if necessary:

Gravity​Vector


public static method GravityVector → (2)

direction in : Vec3D

The direction of the gravity force.

acceleration opt : float64 = 9.8

The gravity acceleration (in world-units per square second).

returns → IParticleUpdater

The created IParticleUpdater object.

Creates a IParticleUpdater that applies gravity to linear velocity.

This updater creates the following particle data, if necessary:

Velocity​Angular


public static method VelocityAngular → ()

returns → IParticleUpdater

The created IParticleUpdater object.

Creates a IParticleUpdater that applies angular velocity to orientation.

This updater creates the following particle data, if necessary:

Velocity​Linear


public static method VelocityLinear → ()

returns → IParticleUpdater

The created IParticleUpdater object.

Creates a IParticleUpdater that applies linear velocity to position.

This updater creates the following particle data, if necessary:

This updater reads the following particle data, if present:

Protected / Methods

Create​Vertex​Arrays


[EmptyBody]
protected virtual method CreateVertexArrays → (1)

vertexArrays in : VertexArrays

The vertex arrays to update, will never be null.

Creates required vertex arrays, if necessary.

Protected / Attributes

acceleration


protected attribute acceleration → (float32 [ ])

The ParticleBuffer.Acceleration data array or null.

age


protected attribute age → (float32 [ ])

The ParticleBuffer.Age data array, never null.

color


protected attribute color → (int32 [ ])

The ParticleBuffer.Color data array or null.

data


protected attribute data → (VertexArrays)

The per-particle data arrays that have been specified via IParticleUpdater.SetVertexArrays.

geometry​Id


protected attribute geometryId → (int32 [ ])

The ParticleBuffer.GeometryId data array or null.

intensity


protected attribute intensity → (float32 [ ])

The ParticleBuffer.Intensity data array or null.

orientation


protected attribute orientation → (float32 [ ])

The ParticleBuffer.Orientation data array or null.

position


protected attribute position → (float64 [ ])

The Semantic.Position data array, never null.

scale


protected attribute scale → (float32 [ ])

The ParticleBuffer.Scale data array or null.

time​Step


protected attribute timeStep → (float32)

The constant time-step that has been specified via IParticleUpdater.SetTimeStep.

velocity​Angular


protected attribute velocityAngular → (float32 [ ])

The ParticleBuffer.VelocityAngular data array or null.

velocity​Linear


protected attribute velocityLinear → (float32 [ ])

The ParticleBuffer.VelocityLinear data array or null.