VertexArray

A VertrexArray is a simple way to handle a performant textured shape. It provides a simple API and maintains the necessary properties. It is similar to a trimmed-down version of Shape, but does not contain possible unnecessary content.

See: Shape, Vertex

Constructors

this
this(Geometry geometry, Texture texture)

CTor

Members

Functions

append
void append(Vertex vertex)

Stores a Vertex

append
void append(Vector2f vec)

Stores a Vertex

appendQuad
void appendQuad(Vector2f position, Rect texRect)

Append a whole Quad. This method provides a simple way to add a quadratic texture-view. And this as easily as if you would work with a Sprite.

clear
void clear()

Clear all Vertices but preserve the storage and capacity

draw
void draw(Window wnd)
Undocumented in source. Be warned that the author may not have intended to support it.
getTexture
inout(Texture)* getTexture()

Returns the current texture or null

getVertices
inout(Vertex[]) getVertices()

Returns all Vertices

opIndex
inout(Vertex) opIndex(size_t index)

Returns all Vertices

reserve
void reserve(size_t size)

Reserve (additional) space for the internal Vertex array

setTexture
void setTexture(Texture texture)

Set or reset a Texture

Properties

length
size_t length [@property getter]

Returns the current amount of stored Vertices

Variables

geometry
Geometry geometry;
Undocumented in source.

Inherited Members

From Drawable

draw
void draw(Window )

Draw method which is called from the Window's draw method

Meta

Authors

Randy Schuett (rswhite4@googlemail.com)