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
Properties
DebugDraw
Should this Particle Module's bounds be displayed as a debug draw
[DataMember(-1)]
public bool DebugDraw { get; set; }
Property Value
PositionMax
The right upper front corner of the box
[DataMember(40)]
[Display("Position max", null)]
public Vector3 PositionMax { get; set; }
Property Value
PositionMin
The left bottom back corner of the box
[DataMember(30)]
[Display("Position min", null)]
public Vector3 PositionMin { get; set; }
Property Value
SeedOffset
The seed offset used to match or separate random values
[DataMember(8)]
[Display("Random Seed", null)]
public uint SeedOffset { get; set; }
Property Value
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
ParticlePoolParticle pool to target
startIdx
intStarting index (included from the array)
endIdx
intEnd index (excluded from the array)
maxCapacity
intMax 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
DebugDrawShapeType of the debug draw shape
translation
Vector3Translation of the shape
rotation
QuaternionRotation of the shape
scale
Vector3Scaling of the shape