Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    ParticleBufferState Struct

    Namespace: Stride.Particles.VertexLayouts
    Assembly: Stride.Particles.dll

    public struct ParticleBufferState
    Name Description
    Constructors
    ParticleBufferState(IntPtr, ParticleVertexBuilder)
    Fields
    CurrentParticleIndex
    CurrentVertex
    VertexBuffer
    VertexBufferOrigin
    VertexStride
    VerticesPerSegCurrent
    VerticesPerSegFirst
    VerticesPerSegLast
    VerticesPerSegMiddle
    Properties
    DefaultTexCoords
    Methods
    GetAccessor(AttributeDescription)
    NextParticle()

    Advances the pointer to the next particle in the buffer, so that its first vertex can be written

    NextSegment()

    Advances the pointer to the next segment in the buffer, so that its first vertex can be written

    NextVertex()

    Advances the pointer to the next vertex in the buffer, so that it can be written

    SetAttribute(AttributeAccessor, IntPtr)

    Sets the data for the current vertex using the provided AttributeAccessor

    SetAttributePerParticle(AttributeAccessor, IntPtr)

    Sets the same data for the all vertices in the current particle using the provided AttributeAccessor

    SetAttributePerSegment(AttributeAccessor, IntPtr)

    Sets the same data for the all vertices in the current particle using the provided AttributeAccessor

    SetVerticesPerSegment(Int32, Int32, Int32)

    Sets how many vertices are associated with the first, middle and last quad segments of the buffer. In case of billboards 1 segment = 1 quad but other shapes might be laid out differently

    StartOver()

    Moves the index to the beginning of the buffer so that the data can be filled from the first particle again

    TransformAttributePerParticle<T, U>(AttributeAccessor, AttributeAccessor, IAttributeTransformer<T, U>, ref U)
    TransformAttributePerSegment<T, U>(AttributeAccessor, AttributeAccessor, IAttributeTransformer<T, U>, ref U)

    Transforms attribute data using already written data from another attribute

    | Improve this Doc View Source

    Constructors


    ParticleBufferState(IntPtr, ParticleVertexBuilder)

    public ParticleBufferState(IntPtr vertexBufferPtr, ParticleVertexBuilder builder)
    Parameters
    Type Name Description
    System.IntPtr vertexBufferPtr
    ParticleVertexBuilder builder
    | Improve this Doc View Source

    Fields


    CurrentParticleIndex

    public int CurrentParticleIndex
    Field Value
    Type Description
    System.Int32

    CurrentVertex

    public int CurrentVertex
    Field Value
    Type Description
    System.Int32

    VertexBuffer

    public IntPtr VertexBuffer
    Field Value
    Type Description
    System.IntPtr

    VertexBufferOrigin

    public readonly IntPtr VertexBufferOrigin
    Field Value
    Type Description
    System.IntPtr

    VertexStride

    public int VertexStride
    Field Value
    Type Description
    System.Int32

    VerticesPerSegCurrent

    public int VerticesPerSegCurrent
    Field Value
    Type Description
    System.Int32

    VerticesPerSegFirst

    public int VerticesPerSegFirst
    Field Value
    Type Description
    System.Int32

    VerticesPerSegLast

    public int VerticesPerSegLast
    Field Value
    Type Description
    System.Int32

    VerticesPerSegMiddle

    public int VerticesPerSegMiddle
    Field Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    Properties


    DefaultTexCoords

    public readonly AttributeDescription DefaultTexCoords { get; }
    Property Value
    Type Description
    AttributeDescription
    | Improve this Doc View Source

    Methods


    GetAccessor(AttributeDescription)

    public AttributeAccessor GetAccessor(AttributeDescription desc)
    Parameters
    Type Name Description
    AttributeDescription desc
    Returns
    Type Description
    AttributeAccessor

    NextParticle()

    Advances the pointer to the next particle in the buffer, so that its first vertex can be written

    public void NextParticle()

    NextSegment()

    Advances the pointer to the next segment in the buffer, so that its first vertex can be written

    public void NextSegment()

    NextVertex()

    Advances the pointer to the next vertex in the buffer, so that it can be written

    public void NextVertex()

    SetAttribute(AttributeAccessor, IntPtr)

    Sets the data for the current vertex using the provided AttributeAccessor

    public void SetAttribute(AttributeAccessor accessor, IntPtr ptrRef)
    Parameters
    Type Name Description
    AttributeAccessor accessor

    Accessor to the vertex data

    System.IntPtr ptrRef

    Pointer to the source data


    SetAttributePerParticle(AttributeAccessor, IntPtr)

    Sets the same data for the all vertices in the current particle using the provided AttributeAccessor

    public void SetAttributePerParticle(AttributeAccessor accessor, IntPtr ptrRef)
    Parameters
    Type Name Description
    AttributeAccessor accessor

    Accessor to the vertex data

    System.IntPtr ptrRef

    Pointer to the source data


    SetAttributePerSegment(AttributeAccessor, IntPtr)

    Sets the same data for the all vertices in the current particle using the provided AttributeAccessor

    public void SetAttributePerSegment(AttributeAccessor accessor, IntPtr ptrRef)
    Parameters
    Type Name Description
    AttributeAccessor accessor

    Accessor to the vertex data

    System.IntPtr ptrRef

    Pointer to the source data


    SetVerticesPerSegment(Int32, Int32, Int32)

    Sets how many vertices are associated with the first, middle and last quad segments of the buffer. In case of billboards 1 segment = 1 quad but other shapes might be laid out differently

    public void SetVerticesPerSegment(int verticesForFirstSegment, int verticesForMiddleSegment, int verticesForLastSegment)
    Parameters
    Type Name Description
    System.Int32 verticesForFirstSegment

    Number of vertices for the first segment

    System.Int32 verticesForMiddleSegment

    Number of vertices for the middle segments

    System.Int32 verticesForLastSegment

    Number of vertices for the last segment


    StartOver()

    Moves the index to the beginning of the buffer so that the data can be filled from the first particle again

    public void StartOver()

    TransformAttributePerParticle<T, U>(AttributeAccessor, AttributeAccessor, IAttributeTransformer<T, U>, ref U)

    public void TransformAttributePerParticle<T, U>(AttributeAccessor accessorFrom, AttributeAccessor accessorTo, IAttributeTransformer<T, U> transformMethod, ref U transformer)
        where T : struct where U : struct
    Parameters
    Type Name Description
    AttributeAccessor accessorFrom
    AttributeAccessor accessorTo
    IAttributeTransformer<T, U> transformMethod
    U transformer
    Type Parameters
    Name Description
    T
    U

    TransformAttributePerSegment<T, U>(AttributeAccessor, AttributeAccessor, IAttributeTransformer<T, U>, ref U)

    Transforms attribute data using already written data from another attribute

    public void TransformAttributePerSegment<T, U>(AttributeAccessor accessorFrom, AttributeAccessor accessorTo, IAttributeTransformer<T, U> transformMethod, ref U transformer)
        where T : struct where U : struct
    Parameters
    Type Name Description
    AttributeAccessor accessorFrom

    Vertex attribute accessor to the source attribute

    AttributeAccessor accessorTo

    Vertex attribute accessor to the destination attribute

    IAttributeTransformer<T, U> transformMethod

    Transform method for the type data

    U transformer
    Type Parameters
    Name Description
    T

    Type data

    U

    Inherited Members

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