struct SpriteRenderElement

Contains information about a single sprite render elements mesh and material

Public

Methods

GetVertexAndIndexData

u32 GetVertexAndIndexData(u32 vertexOffset, u32 indexOffset, const Vector2 &offset, const Area2 &clipRectangle, bool performClipping, DataRange &outPositions, DataRange &outUVs, DataRange &outIndices) const

Retrieves vertex and index data from the sprite render element and outputs them to the provided buffers.

vertexOffset
At which vertex should the method start writing to the output position/uv buffer.
indexOffset
At which index should the method start writing to the output index buffer.
offset
Offset that should be applied to all output vertex positions.
clipRectangle
Rectangle to clip the vertices to, if clipping is enabled.
performClipping
Should the vertices be clipped to the provided .
outPositions
Previously allocated buffer where to store the vertex positions. Caller must ensure size matches the vertex count.
outUVs
Previously allocated buffer where to store the vertex UVs. Caller must ensure size matches the vertex count.
outIndices
Previously allocated buffer where to store the indices. Caller must ensure size matches the index count.

Returns: Number of quads that were written.

Fields

IndexCount

u32 IndexCount

VertexCount

u32 VertexCount

VertexPositions

Vector2 * VertexPositions

VertexUVs

Vector2 * VertexUVs

Indices

u32 * Indices

MaterialInformation

SpriteMaterialInfo * MaterialInformation