VertexArray

Define a set of one or more 2D primitives.

Constructors

this
this()

Default constructor

this
this(PrimitiveType type, uint vertexCount)

Construct the vertex array with a type and an initial number of vertices

Destructor

~this
~this()

Destructor.

Members

Functions

append
void append(Vertex newVertex)

Add a vertex to the array.

clear
void clear()

Clear the vertex array.

draw
void draw(RenderTarget renderTarget, RenderStates renderStates)

Draw the object to a render target.

getBounds
FloatRect getBounds()

Compute the bounding rectangle of the vertex array.

getVertexCount
uint getVertexCount()

Return the vertex count.

opIndex
Vertex opIndex(size_t index)

Get a read-write access to a vertex by its index

resize
void resize(uint length)

Resize the vertex array.

Variables

primitiveType
PrimitiveType primitiveType;

The type of primitive to draw.

Inherited Members

From Drawable

draw
void draw(RenderTarget renderTarget, RenderStates renderStates)

Draw the object to a render target.

Meta