Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    ShapeBuilderBillboard Class

    Namespace: Stride.Particles.ShapeBuilders
    Assembly: Stride.Particles.dll

    Shape builder which builds each particle as a camera-facing quad

    System.Object → ShapeBuilder → ShapeBuilderCommon → ShapeBuilderBillboard
    Derived from ShapeBuilderBillboard:

    [DataContract("ShapeBuilderBillboard")]
    [Display("Billboard", null)]
    public class ShapeBuilderBillboard : ShapeBuilderCommon
    Name Description
    Properties
    QuadsPerParticle

    Returns the number of quads required per particle to draw all particles. Assuming 1 Quad = 4 Vertices = 6 Indices

    SamplerRotation

    Additive animation for the particle rotation. If present, particle's own rotation will be added to the sampled curve value

    Methods
    BuildVertexBuffer(ref ParticleBufferState, Vector3, Vector3, ref Vector3, ref Quaternion, Single, ref ParticleList, ref Matrix)
    GetParticleRotation(Particle, ParticleFieldAccessor<Single>, ParticleFieldAccessor<Single>)

    Gets the combined rotation for the particle, adding its field value (if any) to its sampled value from the curve

    PreUpdate()
    | Improve this Doc View Source

    Properties


    QuadsPerParticle

    Returns the number of quads required per particle to draw all particles. Assuming 1 Quad = 4 Vertices = 6 Indices

    public override int QuadsPerParticle { get; protected set; }
    Property Value
    Type Description
    System.Int32
    Overrides
    ShapeBuilder.QuadsPerParticle

    SamplerRotation

    Additive animation for the particle rotation. If present, particle's own rotation will be added to the sampled curve value

    [DataMember(300)]
    [Display("Additive Rotation Animation", null)]
    public ComputeCurveSampler<float> SamplerRotation { get; set; }
    Property Value
    Type Description
    ComputeCurveSampler<System.Single>
    | Improve this Doc View Source

    Methods


    BuildVertexBuffer(ref ParticleBufferState, Vector3, Vector3, ref Vector3, ref Quaternion, Single, ref ParticleList, ref Matrix)

    public override int BuildVertexBuffer(ref ParticleBufferState bufferState, Vector3 invViewX, Vector3 invViewY, ref Vector3 spaceTranslation, ref Quaternion spaceRotation, float spaceScale, ref ParticleList sorter, ref Matrix viewProj)
    Parameters
    Type Name Description
    ParticleBufferState bufferState
    Vector3 invViewX
    Vector3 invViewY
    Vector3 spaceTranslation
    Quaternion spaceRotation
    System.Single spaceScale
    ParticleList sorter
    Matrix viewProj
    Returns
    Type Description
    System.Int32
    Overrides
    ShapeBuilderCommon.BuildVertexBuffer(ref ParticleBufferState, Vector3, Vector3, ref Vector3, ref Quaternion, Single, ref ParticleList, ref Matrix)

    GetParticleRotation(Particle, ParticleFieldAccessor<Single>, ParticleFieldAccessor<Single>)

    Gets the combined rotation for the particle, adding its field value (if any) to its sampled value from the curve

    protected float GetParticleRotation(Particle particle, ParticleFieldAccessor<float> rotationField, ParticleFieldAccessor<float> lifeField)
    Parameters
    Type Name Description
    Particle particle

    Target particle

    ParticleFieldAccessor<System.Single> rotationField

    Rotation field accessor

    ParticleFieldAccessor<System.Single> lifeField

    Normalized particle life for sampling

    Returns
    Type Description
    System.Single

    Screenspace rotation in radians, positive is clockwise


    PreUpdate()

    public override void PreUpdate()
    Overrides
    ShapeBuilderCommon.PreUpdate()

    Inherited Members

    ShapeBuilderCommon.SamplerPosition
    ShapeBuilderCommon.SamplerSize
    ShapeBuilderCommon.GetParticlePosition(Particle, ParticleFieldAccessor<Vector3>, ParticleFieldAccessor<Single>)
    ShapeBuilderCommon.GetParticleSize(Particle, ParticleFieldAccessor<Single>, ParticleFieldAccessor<Single>)
    ShapeBuilder.VertexLayoutHasChanged
    ShapeBuilder.PrepareVertexLayout(ParticlePoolFieldsList)
    ShapeBuilder.UpdateVertexBuilder(ParticleVertexBuilder)
    ShapeBuilder.SetRequiredQuads(Int32, Int32, Int32)
    ShapeBuilder.Circumcenter(Vector3, Vector3, Vector3)

    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