Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    Particle Struct

    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
    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)
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    Fields


    Pointer

    Pointer to the particle data block

    public readonly IntPtr Pointer
    Field Value
    Type Description
    System.IntPtr
    | Improve this Doc View Source

    Properties


    Item[ParticleFieldAccessor]

    public readonly IntPtr this[ParticleFieldAccessor accessor] { get; }
    Parameters
    Type Name Description
    ParticleFieldAccessor accessor
    Property Value
    Type Description
    System.IntPtr
    | Improve this Doc View Source

    Methods


    Equals(Object)

    public override bool Equals(object other)
    Parameters
    Type Name Description
    System.Object other
    Returns
    Type Description
    System.Boolean
    Overrides
    System.ValueType.Equals(System.Object)

    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
    System.ValueType.GetHashCode()

    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.

    | Improve this Doc View Source

    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

    Inherited Members

    System.ValueType.ToString()

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation