Ult3D
Implementation of "Ultimate 3D Game Engine Design & Architecture" by Allan Sherrod
|
#include <ModelData.h>
Public Member Functions | |
ModelData () | |
~ModelData () | |
void | Clear () |
void | ClearDescriptor () |
bool | AddDescriptorElement (ElementType type) |
VertexDescriptor * | GetDescriptor () |
bool | SetIndices (int totalIndices, unsigned int *indices) |
int | GetTotalIndices () const |
unsigned int * | GetIndices () |
bool | SetVertices (PrimitiveType type, int totalVertices, int stride, char *vertices) |
int | GetTotalVertices () const |
int | GetVertexSizeInBytes () const |
int | GetVertexStride () const |
char * | GetVertices () |
PrimitiveType | GetPrimitiveType () const |
Contains the renderable data for a 3d model.
Ult::ModelData::ModelData | ( | ) |
ModelData constructor
Ult::ModelData::~ModelData | ( | ) |
ModelData destructor.
|
inline |
Calls AddElement on the internal vertex descriptor.
void Ult::ModelData::Clear | ( | ) |
Frees any internal data.
|
inline |
Calls clear on the internal vertex descriptor.
|
inline |
Return a pointer to the internal vertex descriptor.
|
inline |
Return a pointer to the internal indices array.
|
inline |
Returns the PrimitiveType of the vertex data.
|
inline |
Return the total number of stored indices.
|
inline |
Returns the total number of stored vertices.
|
inline |
Returns the number of bytes the vertices take up. This equals totalVertices * stride.
|
inline |
Returns the size of a single vertex in bytes.
|
inline |
Returns a pointer to the stored vertex data.
bool Ult::ModelData::SetIndices | ( | int | totalIndices, |
unsigned int * | indices ) |
Store the given index data internally. Allocates the index array.
bool Ult::ModelData::SetVertices | ( | PrimitiveType | type, |
int | totalVertices, | ||
int | stride, | ||
char * | vertices ) |
Store the given vertex data internally. Allocates the vertex array. Total number of bytes = totalVertices * stride.