#include <VertexFormat.h>
Classes | |
| class | Element |
Public Types | |
| enum | Usage { POSITION = 1, NORMAL = 2, COLOR = 3, TANGENT = 4, BINORMAL = 5, BLENDWEIGHTS = 6, BLENDINDICES = 7, TEXCOORD0 = 8, TEXCOORD1 = 9, TEXCOORD2 = 10, TEXCOORD3 = 11, TEXCOORD4 = 12, TEXCOORD5 = 13, TEXCOORD6 = 14, TEXCOORD7 = 15 } |
Public Member Functions | |
| VertexFormat (const Element *elements, unsigned int elementCount) | |
| ~VertexFormat () | |
| const Element & | getElement (unsigned int index) const |
| unsigned int | getElementCount () const |
| unsigned int | getVertexSize () const |
| bool | operator== (const VertexFormat &f) const |
| bool | operator!= (const VertexFormat &f) const |
Static Public Member Functions | |
| static const char * | toString (Usage usage) |
Defines the format of a vertex layout used by a mesh.
A VertexFormat is immutable and cannot be changed once created.
Defines a set of usages for vertex elements.
| gameplay::VertexFormat::VertexFormat | ( | const Element * | elements, |
| unsigned int | elementCount | ||
| ) |
Constructor.
The passed in element array is copied into the new VertexFormat.
| elements | The list of vertex elements defining the vertex format. |
| elementCount | The number of items in the elements array. |
Destructor.
| const Element& gameplay::VertexFormat::getElement | ( | unsigned int | index | ) | const |
Gets the vertex element at the specified index.
| index | The index of the element to retrieve. |
| unsigned int gameplay::VertexFormat::getElementCount | ( | ) | const |
Gets the number of elements in this VertexFormat.
| unsigned int gameplay::VertexFormat::getVertexSize | ( | ) | const |
Gets the size (in bytes) of a single vertex using this format.
| bool gameplay::VertexFormat::operator!= | ( | const VertexFormat & | f | ) | const |
Compares to vertex formats for inequality.
| f | The vertex format to compare. |
| bool gameplay::VertexFormat::operator== | ( | const VertexFormat & | f | ) | const |
Compares two vertex formats for equality.
| f | The vertex format to compare. |
| static const char* gameplay::VertexFormat::toString | ( | Usage | usage | ) | [static] |
Returns a string representation of a Usage enumeration value.
1.7.6.1