Pyrogenesis
13997
|
#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 |
Definition at line 136 of file ModelDef.h.
|
private |
Definition at line 283 of file ModelDef.h.
anonymous enum |
Enumerator | |
---|---|
FILE_VERSION |
Definition at line 142 of file ModelDef.h.
anonymous enum |
Enumerator | |
---|---|
FILE_READ_VERSION |
Definition at line 144 of file ModelDef.h.
CModelDef::CModelDef | ( | ) |
Definition at line 228 of file ModelDef.cpp.
CModelDef::~CModelDef | ( | ) |
Definition at line 237 of file ModelDef.cpp.
void CModelDef::BlendBoneMatrices | ( | CMatrix3D | boneMatrices[] | ) |
Blend bone matrices together to fill bone palette.
Definition at line 206 of file ModelDef.cpp.
const SPropPoint * CModelDef::FindPropPoint | ( | const char * | name | ) | const |
Definition at line 251 of file ModelDef.cpp.
|
inline |
Definition at line 184 of file ModelDef.h.
|
inline |
Definition at line 183 of file ModelDef.h.
|
inline |
Definition at line 178 of file ModelDef.h.
|
inline |
Definition at line 174 of file ModelDef.h.
|
inline |
Definition at line 179 of file ModelDef.h.
|
inline |
Definition at line 257 of file ModelDef.h.
|
inline |
Definition at line 182 of file ModelDef.h.
|
inline |
Definition at line 177 of file ModelDef.h.
|
inline |
Definition at line 173 of file ModelDef.h.
|
inline |
Definition at line 170 of file ModelDef.h.
|
inline |
Definition at line 166 of file ModelDef.h.
CModelDefRPrivate * CModelDef::GetRenderData | ( | const void * | key | ) | const |
Definition at line 465 of file ModelDef.cpp.
|
inline |
Definition at line 167 of file ModelDef.h.
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 |
Definition at line 261 of file ModelDef.cpp.
|
private |
Definition at line 423 of file ModelDef.cpp.
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.
Definition at line 456 of file ModelDef.cpp.
|
static |
Transform the given vertex's normal from the bind pose into the new pose.
Definition at line 46 of file ModelDef.cpp.
|
static |
Transform the given vertex's position from the bind pose into the new pose.
Definition at line 33 of file ModelDef.cpp.
|
static |
Transform vertices' positions and normals.
(This is equivalent to looping over SkinPoint and SkinNormal, but slightly more efficient.)
Definition at line 90 of file ModelDef.cpp.
CBoneState* CModelDef::m_Bones |
Definition at line 269 of file ModelDef.h.
CMatrix3D* CModelDef::m_InverseBindBoneMatrices |
Definition at line 270 of file ModelDef.h.
|
private |
Definition at line 279 of file ModelDef.h.
size_t CModelDef::m_NumBlends |
Definition at line 272 of file ModelDef.h.
size_t CModelDef::m_NumBones |
Definition at line 268 of file ModelDef.h.
size_t CModelDef::m_NumFaces |
Definition at line 265 of file ModelDef.h.
size_t CModelDef::m_NumUVsPerVertex |
Definition at line 263 of file ModelDef.h.
size_t CModelDef::m_NumVertices |
Definition at line 261 of file ModelDef.h.
size_t* CModelDef::m_pBlendIndices |
Definition at line 274 of file ModelDef.h.
SVertexBlend* CModelDef::m_pBlends |
Definition at line 273 of file ModelDef.h.
SModelFace* CModelDef::m_pFaces |
Definition at line 266 of file ModelDef.h.
std::vector<SPropPoint> CModelDef::m_PropPoints |
Definition at line 276 of file ModelDef.h.
SModelVertex* CModelDef::m_pVertices |
Definition at line 262 of file ModelDef.h.
|
private |
Definition at line 284 of file ModelDef.h.