|
CSCI441 OpenGL Library 5.23.1.1
CS@Mines CSCI441 Computer Graphics Course Library
|
stores a Doom3 MD5 Mesh + Animation More...
#include <MD5Model.hpp>
Classes | |
| class | MD5Animation |
| stores an entire animation sequence for a given MD5 Model More... | |
| struct | MD5AnimationState |
| stores state of current animation frame More... | |
| struct | MD5BaseFrameJoint |
| base frame joint More... | |
| struct | MD5BoundingBox |
| bounding box containing the model during animation More... | |
| struct | MD5Joint |
| a joint of the MD5 Skeleton More... | |
| struct | MD5JointInfo |
| information pertaining to each animation joint More... | |
| struct | MD5Mesh |
| mesh that comprises the model's skin More... | |
| struct | MD5Texture |
| texture handle for the model More... | |
| struct | MD5Triangle |
| a triangle on the mesh More... | |
| struct | MD5Vertex |
| a vertex on the mesh More... | |
| struct | MD5Weight |
| the weight for a mesh vertex More... | |
Public Member Functions | |
| 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, GLushort targetAnimationIndex=0) |
| reads in an animation sequence from an external file | |
| bool | addMD5Anim (const char *filename) |
| adds another MD5 Animation sequence to the model's set of animation | |
| GLushort | getNumberOfAnimations () const |
| returns the number of animations that were successfully loaded against the model | |
| void | useTargetAnimationIndex (GLushort targetAnimationIndex) |
| update current animation to be running through | |
| 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
|
inline |
initializes an empty MD5 Model
|
inline |
adds another MD5 Animation sequence to the model's set of animation
| filename | *.md5anim file to open add to animation list |
|
inline |
binds model VBOs to attribute pointer locations
| vPosAttribLoc | location of vertex position attribute |
| vColorAttribLoc | location of vertex color attribute |
| vTexCoordAttribLoc | location of vertex texture coordinate attribute |
|
inline |
advances the model forward in its animation sequence the corresponding amount of time based on frame rate
| dt | delta time since last frame |
|
inline |
returns the number of animations that were successfully loaded against the model
|
inline |
returns if the MD5 Model has an accompanying animation
|
inline |
loads a corresponding md5mesh and md5anim file to the object
| MD5_MESH_FILE | name of file to load mesh from |
| MD5_ANIM_FILE | name of file to load animation from |
|
inline |
reads in an animation sequence from an external file
| filename | *.md5anim file to open |
| targetAnimationIndex | animation index sequence to read into (defaults to first) |
|
inline |
parses md5mesh file and allocates corresponding mesh data
| FILENAME | *.md5mesh file to load |
|
inline |
specify which texture targets each texture map should be bound to when rendering
| 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) |
|
inline |
update current animation to be running through
| targetAnimationIndex | animation index to animate model through |