VertexData

Represents a vertex data. A vertex is a collection of attributes, most often attached to a point in space. This class is a data structure which groups together collections of primitives to represent a list of vertices.

Members

Functions

addAttribute
void addAttribute(uint index, VertexAttribute attribute)

Adds an attribute.

clear
void clear()

Clears all the vertex data.

copy
void copy(VertexData data)

Replaces the contents of this vertex data by the provided one. This is a deep copy. The vertex attribute are each individually cloned.

getAttribute
VertexAttribute getAttribute(string name)

Returns the {@link VertexAttribute} associated to the name, or null if none can be found.

getAttribute
VertexAttribute getAttribute(uint index)

Returns the {@link VertexAttribute} at the desired index, or null if none is associated to the index.

getAttributeBuffer
ubyte[] getAttributeBuffer(string name)

Returns the buffer for the attribute associated to the provided name, or null if none can be found. The buffer is returned filled and ready for reading.

getAttributeBuffer
ubyte[] getAttributeBuffer(uint index)

Returns the buffer for the attribute at the provided index, or null if none can be found. The buffer is returned filled and ready for reading.

getAttributeCount
uint getAttributeCount()

Returns the attribute count.

getAttributeIndex
int getAttributeIndex(string name)

Returns the index associated to the attribute name, or -1 if no attribute has the name.

getAttributeName
string getAttributeName(uint index)

Returns the name of the attribute at the provided index, or null if none can be found.

getAttributeNames
string[] getAttributeNames()

Returns an unmodifiable set of all the attribute names.

getAttributeSize
int getAttributeSize(string name)

Returns the size of the attribute associated to the provided name.

getAttributeSize
int getAttributeSize(uint index)

Returns the size of the attribute at the provided index, or -1 if none can be found.

getAttributeType
DataType getAttributeType(string name)

Returns the type of the attribute associated to the provided name, or null if none can be found.

getAttributeType
DataType getAttributeType(uint index)

Returns the type of the attribute at the provided index, or null if none can be found.

getIndices
uint[] getIndices()

Returns the list of indices used by OpenGL to pick the vertices to draw the object with in the correct order.

getIndicesBuffer
ubyte[] getIndicesBuffer()

Returns a byte buffer containing all the current indices.

getIndicesCount
uint getIndicesCount()

Returns the index count.

hasAttribute
bool hasAttribute(string name)

Returns true if an attribute has the provided name.

hasAttribute
bool hasAttribute(uint index)

Returns true in an attribute can be found at the provided index.

removeAttribute
void removeAttribute(string name)

Removes the attribute associated to the provided name. If no attribute is found, nothing will be removed.

removeAttribute
void removeAttribute(uint index)

Removes the attribute at the provided index. If no attribute is found, nothing will be removed.

setIndices
void setIndices(uint[] indices)

Sets the list of indices used by OpenGL to pick the vertices to draw the object with in the correct order.

Meta