IParticleUpdater

Description

interface Tinman.Engine.Particles.IParticleUpdater

Derived from

IBeginEnd

Extended by

ParticleUpdater abstract

Base interface for classes that update per-particle data.

Concrete implementations typically add a specific behaviour to particles, for example linear movement / rotation, damping or gravity.

Public / Methods

Append


public method Append → (1)

other in : IParticleUpdater

[not-null]
The other updater.

returns → IParticleUpdater

An aggregate particle updater that calls this one first and the given other in one second (may be the same object as this).

Appends the given updater to this one.

Initialize​Particles


[BeginEnd]
public method InitializeParticles → (2)

first in : int32

[>=0]
Index of first particle to update.

count in : int32

[>=0]
Number of subsequent particles to update.

Initializes the given particles.

This method is called by ParticleBuffer.CreateEnd to initialize particle data, if necessary. It should thus finish quickly. Expensive calculations should be performed by UpdateParticles, as that method is called by a background thread.

Set​Time​Step


public method SetTimeStep → (1)

timeStep in : float32

[>0]
The constant time-step, in seconds.

Specifies the constant time-step that will be used to update particles.

Set​Vertex​Arrays


public method SetVertexArrays → (1)

vertexArrays in : VertexArrays

[not-null]
The vertex data collection.

Sets the vertex data containers that will be read from and/or written to by the updater.

This method will create required vertex data arrays with VertexArrays.CreateVertexArray, if they are missing.

Update​Particles


[BeginEnd]
public method UpdateParticles → (2)

first in : int32

[>=0]
Index of first particle to update.

count in : int32

[>=0]
Number of subsequent particles to update.

Updates the given particles.

This method is called from a background thread, so particle updates may involve expensive calculations, such as collision detection or procedural noise.