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
|
| |
|
| MD5Model (MD5Model &&src) noexcept |
| | do not allow MD5 models to be moved
|
| |
|
MD5Model & | operator= (MD5Model &&src) noexcept |
| | do not allow MD5 models to be moved
|
| |
| 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 | setActiveTextures (GLint diffuseMapActiveTexture, GLint specularMapActiveTexture, GLint normalMapActiveTexture, GLint heightMapActiveTexture) |
| | specify which texture targets each texture map should be bound to when rendering
|
| |
|
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
◆ setActiveTextures()
| void CSCI441::MD5Model::setActiveTextures |
( |
GLint |
diffuseMapActiveTexture = GL_TEXTURE0, |
|
|
GLint |
specularMapActiveTexture = GL_TEXTURE1, |
|
|
GLint |
normalMapActiveTexture = GL_TEXTURE2, |
|
|
GLint |
heightMapActiveTexture = GL_TEXTURE3 |
|
) |
| |
|
inline |
specify which texture targets each texture map should be bound to when rendering
- Parameters
-
| diffuseMapActiveTexture | active texture to bind the diffuse map to (default GL_TEXTURE0) |
| specularMapActiveTexture | active texture to bind the specular map to (default GL_TEXTURE1) |
| normalMapActiveTexture | active texture to bind the normal map to (default GL_TEXTURE2) |
| heightMapActiveTexture | active texture to bind the height map to (default GL_TEXTURE3) |
The documentation for this class was generated from the following file: