Ult3D
Implementation of "Ultimate 3D Game Engine Design & Architecture" by Allan Sherrod
Loading...
Searching...
No Matches
Ult::ModelData Class Reference

#include <ModelData.h>

Public Member Functions

 ModelData ()
 
 ~ModelData ()
 
void Clear ()
 
void ClearDescriptor ()
 
bool AddDescriptorElement (ElementType type)
 
VertexDescriptorGetDescriptor ()
 
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
 

Detailed Description

Contains the renderable data for a 3d model.

Constructor & Destructor Documentation

◆ ModelData()

Ult::ModelData::ModelData ( )

ModelData constructor

◆ ~ModelData()

Ult::ModelData::~ModelData ( )

ModelData destructor.

Member Function Documentation

◆ AddDescriptorElement()

bool Ult::ModelData::AddDescriptorElement ( ElementType type)
inline

Calls AddElement on the internal vertex descriptor.

◆ Clear()

void Ult::ModelData::Clear ( )

Frees any internal data.

◆ ClearDescriptor()

void Ult::ModelData::ClearDescriptor ( )
inline

Calls clear on the internal vertex descriptor.

◆ GetDescriptor()

VertexDescriptor * Ult::ModelData::GetDescriptor ( )
inline

Return a pointer to the internal vertex descriptor.

◆ GetIndices()

unsigned int * Ult::ModelData::GetIndices ( )
inline

Return a pointer to the internal indices array.

◆ GetPrimitiveType()

PrimitiveType Ult::ModelData::GetPrimitiveType ( ) const
inline

Returns the PrimitiveType of the vertex data.

◆ GetTotalIndices()

int Ult::ModelData::GetTotalIndices ( ) const
inline

Return the total number of stored indices.

◆ GetTotalVertices()

int Ult::ModelData::GetTotalVertices ( ) const
inline

Returns the total number of stored vertices.

◆ GetVertexSizeInBytes()

int Ult::ModelData::GetVertexSizeInBytes ( ) const
inline

Returns the number of bytes the vertices take up. This equals totalVertices * stride.

◆ GetVertexStride()

int Ult::ModelData::GetVertexStride ( ) const
inline

Returns the size of a single vertex in bytes.

◆ GetVertices()

char * Ult::ModelData::GetVertices ( )
inline

Returns a pointer to the stored vertex data.

◆ SetIndices()

bool Ult::ModelData::SetIndices ( int totalIndices,
unsigned int * indices )

Store the given index data internally. Allocates the index array.

◆ SetVertices()

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.


The documentation for this class was generated from the following files: