Struct ParticleSpan ​
Namespace: ValveResourceFormat.Particles
Assembly: ValveResourceFormat.dll
A contiguous run of particles in a ParticleCollection, read and written one attribute column at a time. A default instance is empty and has no columns to read.
public readonly struct ParticleSpanProperties ​
IsEmpty ​
Gets a value indicating whether the span holds no particles.
public bool IsEmpty { get; }Property Value ​
bool
Length ​
Gets the number of particles in the span.
public int Length { get; }Property Value ​
int
Time ​
Gets the system time the ages of the particles are measured against.
public float Time { get; }Property Value ​
float
this[Range] ​
Gets the particles in range of the span.
public ParticleSpan this[Range range] { get; }Property Value ​
Methods ​
ReadFloat(ParticleField, int) ​
Gets the float field of the particle at index, an integer attribute as its bits, or the field's constant when it is not stored.
public float ReadFloat(ParticleField field, int index)Parameters ​
field ParticleField
index int
Returns ​
float
ReadInteger(ParticleField, int) ​
Gets the integer field of the particle at index, as ParticleSpan.ReadFloat(ParticleField, int) does.
public int ReadInteger(ParticleField field, int index)Parameters ​
field ParticleField
index int
Returns ​
int
ReadVector(ParticleField, int) ​
Gets the vector field of the particle at index, or the field's constant when it is not stored.
public Vector3 ReadVector(ParticleField field, int index)Parameters ​
field ParticleField
index int
Returns ​
Slice(int, int) ​
Forms a slice of length particles from offset.
public ParticleSpan Slice(int offset, int length)Parameters ​
offset int
length int

