| Support Forum Library Source SourceForge Page G3D Web Page |
Quake III MD3 model loader. More...
Inherits G3D::Model.
Classes | |
| class | Pose |
| Animation pose based on AnimType and animation time. More... | |
| class | Skin |
| A set of materials for a MD3Model. More... | |
| class | Specification |
Public Types | |
| enum | { NUM_PARTS = 3, NUM_ANIMATED_PARTS = 2 } |
| enum | AnimType { BOTH_DEATH1, BOTH_DEAD1, BOTH_DEATH2, BOTH_DEAD2, BOTH_DEATH3, BOTH_DEAD3, UPPER_GESTURE, UPPER_ATTACK, UPPER_ATTACK2, UPPER_DROP, UPPER_RAISE, UPPER_STAND, UPPER_STAND2, LOWER_WALKCR, LOWER_WALK, LOWER_RUN, LOWER_BACK, LOWER_SWIM, LOWER_JUMP, LOWER_LAND, LOWER_JUMPB, LOWER_LANDB, LOWER_IDLE, LOWER_IDLECR, LOWER_TURN, NUM_ANIMATIONS, START_BOTH = BOTH_DEATH1, END_BOTH = BOTH_DEAD3, START_UPPER = UPPER_GESTURE, END_UPPER = UPPER_STAND2, START_LOWER = LOWER_WALKCR, END_LOWER = LOWER_TURN } |
| All standard animation types expected to have parameters in the animation.cfg file. More... | |
| enum | PartType { PART_LOWER, PART_UPPER, PART_HEAD } |
| typedef shared_ptr< MD3Model > | Ref |
Public Member Functions | |
| virtual | ~MD3Model () |
| const Skin::Ref | defaultSkin () const |
| const std::string & | name () const |
| void | pose (Array< shared_ptr< class Surface > > &posedModelArray, const CoordinateFrame &cframe, const CFrame &previousFrame, const Pose ¤tPose=Pose()) |
| Poses then adds all available parts to posedModelArray. | |
| void | pose (Array< shared_ptr< class Surface > > &posedModelArray, const CoordinateFrame &cframe=CoordinateFrame(), const Pose ¤tPose=Pose()) |
| void | simulatePose (Pose &pose, GameTime dt) const |
| Advances the pose based on this character's animations. | |
| CoordinateFrame | weaponFrame (const CoordinateFrame &cframe=CoordinateFrame(), const Pose &pose=Pose()) const |
| Return the coordinate frame of the tag_weapon; this is where a simulator should place objects carried by the character. | |
Static Public Member Functions | |
| static MD3Model::Ref | create (const Specification &spec, const std::string &name="") |
Quake III MD3 model loader.
Quake 3 uses MD3 models for both characters and non-character objects. Character objects contain three individual "models" inside of them with attachment points.
MD3Models are composed of up to four parts, which are named lower (legs), upper (torso), and head. The coordinate frame for each relative to its parent can be specified as part of the pose. Each part contains a set of triangle lists. The triangle lists may have different materials and are key-frame animated. A skin is a set of materials for the triangle lists. The model is created with a default skin, although an alternative skin may be provided as part of the pose. This allows sharing geometry over characters with different appearance.
It also contains a coordinate frame for a weapon's attachment location.
See http://bit.ly/acgNj9 for some models
| typedef shared_ptr<MD3Model> G3D::MD3Model::Ref |
All standard animation types expected to have parameters in the animation.cfg file.
|
virtual |
|
static |
|
inline |
|
inline |
| void G3D::MD3Model::pose | ( | Array< shared_ptr< class Surface > > & | posedModelArray, |
| const CoordinateFrame & | cframe, | ||
| const CFrame & | previousFrame, | ||
| const Pose & | currentPose = Pose() |
||
| ) |
Poses then adds all available parts to posedModelArray.
Each part is posed based on the animation parameters then positioned and rotated based on the appropriate tag according to Quake III model standards.
The lower.md3 part is the based. The upper.md3 part is attached to "tag_torso" in lower.md3. The head.md3 part is attached to "tag_head" in upper.md3.
The initial cframe transformation is applied to the base lower.md3 part before the whole model is posed.
Referenced by pose().
|
inline |
Advances the pose based on this character's animations.
| CoordinateFrame G3D::MD3Model::weaponFrame | ( | const CoordinateFrame & | cframe = CoordinateFrame(), |
| const Pose & | pose = Pose() |
||
| ) | const |
Return the coordinate frame of the tag_weapon; this is where a simulator should place objects carried by the character.
1.8.2