www.pudn.com > DirectX source.zip > CSkinMesh.h
/*!
@file : CSkinMesh.h
Contains the header of class CSkinMesh
@author Sarmad Kh. Abdulla
*/
//------------------------------------------------------------------------------
//! Holds a skin mesh scene.
/*! This class holds a skin mesh and is responsible for all the
functionality related to rendering and animating this mesh. */
class CSkinMesh
{
// construction / destruction
public:
~CSkinMesh()
{
Destroy();
}
// member functions
public:
//! Create the hierarchy from an x file
void Create( const char * filename, LPDIRECT3DDEVICE8 pd3ddevice );
//! Destroy the hierarchy
virtual void Destroy( void );
//! Find the bones used by the skin meshes of this hierarchy
void FindBones( void );
//! Load an animation set
void LoadAnimationSet( LPDIRECTXFILEDATA pxofobj );
//! Load an animation
void LoadAnimation( LPDIRECTXFILEDATA pxofobj,
CAnimationNode * pparent = NULL );
//! Set the time for the hierarchy animation objects
void SetTime( DWORD dwtime )
{
Animations.SetTime( dwtime );
}
//! Render the hierarchy to the given device
virtual void Render( LPDIRECT3DDEVICE8 pd3ddevice, LPD3DXMATRIX pworldmat );
// member variables
protected:
//! The root frame of this hierarchy
CFrameNode RootFrame;
//! The animations link tree head of this hierarchy
CAnimationNode Animations;
};