stores a Doom3 MD5 Mesh + Animation
More...
#include <MD5Model.hpp>
|
| MD5Model () |
| initializes an empty MD5 Model
|
|
| ~MD5Model () |
| deallocates any used memory on the CPU and GPU
|
|
| MD5Model (const MD5Model &)=delete |
| do not allow MD5 models to be copied
|
|
MD5Model & | operator= (const MD5Model &)=delete |
| do not allow MD5 models to be copied
|
|
bool | loadMD5Model (const char *MD5_MESH_FILE, const char *MD5_ANIM_FILE="") |
| loads a corresponding md5mesh and md5anim file to the object
|
|
bool | isAnimated () const |
| returns if the MD5 Model has an accompanying animation
|
|
bool | readMD5Model (const char *FILENAME) |
| parses md5mesh file and allocates corresponding mesh data
|
|
void | allocVertexArrays (GLuint vPosAttribLoc, GLuint vColorAttribLoc, GLuint vTexCoordAttribLoc) |
| binds model VBOs to attribute pointer locations
|
|
void | draw () const |
| draws all the meshes that make up the model
|
|
void | drawSkeleton () const |
| draws the skeleton joints (as points) and bones (as lines)
|
|
bool | readMD5Anim (const char *filename) |
| reads in an animation sequence from an external file
|
|
void | animate (GLfloat dt) |
| advances the model forward in its animation sequence the corresponding amount of time based on frame rate
|
|
stores a Doom3 MD5 Mesh + Animation
◆ MD5Model()
CSCI441::MD5Model::MD5Model |
( |
| ) |
|
|
inline |
◆ allocVertexArrays()
void CSCI441::MD5Model::allocVertexArrays |
( |
GLuint |
vPosAttribLoc, |
|
|
GLuint |
vColorAttribLoc, |
|
|
GLuint |
vTexCoordAttribLoc |
|
) |
| |
|
inline |
binds model VBOs to attribute pointer locations
- Parameters
-
vPosAttribLoc | location of vertex position attribute |
vColorAttribLoc | location of vertex color attribute |
vTexCoordAttribLoc | location of vertex texture coordinate attribute |
- Note
- color attribute used when drawing the skeleton
-
texCoord attribute used when drawing the mesh
◆ animate()
void CSCI441::MD5Model::animate |
( |
GLfloat |
dt | ) |
|
|
inline |
advances the model forward in its animation sequence the corresponding amount of time based on frame rate
- Parameters
-
dt | delta time since last frame |
◆ isAnimated()
bool CSCI441::MD5Model::isAnimated |
( |
| ) |
const |
|
inline |
returns if the MD5 Model has an accompanying animation
- Returns
- true if animation exists for model
◆ loadMD5Model()
bool CSCI441::MD5Model::loadMD5Model |
( |
const char * |
MD5_MESH_FILE, |
|
|
const char * |
MD5_ANIM_FILE = "" |
|
) |
| |
|
inline |
loads a corresponding md5mesh and md5anim file to the object
- Parameters
-
MD5_MESH_FILE | name of file to load mesh from |
MD5_ANIM_FILE | name of file to load animation from |
- Returns
- true if both mesh and animation loaded successfully and are compatible
◆ readMD5Anim()
bool CSCI441::MD5Model::readMD5Anim |
( |
const char * |
filename | ) |
|
|
inline |
reads in an animation sequence from an external file
- Parameters
-
filename | *.md5anim file to open |
- Returns
- true iff mesh and animation are compatible
◆ readMD5Model()
bool CSCI441::MD5Model::readMD5Model |
( |
const char * |
FILENAME | ) |
|
|
inline |
parses md5mesh file and allocates corresponding mesh data
- Parameters
-
FILENAME | *.md5mesh file to load |
- Returns
- true if file parsed successfully
The documentation for this class was generated from the following file: