Table of Contents

Class InitialPositionSeed

Namespace
Stride.Particles.Initializers
Assembly
Stride.Particles.dll

The InitialPositionSeed is an initializer which sets the particle's initial position at the time of spawning

[DataContract("InitialPositionSeed")]
[Display("Position", null)]
public class InitialPositionSeed : ParticleInitializer
Inheritance
InitialPositionSeed
Inherited Members

Constructors

InitialPositionSeed()

Default constructor which also registers the fields required by this updater

public InitialPositionSeed()

Fields

Interpolate

If set to true it will interpolate the particles between the old and the new position, rather than using only the new one

[DataMember(50)]
[Display("Interpolate", null)]
public bool Interpolate

Field Value

bool

Properties

DebugDraw

Should this Particle Module's bounds be displayed as a debug draw

[DataMember(-1)]
public bool DebugDraw { get; set; }

Property Value

bool

PositionMax

The right upper front corner of the box

[DataMember(40)]
[Display("Position max", null)]
public Vector3 PositionMax { get; set; }

Property Value

Vector3

PositionMin

The left bottom back corner of the box

[DataMember(30)]
[Display("Position min", null)]
public Vector3 PositionMin { get; set; }

Property Value

Vector3

SeedOffset

The seed offset used to match or separate random values

[DataMember(8)]
[Display("Random Seed", null)]
public uint SeedOffset { get; set; }

Property Value

uint

Methods

Initialize(ParticlePool, int, int, int)

Override Initialize if your module acts as an Initializer and change its type to Initializer

public override void Initialize(ParticlePool pool, int startIdx, int endIdx, int maxCapacity)

Parameters

pool ParticlePool

Particle pool to target

startIdx int

Starting index (included from the array)

endIdx int

End index (excluded from the array)

maxCapacity int

Max pool capacity (loops after this point) so that it's possible for (endIdx < startIdx)

TryGetDebugDrawShape(out DebugDrawShape, out Vector3, out Quaternion, out Vector3)

Attepmts to get a debug shape (shape type and location matrix) for the current module in order to display its boundaries better

public override bool TryGetDebugDrawShape(out DebugDrawShape debugDrawShape, out Vector3 translation, out Quaternion rotation, out Vector3 scale)

Parameters

debugDrawShape DebugDrawShape

Type of the debug draw shape

translation Vector3

Translation of the shape

rotation Quaternion

Rotation of the shape

scale Vector3

Scaling of the shape

Returns

bool