Table of Contents

Struct Particle

Namespace
Stride.Particles
Assembly
Stride.Particles.dll

The most basic unit of a ParticleSystem You can access individual fields with a ParticleFieldAccessor

public struct Particle
Inherited Members

Constructors

Particle(nint)

Creates a particle from a raw pointer, assuming the pointer references valid particle data block

public Particle(nint pointer)

Parameters

pointer nint

Fields

Pointer

Pointer to the particle data block

public readonly nint Pointer

Field Value

nint

Properties

this[ParticleFieldAccessor]

public nint this[ParticleFieldAccessor accessor] { get; }

Parameters

accessor ParticleFieldAccessor

Property Value

nint

Methods

Equals(object)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object other)

Parameters

other object

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

Get<T>(ParticleFieldAccessor<T>)

Gets the particle's field value. However, you should try to use the indexer wherever possible.

public T Get<T>(ParticleFieldAccessor<T> accessor) where T : struct

Parameters

accessor ParticleFieldAccessor<T>

The field accessor

Returns

T

The field value.

Type Parameters

T

The field type.

Set<T>(ParticleFieldAccessor<T>, T)

Sets the particle's field to a value. However, you should try to use the indexer wherever possible.

public void Set<T>(ParticleFieldAccessor<T> accessor, T value) where T : struct

Parameters

accessor ParticleFieldAccessor<T>

The field accessor

value T

The value to set

Type Parameters

T

The field type.

Set<T>(ParticleFieldAccessor<T>, ref T)

Sets the particle's field to a value. However, you should try to use the indexer wherever possible.

public void Set<T>(ParticleFieldAccessor<T> accessor, ref T value) where T : struct

Parameters

accessor ParticleFieldAccessor<T>

The field accessor

value T

The value to set

Type Parameters

T

The field type.

Operators

operator ==(Particle, Particle)

Checks if the two particles point to the same pointer.

public static bool operator ==(Particle particleLeft, Particle particleRight)

Parameters

particleLeft Particle

Left side particle to compare

particleRight Particle

Right side particle to compare

Returns

bool

operator !=(Particle, Particle)

public static bool operator !=(Particle particleLeft, Particle particleRight)

Parameters

particleLeft Particle
particleRight Particle

Returns

bool