Table of Contents

Class ShapeBuilderOrientedQuad

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

Shape builder which builds each particle as a non-uniform quad oriented along an axis

[DataContract("ShapeBuilderOrientedQuad")]
[Display("Direction Aligned Sprite", null)]
public class ShapeBuilderOrientedQuad : ShapeBuilderCommon
Inheritance
ShapeBuilderOrientedQuad
Inherited Members

Properties

LengthFactor

Length will be modified with this factor

[DataMember(310)]
[Display("Length factor", null)]
public float LengthFactor { get; set; }

Property Value

float

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

int

ScaleLength

If true, length will scale with particle size

[DataMember(300)]
[Display("Size to Length", null)]
public bool ScaleLength { get; set; }

Property Value

bool

Methods

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

Builds the actual vertex buffer for the current frame using the particle data

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

bufferState ParticleBufferState

Target particle buffer state, used to populate the assigned vertex buffer

invViewX Vector3

Unit vector X (right) in camera space, extracted from the inverse view matrix

invViewY Vector3

Unit vector Y (up) in camera space, extracted from the inverse view matrix

spaceTranslation Vector3

Translation of the target draw space in regard to the particle data (world or local)

spaceRotation Quaternion

Rotation of the target draw space in regard to the particle data (world or local)

spaceScale float

Uniform scale of the target draw space in regard to the particle data (world or local)

sorter ParticleList

Particle enumerator which can be iterated and returns sported particles

viewProj Matrix

The View-Projection matrix which is used for some shape builders

Returns

int