Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    ShapeBuilderQuad Class

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

    Shape builder which builds each particle as a up-facing quad, further rotated by the particle's rotation in 3d space

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

    [DataContract("ShapeBuilderQuad")]
    [Display("Quad", null)]
    public class ShapeBuilderQuad : 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<Quaternion>, 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<Quaternion> SamplerRotation { get; set; }
    Property Value
    Type Description
    ComputeCurveSampler<Quaternion>
    | 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<Quaternion>, ParticleFieldAccessor<Single>)

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

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

    Target particle

    ParticleFieldAccessor<Quaternion> rotationField

    Rotation field accessor

    ParticleFieldAccessor<System.Single> lifeField

    Normalized particle life for sampling

    Returns
    Type Description
    Quaternion

    Quaternion rotation of the quad particle, assuming flat horizontal square at neutral rotation


    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