Pyrogenesis
trunk
|
#include <ModelDef.h>
Public Types | |
enum | { FILE_VERSION = 3 } |
enum | { FILE_READ_VERSION = 1 } |
Public Member Functions | |
CModelDef () | |
~CModelDef () | |
size_t | GetNumVertices () const |
SModelVertex * | GetVertices () const |
size_t | GetNumUVsPerVertex () const |
size_t | GetNumFaces () const |
SModelFace * | GetFaces () const |
size_t | GetNumBones () const |
CBoneState * | GetBones () const |
CMatrix3D * | GetInverseBindBoneMatrices () |
size_t | GetNumBlends () const |
SVertexBlend * | GetBlends () const |
size_t * | GetBlendIndices () const |
const SPropPoint * | FindPropPoint (const char *name) const |
void | BlendBoneMatrices (CMatrix3D boneMatrices[]) |
Blend bone matrices together to fill bone palette. More... | |
void | SetRenderData (const void *key, CModelDefRPrivate *data) |
Register renderer private data. More... | |
CModelDefRPrivate * | GetRenderData (const void *key) const |
const VfsPath & | GetName () const |
Static Public Member Functions | |
static void | Save (const VfsPath &filename, const CModelDef *mdef) |
static CModelDef * | Load (const VfsPath &filename, const VfsPath &name) |
Loads a PMD file. More... | |
static CVector3D | SkinPoint (const SModelVertex &vtx, const CMatrix3D newPoseMatrices[]) |
Transform the given vertex's position from the bind pose into the new pose. More... | |
static CVector3D | SkinNormal (const SModelVertex &vtx, const CMatrix3D newPoseMatrices[]) |
Transform the given vertex's normal from the bind pose into the new pose. More... | |
static void | SkinPointsAndNormals (size_t numVertices, const VertexArrayIterator< CVector3D > &Position, const VertexArrayIterator< CVector3D > &Normal, const SModelVertex *vertices, const size_t *blendIndices, const CMatrix3D newPoseMatrices[]) |
Transform vertices' positions and normals. More... | |
Public Attributes | |
size_t | m_NumVertices |
SModelVertex * | m_pVertices |
size_t | m_NumUVsPerVertex |
size_t | m_NumFaces |
SModelFace * | m_pFaces |
size_t | m_NumBones |
CBoneState * | m_Bones |
CMatrix3D * | m_InverseBindBoneMatrices |
size_t | m_NumBlends |
SVertexBlend * | m_pBlends |
size_t * | m_pBlendIndices |
std::vector< SPropPoint > | m_PropPoints |
Private Types | |
typedef std::map< const void *, CModelDefRPrivate * > | RenderDataMap |
Private Member Functions | |
NONCOPYABLE (CModelDef) | |
Private Attributes | |
VfsPath | m_Name |
RenderDataMap | m_RenderData |
|
private |
CModelDef::CModelDef | ( | ) |
CModelDef::~CModelDef | ( | ) |
void CModelDef::BlendBoneMatrices | ( | CMatrix3D | boneMatrices[] | ) |
Blend bone matrices together to fill bone palette.
const SPropPoint * CModelDef::FindPropPoint | ( | const char * | name | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
CModelDefRPrivate * CModelDef::GetRenderData | ( | const void * | key | ) | const |
|
inline |
Loads a PMD file.
filename | VFS path of .pmd file to load |
name | arbitrary name to give the model for debugging purposes (usually pathname) |
PSERROR_File | if it can't load the model |
|
private |
void CModelDef::SetRenderData | ( | const void * | key, |
CModelDefRPrivate * | data | ||
) |
Register renderer private data.
Use the key to distinguish between private data used by different render paths. The private data will be managed by this CModelDef object: It will be deleted when CModelDef is destructed or when private data is registered using the same key.
key | The opaque key that is used to identify the caller. The given private data can be retrieved by passing key to GetRenderData. |
data | The private data. |
postconditions : data is bound to the lifetime of this CModelDef object.
|
static |
Transform the given vertex's normal from the bind pose into the new pose.
|
static |
Transform the given vertex's position from the bind pose into the new pose.
|
static |
Transform vertices' positions and normals.
(This is equivalent to looping over SkinPoint and SkinNormal, but slightly more efficient.)
CBoneState* CModelDef::m_Bones |
CMatrix3D* CModelDef::m_InverseBindBoneMatrices |
|
private |
size_t CModelDef::m_NumBlends |
size_t CModelDef::m_NumBones |
size_t CModelDef::m_NumFaces |
size_t CModelDef::m_NumUVsPerVertex |
size_t CModelDef::m_NumVertices |
size_t* CModelDef::m_pBlendIndices |
SVertexBlend* CModelDef::m_pBlends |
SModelFace* CModelDef::m_pFaces |
std::vector<SPropPoint> CModelDef::m_PropPoints |
SModelVertex* CModelDef::m_pVertices |
|
private |