Classes | Public Types | Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes

Md3Player Class Reference

#include <Md3Player.h>

Collaboration diagram for Md3Player:
Collaboration graph
[legend]

List of all members.

Classes

struct  Md3AnimState

Public Types

typedef map< string,
Md3PlayerSkinPtr
SkinMap

Public Member Functions

 Md3Player (const string &path, Md3PlayerLOD lod=kLodDefault) throw (Md3Exception)
 ~Md3Player ()
void draw () const
void renderFrame (int upperFrame, int lowerFrame) const
void animate (float dt)
void setScale (float scale)
void setAnimation (Md3PlayerAnimType type)
void setSkin (const string &name)
void linkWeapon (Md3Weapon *weapon)
void unlinkWeapon ()
float scale () const
const string & path () const
const string & name () const
Md3PlayerLOD lod () const
const SkinMapskins () const
const string & skinName () const
void getAnimationState (eAnimationArea area, Md3AnimState_t &state)
void setAnimationState (eAnimationArea area, const Md3AnimState_t &state)

Private Types

typedef shared_ptr< Md3ModelMd3ModelPtr
typedef shared_ptr< Md3PlayerSkinMd3PlayerSkinPtr

Private Member Functions

void loadModels (const string &path) throw (Md3Exception)
void loadAnimations (const string &path) throw (Md3Exception)
void loadSkins (const string &path) throw (Md3Exception)

Static Private Member Functions

static void setState (const Md3AnimState &anim, Md3AnimState_t &state)
static void updateAnim (Md3AnimState &anim, const Md3AnimState_t &state, Md3PlayerAnim_t *a)

Private Attributes

Md3ModelPtr _lower
Md3ModelPtr _upper
Md3ModelPtr _head
Md3AnimState _lowerAnim
Md3AnimState _upperAnim
Md3PlayerAnim_t _anims [kMaxAnimations]
SkinMap _skins
Md3PlayerSkin_currentSkin
string _currentSkinName
Md3Weapon_weapon
string _path
string _name
float _scale
Md3PlayerLOD _lod

Detailed Description

Definition at line 233 of file Md3Player.h.


Member Typedef Documentation

typedef shared_ptr<Md3Model> Md3Player::Md3ModelPtr [private]

Definition at line 264 of file Md3Player.h.

typedef shared_ptr<Md3PlayerSkin> Md3Player::Md3PlayerSkinPtr [private]

Definition at line 265 of file Md3Player.h.

typedef map<string, Md3PlayerSkinPtr> Md3Player::SkinMap

Definition at line 268 of file Md3Player.h.


Constructor & Destructor Documentation

Md3Player::Md3Player ( const string &  path,
Md3PlayerLOD  lod = kLodDefault 
) throw (Md3Exception)

Definition at line 365 of file Md3Player.cpp.

Md3Player::~Md3Player (  ) 

Definition at line 394 of file Md3Player.cpp.


Member Function Documentation

void Md3Player::draw (  )  const

Definition at line 406 of file Md3Player.cpp.

void Md3Player::renderFrame ( int  upperFrame,
int  lowerFrame 
) const

Definition at line 448 of file Md3Player.cpp.

void Md3Player::animate ( float  dt  ) 

Definition at line 487 of file Md3Player.cpp.

void Md3Player::setScale ( float  scale  )  [inline]

Definition at line 276 of file Md3Player.h.

void Md3Player::setAnimation ( Md3PlayerAnimType  type  ) 

Definition at line 501 of file Md3Player.cpp.

void Md3Player::setSkin ( const string &  name  ) 

Definition at line 527 of file Md3Player.cpp.

void Md3Player::linkWeapon ( Md3Weapon weapon  ) 

Definition at line 549 of file Md3Player.cpp.

void Md3Player::unlinkWeapon (  ) 

Definition at line 565 of file Md3Player.cpp.

float Md3Player::scale (  )  const [inline]

Definition at line 284 of file Md3Player.h.

const string& Md3Player::path (  )  const [inline]

Definition at line 285 of file Md3Player.h.

const string& Md3Player::name (  )  const [inline]

Definition at line 286 of file Md3Player.h.

Md3PlayerLOD Md3Player::lod (  )  const [inline]

Definition at line 287 of file Md3Player.h.

const SkinMap& Md3Player::skins (  )  const [inline]

Definition at line 288 of file Md3Player.h.

const string& Md3Player::skinName (  )  const [inline]

Definition at line 289 of file Md3Player.h.

void Md3Player::getAnimationState ( eAnimationArea  area,
Md3AnimState_t state 
)

Definition at line 585 of file Md3Player.cpp.

void Md3Player::setAnimationState ( eAnimationArea  area,
const Md3AnimState_t state 
)

Definition at line 620 of file Md3Player.cpp.

void Md3Player::loadModels ( const string &  path  )  throw (Md3Exception) [private]

Definition at line 657 of file Md3Player.cpp.

void Md3Player::loadAnimations ( const string &  path  )  throw (Md3Exception) [private]

Definition at line 705 of file Md3Player.cpp.

void Md3Player::loadSkins ( const string &  path  )  throw (Md3Exception) [private]

Definition at line 759 of file Md3Player.cpp.

void Md3Player::setState ( const Md3AnimState anim,
Md3AnimState_t state 
) [static, private]

Definition at line 601 of file Md3Player.cpp.

void Md3Player::updateAnim ( Md3AnimState anim,
const Md3AnimState_t state,
Md3PlayerAnim_t a 
) [static, private]

Definition at line 637 of file Md3Player.cpp.


Member Data Documentation

Definition at line 315 of file Md3Player.h.

Definition at line 316 of file Md3Player.h.

Definition at line 317 of file Md3Player.h.

Definition at line 319 of file Md3Player.h.

Definition at line 320 of file Md3Player.h.

Md3PlayerAnim_t Md3Player::_anims[kMaxAnimations] [private]

Definition at line 323 of file Md3Player.h.

Definition at line 326 of file Md3Player.h.

Definition at line 327 of file Md3Player.h.

string Md3Player::_currentSkinName [private]

Definition at line 328 of file Md3Player.h.

Definition at line 330 of file Md3Player.h.

string Md3Player::_path [private]

Definition at line 332 of file Md3Player.h.

string Md3Player::_name [private]

Definition at line 333 of file Md3Player.h.

float Md3Player::_scale [private]

Definition at line 334 of file Md3Player.h.

Definition at line 335 of file Md3Player.h.


The documentation for this class was generated from the following files: