Particle Struct
Namespace: Stride.ParticlesAssembly: Stride.Particles.dll
The most basic unit of a ParticleSystem You can access individual fields with a ParticleFieldAccessor
public struct Particle
Name | Description | |
---|---|---|
Constructors | ||
Particle(IntPtr) | Creates a particle from a raw pointer, assuming the pointer references valid particle data block |
|
Fields | ||
Pointer | Pointer to the particle data block |
|
Properties | ||
Item[ParticleFieldAccessor] | ||
Methods | ||
Equals(Object) | ||
Get<T>(ParticleFieldAccessor<T>) | Gets the particle's field value. However, you should try to use the indexer wherever possible. |
|
GetHashCode() | ||
Set<T>(ParticleFieldAccessor<T>, T) | Sets the particle's field to a value. However, you should try to use the indexer wherever possible. |
|
Set<T>(ParticleFieldAccessor<T>, ref T) | Sets the particle's field to a value. However, you should try to use the indexer wherever possible. |
|
Operators | ||
Equality(Particle, Particle) | Checks if the two particles point to the same pointer. |
|
Implicit(Particle to IntPtr) | ||
Inequality(Particle, Particle) |
Constructors
Particle(IntPtr)
Creates a particle from a raw pointer, assuming the pointer references valid particle data block
public Particle(IntPtr pointer)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | pointer |
Fields
Pointer
Pointer to the particle data block
public readonly IntPtr Pointer
Field Value
Type | Description |
---|---|
System.IntPtr |
Properties
Item[ParticleFieldAccessor]
public readonly IntPtr this[ParticleFieldAccessor accessor] { get; }
Parameters
Type | Name | Description |
---|---|---|
ParticleFieldAccessor | accessor |
Property Value
Type | Description |
---|---|
System.IntPtr |
Methods
Equals(Object)
public override bool Equals(object other)
Parameters
Type | Name | Description |
---|---|---|
System.Object | other |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
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
Type | Name | Description |
---|---|---|
ParticleFieldAccessor<T> | accessor | The field accessor |
Returns
Type | Description |
---|---|
T | The field value. |
Type Parameters
Name | Description |
---|---|
T | The field type. |
GetHashCode()
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
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
Type | Name | Description |
---|---|---|
ParticleFieldAccessor<T> | accessor | The field accessor |
T | value | The value to set |
Type Parameters
Name | Description |
---|---|
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
Type | Name | Description |
---|---|---|
ParticleFieldAccessor<T> | accessor | The field accessor |
T | value | The value to set |
Type Parameters
Name | Description |
---|---|
T | The field type. |
Operators
Equality(Particle, Particle)
Checks if the two particles point to the same pointer.
public static bool operator ==(Particle particleLeft, Particle particleRight)
Parameters
Type | Name | Description |
---|---|---|
Particle | particleLeft | Left side particle to compare |
Particle | particleRight | Right side particle to compare |
Returns
Type | Description |
---|---|
System.Boolean |
Implicit(Particle to IntPtr)
public static implicit operator IntPtr(Particle particle)
Parameters
Type | Name | Description |
---|---|---|
Particle | particle |
Returns
Type | Description |
---|---|
System.IntPtr |
Inequality(Particle, Particle)
public static bool operator !=(Particle particleLeft, Particle particleRight)
Parameters
Type | Name | Description |
---|---|---|
Particle | particleLeft | |
Particle | particleRight |
Returns
Type | Description |
---|---|
System.Boolean |