Overview   Project   Class   Tree   Deprecated   Index 
0 A.D.
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

graphics
Class CModelDef

   in ModelDef.h
   in ModelDef.cpp

class CModelDef


Inner Classes, Typedefs, and Enums
enum CModelDef::anonymous_enum_1
          
enum CModelDef::anonymous_enum_2
          
typedef CModelDef::RenderDataMap
          
 
Field Summary
 CBoneState* m_Bones
          
private CStr m_Name
          
 u32 m_NumBones
          
 u32 m_NumFaces
          
 u32 m_NumPropPoints
          
 u32 m_NumVertices
          
 SModelFace* m_pFaces
          
 SPropPoint* m_PropPoints
          
 SModelVertex* m_pVertices
          
private CModelDef::RenderDataMap m_RenderData
          
 
Constructor Summary
CModelDef()
          
~CModelDef()
          
 
Method Summary
 SPropPoint* FindPropPoint( const char* name ) const
          
 CBoneState* GetBones() const
          
 SModelFace* GetFaces() const
          
 const CStr& GetName() const
          
 size_t GetNumBones() const
          
 size_t GetNumFaces() const
          
 int GetNumPropPoints() const
          
 size_t GetNumVertices() const
          
 SPropPoint* GetPropPoints() const
          
 CModelDefRPrivate* GetRenderData( const void* key ) const
          
 SModelVertex* GetVertices() const
          
 static CModelDef* Load( const char* filename, const char* name )
          Loads a PMD file.
 static void Save( const char* filename, const CModelDef* mdef )
          
 void SetRenderData( const void* key, CModelDefRPrivate* data )
          Register renderer private data.
 static CVector3D SkinNormal( const SModelVertex& vtx, const CMatrix3D newPoseMatrices[], const CMatrix3D inverseBindMatrices[] )
          Transform the given vertex's normal from the bind pose into the new pose.
 static CVector3D SkinPoint( const SModelVertex& vtx, const CMatrix3D newPoseMatrices[], const CMatrix3D inverseBindMatrices[] )
          ========================================================================= File : ModelDef.
 

Field Detail

m_Bones

public CBoneState* m_Bones;

m_Name

private CStr m_Name;

m_NumBones

public u32 m_NumBones;

m_NumFaces

public u32 m_NumFaces;

m_NumPropPoints

public u32 m_NumPropPoints;

m_NumVertices

public u32 m_NumVertices;

m_pFaces

public SModelFace* m_pFaces;

m_PropPoints

public SPropPoint* m_PropPoints;

m_pVertices

public SModelVertex* m_pVertices;

m_RenderData

private CModelDef::RenderDataMap m_RenderData;


Constructor Detail

CModelDef

public CModelDef();

~CModelDef

public ~CModelDef();


Method Detail

FindPropPoint

public SPropPoint* FindPropPoint( const char* name ) const;

GetBones

public CBoneState* GetBones() const;

GetFaces

public SModelFace* GetFaces() const;

GetName

public const CStr& GetName() const;

GetNumBones

public size_t GetNumBones() const;

GetNumFaces

public size_t GetNumFaces() const;

GetNumPropPoints

public int GetNumPropPoints() const;

GetNumVertices

public size_t GetNumVertices() const;

GetPropPoints

public SPropPoint* GetPropPoints() const;

GetRenderData

public CModelDefRPrivate* GetRenderData( const void* key ) const;

GetVertices

public SModelVertex* GetVertices() const;

Load

public static CModelDef* Load( const char* filename, const char* name );
Loads a PMD file.
Parameters:
filename - VFS path of .pmd file to load
name - arbitrary name to give the model for debugging purposes
Returns:
the model - always non-NULL
Throws:
PSERROR_File - if it can't load the model

Save

public static void Save( const char* filename, const CModelDef* mdef );

SetRenderData

public void 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.
Parameters:
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.

SkinNormal

public static CVector3D SkinNormal( const SModelVertex& vtx, const CMatrix3D newPoseMatrices[], const CMatrix3D inverseBindMatrices[] );
Transform the given vertex's normal from the bind pose into the new pose.
Returns:
new world-space vertex normal

SkinPoint

public static CVector3D SkinPoint( const SModelVertex& vtx, const CMatrix3D newPoseMatrices[], const CMatrix3D inverseBindMatrices[] );
========================================================================= File : ModelDef.cpp Project : 0 A.D. Description : Defines a raw 3d model. =========================================================================

 Overview   Project   Class   Tree   Deprecated   Index 
0 A.D.
Generated on September 04, 2007 at 18:13
CppDoc v2.4.0
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD