ParticleOutput

Description

abstract class Tinman.Engine.Particles.ParticleOutput

Derived from

IParticleOutput

Extended by

InstanceOutput sealed

Abstract base class for IParticleOutput implementations.

Protected / Constants

Snapshot​Count


protected constant SnapshotCount → (2:int32)

Number of particle data snapshots.

Protected / Constructors

Particle​Output


protected constructor ParticleOutput → (1)

capacity in : int32

[>0]
The capacity, in model instances.

Creates a new instance of ParticleOutput.

Protected / Methods

Do​Output


protected abstract method DoOutput → (5)

factor in : float32

The interpolation factor in the range [0..1], where 0 maps to previous and 1 maps to current. If 0, current must not be accessed. If 1, previous must not be accessed.

offset in : int32

The index offset to add to get from current to previous.

count in : int32

The maximum number of model instances to write.

geometryId in : int32

The particle geometry identifier.

resource in : object

The target GPU resource (IParticleOutput.CanOutput has returned true for it).

returns → int32

The number of model instances that have been written to resource in.

Uses the snapshots to create GPU particle data.

Do​Prepare


protected abstract method DoPrepare → (1)

particles in : ParticleBuffer

The particle buffer.

Updates the current snapshot by reading per-particle data from the buffer.

This method will always be called between ParticleBuffer.SnapshotBegin and ParticleBuffer.SnapshotEnd, after range and time have been updated accordingly.

Protected / Attributes

current


protected attribute current → (int32)

Index of current snapshot, in the range [0..SnapshotCount-1].

previous


protected attribute previous → (int32)

Index of previous snapshot, in the range [0..SnapshotCount-1].

range


protected attribute range → (RangeI [ ])

The particle buffer snapshot ranges.

time


protected attribute time → (float64 [ ])

The particle buffer snapshot times.