#include <lvt/MD2Model.h>
Inheritance diagram for MD2Model:
Loads, renders, and animates a Quake 2 model. An MD2 model defines a number of animations (such as run, walk, jump, etc.). The current animation is selected with SetCurAnimation. An MD2 file may also specify one or more skins, which the MD2Model class will automatically load. The current skin can be selected with SetCurSkin.
Not all models specify skins in the .md2 file. For those that don't, use a Texture2D object (or a Switch of Texture2D objects) to texture the model.
Public Member Functions | |
bool | Animate (unsigned int dTime) |
Animates the model. | |
const std::string | GetAnimationName (int aniNum) const |
Returns the name of the animation with the given ordinal. | |
int | GetAnimationNum (const std::string &animName) const |
Returns the number (ordinal) of the animation with the given name. | |
int | GetNumAnimations () const |
Returns the number of animations defined for the model. | |
int | GetNumSkins () const |
Returns the total number of skins present in the model. | |
const std::string | GetSkinName (int skinNum) const |
Returns the name of the skin with the given ordinal. | |
int | GetSkinNum (const std::string &skinName) const |
Returns the number (ordinal) of the skin with the given name. | |
bool | Load (const std::string &fileName) |
Loads the model from disk, as well as any skins specified in the model. | |
void | Render () |
Draws the model. | |
MD2Model (const std::string &fileName) | |
MD2Model () | |
Constructor. | |
bool | SetCurAnimation (const std::string &aniName) |
bool | SetCurAnimation (int aniNum) |
Sets the model's current animation. | |
bool | SetCurSkin (const std::string &skinName) |
bool | SetCurSkin (int skinNum) |
Sets the model's current skin. |
|
Constructor.
|
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
Animates the model.
Reimplemented from Node. |
|
Returns the name of the animation with the given ordinal.
|
|
Returns the number (ordinal) of the animation with the given name.
|
|
Returns the number of animations defined for the model.
|
|
Returns the total number of skins present in the model.
|
|
Returns the name of the skin with the given ordinal.
|
|
Returns the number (ordinal) of the skin with the given name.
|
|
Loads the model from disk, as well as any skins specified in the model.
|
|
Draws the model.
Implements Node. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
Sets the model's current animation.
|
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
Sets the model's current skin.
|