raSystem  1.0 bata
CDXUTSDKMesh Class Reference

#include <raSDKmesh.h>

Public Member Functions

void RenderMesh (UINT iMesh, bool bAdjacent, UINT iDiffuseSlot, UINT iNormalSlot, UINT iSpecularSlot)
 
 CDXUTSDKMesh ()
 
virtual ~CDXUTSDKMesh ()
 
virtual HRESULT Create (raDirectX *pDev11, LPCTSTR szFileName, bool bCreateAdjacencyIndices=false, SDKMESH_CALLBACKS11 *pLoaderCallbacks=NULL)
 
virtual HRESULT Create (raDirectX *pDev11, BYTE *pData, UINT DataBytes, bool bCreateAdjacencyIndices=false, bool bCopyStatic=false, SDKMESH_CALLBACKS11 *pLoaderCallbacks=NULL)
 
virtual HRESULT LoadAnimation (raString szFileName)
 
virtual void Destroy ()
 
void TransformBindPose (D3DXMATRIX *pWorld)
 
void TransformMesh (D3DXMATRIX *pWorld, double fTime)
 
virtual void Render (UINT iDiffuseSlot=INVALID_SAMPLER_SLOT, UINT iNormalSlot=INVALID_SAMPLER_SLOT, UINT iSpecularSlot=INVALID_SAMPLER_SLOT)
 
virtual void RenderAdjacent (UINT iDiffuseSlot=INVALID_SAMPLER_SLOT, UINT iNormalSlot=INVALID_SAMPLER_SLOT, UINT iSpecularSlot=INVALID_SAMPLER_SLOT)
 
DXGI_FORMAT GetIBFormat11 (UINT iMesh)
 
ID3D11Buffer * GetVB11 (UINT iMesh, UINT iVB)
 
ID3D11Buffer * GetIB11 (UINT iMesh)
 
SDKMESH_INDEX_TYPE GetIndexType (UINT iMesh)
 
ID3D11Buffer * GetAdjIB11 (UINT iMesh)
 
raString GetMeshPathA ()
 
UINT GetNumMeshes ()
 
UINT GetNumMaterials ()
 
UINT GetNumVBs ()
 
UINT GetNumIBs ()
 
ID3D11Buffer * GetVB11At (UINT iVB)
 
ID3D11Buffer * GetIB11At (UINT iIB)
 
BYTE * GetRawVerticesAt (UINT iVB)
 
BYTE * GetRawIndicesAt (UINT iIB)
 
SDKMESH_MATERIALGetMaterial (UINT iMaterial)
 
SDKMESH_MESHGetMesh (UINT iMesh)
 
UINT GetNumSubsets (UINT iMesh)
 
SDKMESH_SUBSETGetSubset (UINT iMesh, UINT iSubset)
 
UINT GetVertexStride (UINT iMesh, UINT iVB)
 
UINT GetNumFrames ()
 
SDKMESH_FRAMEGetFrame (UINT iFrame)
 
SDKMESH_FRAMEFindFrame (raString pszName)
 
UINT64 GetNumVertices (UINT iMesh, UINT iVB)
 
UINT64 GetNumIndices (UINT iMesh)
 
D3DXVECTOR3 GetMeshBBoxCenter (UINT iMesh)
 
D3DXVECTOR3 GetMeshBBoxExtents (UINT iMesh)
 
UINT GetOutstandingResources ()
 
UINT GetOutstandingBufferResources ()
 
bool CheckLoadDone ()
 
bool IsLoaded ()
 
bool IsLoading ()
 
void SetLoading (bool bLoading)
 
BOOL HadLoadingError ()
 
UINT GetNumInfluences (UINT iMesh)
 
const D3DXMATRIX * GetMeshInfluenceMatrix (UINT iMesh, UINT iInfluence)
 
UINT GetAnimationKeyFromTime (double fTime)
 
const D3DXMATRIX * GetWorldMatrix (UINT iFrameIndex)
 
const D3DXMATRIX * GetInfluenceMatrix (UINT iFrameIndex)
 
bool GetAnimationProperties (UINT *pNumKeys, FLOAT *pFrameTime)
 

Static Public Member Functions

static D3D11_PRIMITIVE_TOPOLOGY GetPrimitiveType11 (SDKMESH_PRIMITIVE_TYPE PrimType)
 

Protected Member Functions

void LoadMaterials (raDirectX *pd3dDevice, SDKMESH_MATERIAL *pMaterials, UINT NumMaterials, SDKMESH_CALLBACKS11 *pLoaderCallbacks=NULL)
 
HRESULT CreateVertexBuffer (raDirectX *pd3dDevice, SDKMESH_VERTEX_BUFFER_HEADER *pHeader, void *pVertices, SDKMESH_CALLBACKS11 *pLoaderCallbacks=NULL)
 
HRESULT CreateIndexBuffer (raDirectX *pd3dDevice, SDKMESH_INDEX_BUFFER_HEADER *pHeader, void *pIndices, SDKMESH_CALLBACKS11 *pLoaderCallbacks=NULL)
 
virtual HRESULT CreateFromFile (raDirectX *pDev11, LPCTSTR szFileName, bool bCreateAdjacencyIndices, SDKMESH_CALLBACKS11 *pLoaderCallbacks11=NULL)
 
virtual HRESULT CreateFromMemory (raDirectX *pDev11, BYTE *pData, UINT DataBytes, bool bCreateAdjacencyIndices, bool bCopyStatic, SDKMESH_CALLBACKS11 *pLoaderCallbacks11=NULL)
 
void TransformBindPoseFrame (UINT iFrame, D3DXMATRIX *pParentWorld)
 
void TransformFrame (UINT iFrame, D3DXMATRIX *pParentWorld, double fTime)
 
void TransformFrameAbsolute (UINT iFrame, double fTime)
 
void RenderFrame (UINT iFrame, bool bAdjacent, UINT iDiffuseSlot, UINT iNormalSlot, UINT iSpecularSlot)
 

Protected Attributes

BYTE * m_pStaticMeshData
 
BYTE * m_pHeapData
 
BYTE * m_pAnimationData
 
BYTE ** m_ppVertices
 
BYTE ** m_ppIndices
 
char m_strPathW [MAX_PATH]
 
char m_strPath [MAX_PATH]
 
SDKMESH_HEADERm_pMeshHeader
 
SDKMESH_VERTEX_BUFFER_HEADERm_pVertexBufferArray
 
SDKMESH_INDEX_BUFFER_HEADERm_pIndexBufferArray
 
SDKMESH_MESHm_pMeshArray
 
SDKMESH_SUBSETm_pSubsetArray
 
SDKMESH_FRAMEm_pFrameArray
 
SDKMESH_MATERIALm_pMaterialArray
 
SDKMESH_INDEX_BUFFER_HEADERm_pAdjacencyIndexBufferArray
 
SDKANIMATION_FILE_HEADERm_pAnimationHeader
 
SDKANIMATION_FRAME_DATAm_pAnimationFrameData
 
D3DXMATRIX * m_pBindPoseFrameMatrices
 
D3DXMATRIX * m_pTransformedFrameMatrices
 
D3DXMATRIX * m_pWorldPoseFrameMatrices
 

Detailed Description

Definition at line 249 of file raSDKmesh.h.

Constructor & Destructor Documentation

◆ CDXUTSDKMesh()

CDXUTSDKMesh::CDXUTSDKMesh ( )

Definition at line 616 of file raSDKmesh.cpp.

◆ ~CDXUTSDKMesh()

CDXUTSDKMesh::~CDXUTSDKMesh ( )
virtual

Definition at line 636 of file raSDKmesh.cpp.

Member Function Documentation

◆ CheckLoadDone()

bool CDXUTSDKMesh::CheckLoadDone ( )

Definition at line 1070 of file raSDKmesh.cpp.

◆ Create() [1/2]

HRESULT CDXUTSDKMesh::Create ( raDirectX pDev11,
LPCTSTR  szFileName,
bool  bCreateAdjacencyIndices = false,
SDKMESH_CALLBACKS11 pLoaderCallbacks = NULL 
)
virtual

Definition at line 640 of file raSDKmesh.cpp.

◆ Create() [2/2]

HRESULT CDXUTSDKMesh::Create ( raDirectX pDev11,
BYTE *  pData,
UINT  DataBytes,
bool  bCreateAdjacencyIndices = false,
bool  bCopyStatic = false,
SDKMESH_CALLBACKS11 pLoaderCallbacks = NULL 
)
virtual

Definition at line 645 of file raSDKmesh.cpp.

◆ CreateFromFile()

HRESULT CDXUTSDKMesh::CreateFromFile ( raDirectX pDev11,
LPCTSTR  szFileName,
bool  bCreateAdjacencyIndices,
SDKMESH_CALLBACKS11 pLoaderCallbacks11 = NULL 
)
protectedvirtual

Definition at line 132 of file raSDKmesh.cpp.

◆ CreateFromMemory()

HRESULT CDXUTSDKMesh::CreateFromMemory ( raDirectX pDev11,
BYTE *  pData,
UINT  DataBytes,
bool  bCreateAdjacencyIndices,
bool  bCopyStatic,
SDKMESH_CALLBACKS11 pLoaderCallbacks11 = NULL 
)
protectedvirtual

Definition at line 180 of file raSDKmesh.cpp.

◆ CreateIndexBuffer()

HRESULT CDXUTSDKMesh::CreateIndexBuffer ( raDirectX pd3dDevice,
SDKMESH_INDEX_BUFFER_HEADER pHeader,
void pIndices,
SDKMESH_CALLBACKS11 pLoaderCallbacks = NULL 
)
protected

Definition at line 105 of file raSDKmesh.cpp.

◆ CreateVertexBuffer()

HRESULT CDXUTSDKMesh::CreateVertexBuffer ( raDirectX pd3dDevice,
SDKMESH_VERTEX_BUFFER_HEADER pHeader,
void pVertices,
SDKMESH_CALLBACKS11 pLoaderCallbacks = NULL 
)
protected

Definition at line 76 of file raSDKmesh.cpp.

◆ Destroy()

void CDXUTSDKMesh::Destroy ( void  )
virtual

Definition at line 709 of file raSDKmesh.cpp.

◆ FindFrame()

SDKMESH_FRAME * CDXUTSDKMesh::FindFrame ( raString  pszName)

Definition at line 998 of file raSDKmesh.cpp.

◆ GetAdjIB11()

ID3D11Buffer * CDXUTSDKMesh::GetAdjIB11 ( UINT  iMesh)

Definition at line 890 of file raSDKmesh.cpp.

◆ GetAnimationKeyFromTime()

UINT CDXUTSDKMesh::GetAnimationKeyFromTime ( double  fTime)

Definition at line 1134 of file raSDKmesh.cpp.

◆ GetAnimationProperties()

bool CDXUTSDKMesh::GetAnimationProperties ( UINT *  pNumKeys,
FLOAT *  pFrameTime 
)

Definition at line 1149 of file raSDKmesh.cpp.

◆ GetFrame()

SDKMESH_FRAME * CDXUTSDKMesh::GetFrame ( UINT  iFrame)

Definition at line 991 of file raSDKmesh.cpp.

◆ GetIB11()

ID3D11Buffer * CDXUTSDKMesh::GetIB11 ( UINT  iMesh)

Definition at line 881 of file raSDKmesh.cpp.

◆ GetIB11At()

ID3D11Buffer * CDXUTSDKMesh::GetIB11At ( UINT  iIB)

Definition at line 939 of file raSDKmesh.cpp.

◆ GetIBFormat11()

DXGI_FORMAT CDXUTSDKMesh::GetIBFormat11 ( UINT  iMesh)

Definition at line 862 of file raSDKmesh.cpp.

◆ GetIndexType()

SDKMESH_INDEX_TYPE CDXUTSDKMesh::GetIndexType ( UINT  iMesh)

Definition at line 885 of file raSDKmesh.cpp.

◆ GetInfluenceMatrix()

const D3DXMATRIX * CDXUTSDKMesh::GetInfluenceMatrix ( UINT  iFrameIndex)

Definition at line 1128 of file raSDKmesh.cpp.

◆ GetMaterial()

SDKMESH_MATERIAL * CDXUTSDKMesh::GetMaterial ( UINT  iMaterial)

Definition at line 955 of file raSDKmesh.cpp.

◆ GetMesh()

SDKMESH_MESH * CDXUTSDKMesh::GetMesh ( UINT  iMesh)

Definition at line 961 of file raSDKmesh.cpp.

◆ GetMeshBBoxCenter()

D3DXVECTOR3 CDXUTSDKMesh::GetMeshBBoxCenter ( UINT  iMesh)

Definition at line 1023 of file raSDKmesh.cpp.

◆ GetMeshBBoxExtents()

D3DXVECTOR3 CDXUTSDKMesh::GetMeshBBoxExtents ( UINT  iMesh)

Definition at line 1029 of file raSDKmesh.cpp.

◆ GetMeshInfluenceMatrix()

const D3DXMATRIX * CDXUTSDKMesh::GetMeshInfluenceMatrix ( UINT  iMesh,
UINT  iInfluence 
)

Definition at line 1117 of file raSDKmesh.cpp.

◆ GetMeshPathA()

raString CDXUTSDKMesh::GetMeshPathA ( )

Definition at line 894 of file raSDKmesh.cpp.

◆ GetNumFrames()

UINT CDXUTSDKMesh::GetNumFrames ( )

Definition at line 985 of file raSDKmesh.cpp.

◆ GetNumIBs()

UINT CDXUTSDKMesh::GetNumIBs ( )

Definition at line 925 of file raSDKmesh.cpp.

◆ GetNumIndices()

UINT64 CDXUTSDKMesh::GetNumIndices ( UINT  iMesh)

Definition at line 1017 of file raSDKmesh.cpp.

◆ GetNumInfluences()

UINT CDXUTSDKMesh::GetNumInfluences ( UINT  iMesh)

Definition at line 1111 of file raSDKmesh.cpp.

◆ GetNumMaterials()

UINT CDXUTSDKMesh::GetNumMaterials ( )

Definition at line 909 of file raSDKmesh.cpp.

◆ GetNumMeshes()

UINT CDXUTSDKMesh::GetNumMeshes ( )

Definition at line 901 of file raSDKmesh.cpp.

◆ GetNumSubsets()

UINT CDXUTSDKMesh::GetNumSubsets ( UINT  iMesh)

Definition at line 967 of file raSDKmesh.cpp.

◆ GetNumVBs()

UINT CDXUTSDKMesh::GetNumVBs ( )

Definition at line 917 of file raSDKmesh.cpp.

◆ GetNumVertices()

UINT64 CDXUTSDKMesh::GetNumVertices ( UINT  iMesh,
UINT  iVB 
)

Definition at line 1011 of file raSDKmesh.cpp.

◆ GetOutstandingBufferResources()

UINT CDXUTSDKMesh::GetOutstandingBufferResources ( )

Definition at line 1161 of file raSDKmesh.cpp.

◆ GetOutstandingResources()

UINT CDXUTSDKMesh::GetOutstandingResources ( )

Definition at line 1035 of file raSDKmesh.cpp.

◆ GetPrimitiveType11()

D3D11_PRIMITIVE_TOPOLOGY CDXUTSDKMesh::GetPrimitiveType11 ( SDKMESH_PRIMITIVE_TYPE  PrimType)
static

Definition at line 823 of file raSDKmesh.cpp.

◆ GetRawIndicesAt()

BYTE * CDXUTSDKMesh::GetRawIndicesAt ( UINT  iIB)

Definition at line 949 of file raSDKmesh.cpp.

◆ GetRawVerticesAt()

BYTE * CDXUTSDKMesh::GetRawVerticesAt ( UINT  iVB)

Definition at line 943 of file raSDKmesh.cpp.

◆ GetSubset()

SDKMESH_SUBSET * CDXUTSDKMesh::GetSubset ( UINT  iMesh,
UINT  iSubset 
)

Definition at line 973 of file raSDKmesh.cpp.

◆ GetVB11()

ID3D11Buffer * CDXUTSDKMesh::GetVB11 ( UINT  iMesh,
UINT  iVB 
)

Definition at line 875 of file raSDKmesh.cpp.

◆ GetVB11At()

ID3D11Buffer * CDXUTSDKMesh::GetVB11At ( UINT  iVB)

Definition at line 933 of file raSDKmesh.cpp.

◆ GetVertexStride()

UINT CDXUTSDKMesh::GetVertexStride ( UINT  iMesh,
UINT  iVB 
)

Definition at line 979 of file raSDKmesh.cpp.

◆ GetWorldMatrix()

const D3DXMATRIX * CDXUTSDKMesh::GetWorldMatrix ( UINT  iFrameIndex)

Definition at line 1123 of file raSDKmesh.cpp.

◆ HadLoadingError()

BOOL CDXUTSDKMesh::HadLoadingError ( )

Definition at line 1105 of file raSDKmesh.cpp.

◆ IsLoaded()

bool CDXUTSDKMesh::IsLoaded ( )

Definition at line 1082 of file raSDKmesh.cpp.

◆ IsLoading()

bool CDXUTSDKMesh::IsLoading ( )

Definition at line 1093 of file raSDKmesh.cpp.

◆ LoadAnimation()

HRESULT CDXUTSDKMesh::LoadAnimation ( raString  szFileName)
virtual

Definition at line 651 of file raSDKmesh.cpp.

◆ LoadMaterials()

void CDXUTSDKMesh::LoadMaterials ( raDirectX pd3dDevice,
SDKMESH_MATERIAL pMaterials,
UINT  NumMaterials,
SDKMESH_CALLBACKS11 pLoaderCallbacks = NULL 
)
protected

Definition at line 5 of file raSDKmesh.cpp.

◆ Render()

void CDXUTSDKMesh::Render ( UINT  iDiffuseSlot = INVALID_SAMPLER_SLOT,
UINT  iNormalSlot = INVALID_SAMPLER_SLOT,
UINT  iSpecularSlot = INVALID_SAMPLER_SLOT 
)
virtual

Definition at line 809 of file raSDKmesh.cpp.

◆ RenderAdjacent()

void CDXUTSDKMesh::RenderAdjacent ( UINT  iDiffuseSlot = INVALID_SAMPLER_SLOT,
UINT  iNormalSlot = INVALID_SAMPLER_SLOT,
UINT  iSpecularSlot = INVALID_SAMPLER_SLOT 
)
virtual

Definition at line 817 of file raSDKmesh.cpp.

◆ RenderFrame()

void CDXUTSDKMesh::RenderFrame ( UINT  iFrame,
bool  bAdjacent,
UINT  iDiffuseSlot,
UINT  iNormalSlot,
UINT  iSpecularSlot 
)
protected

Definition at line 588 of file raSDKmesh.cpp.

◆ RenderMesh()

void CDXUTSDKMesh::RenderMesh ( UINT  iMesh,
bool  bAdjacent,
UINT  iDiffuseSlot,
UINT  iNormalSlot,
UINT  iSpecularSlot 
)

Definition at line 490 of file raSDKmesh.cpp.

◆ SetLoading()

void CDXUTSDKMesh::SetLoading ( bool  bLoading)

Definition at line 1099 of file raSDKmesh.cpp.

◆ TransformBindPose()

void CDXUTSDKMesh::TransformBindPose ( D3DXMATRIX *  pWorld)

Definition at line 776 of file raSDKmesh.cpp.

◆ TransformBindPoseFrame()

void CDXUTSDKMesh::TransformBindPoseFrame ( UINT  iFrame,
D3DXMATRIX *  pParentWorld 
)
protected

Definition at line 368 of file raSDKmesh.cpp.

◆ TransformFrame()

void CDXUTSDKMesh::TransformFrame ( UINT  iFrame,
D3DXMATRIX *  pParentWorld,
double  fTime 
)
protected

Definition at line 390 of file raSDKmesh.cpp.

◆ TransformFrameAbsolute()

void CDXUTSDKMesh::TransformFrameAbsolute ( UINT  iFrame,
double  fTime 
)
protected

Definition at line 441 of file raSDKmesh.cpp.

◆ TransformMesh()

void CDXUTSDKMesh::TransformMesh ( D3DXMATRIX *  pWorld,
double  fTime 
)

Definition at line 784 of file raSDKmesh.cpp.

Member Data Documentation

◆ m_pAdjacencyIndexBufferArray

SDKMESH_INDEX_BUFFER_HEADER* CDXUTSDKMesh::m_pAdjacencyIndexBufferArray
protected

Definition at line 281 of file raSDKmesh.h.

◆ m_pAnimationData

BYTE* CDXUTSDKMesh::m_pAnimationData
protected

Definition at line 263 of file raSDKmesh.h.

◆ m_pAnimationFrameData

SDKANIMATION_FRAME_DATA* CDXUTSDKMesh::m_pAnimationFrameData
protected

Definition at line 285 of file raSDKmesh.h.

◆ m_pAnimationHeader

SDKANIMATION_FILE_HEADER* CDXUTSDKMesh::m_pAnimationHeader
protected

Definition at line 284 of file raSDKmesh.h.

◆ m_pBindPoseFrameMatrices

D3DXMATRIX* CDXUTSDKMesh::m_pBindPoseFrameMatrices
protected

Definition at line 286 of file raSDKmesh.h.

◆ m_pFrameArray

SDKMESH_FRAME* CDXUTSDKMesh::m_pFrameArray
protected

Definition at line 277 of file raSDKmesh.h.

◆ m_pHeapData

BYTE* CDXUTSDKMesh::m_pHeapData
protected

Definition at line 262 of file raSDKmesh.h.

◆ m_pIndexBufferArray

SDKMESH_INDEX_BUFFER_HEADER* CDXUTSDKMesh::m_pIndexBufferArray
protected

Definition at line 274 of file raSDKmesh.h.

◆ m_pMaterialArray

SDKMESH_MATERIAL* CDXUTSDKMesh::m_pMaterialArray
protected

Definition at line 278 of file raSDKmesh.h.

◆ m_pMeshArray

SDKMESH_MESH* CDXUTSDKMesh::m_pMeshArray
protected

Definition at line 275 of file raSDKmesh.h.

◆ m_pMeshHeader

SDKMESH_HEADER* CDXUTSDKMesh::m_pMeshHeader
protected

Definition at line 272 of file raSDKmesh.h.

◆ m_ppIndices

BYTE** CDXUTSDKMesh::m_ppIndices
protected

Definition at line 265 of file raSDKmesh.h.

◆ m_ppVertices

BYTE** CDXUTSDKMesh::m_ppVertices
protected

Definition at line 264 of file raSDKmesh.h.

◆ m_pStaticMeshData

BYTE* CDXUTSDKMesh::m_pStaticMeshData
protected

Definition at line 261 of file raSDKmesh.h.

◆ m_pSubsetArray

SDKMESH_SUBSET* CDXUTSDKMesh::m_pSubsetArray
protected

Definition at line 276 of file raSDKmesh.h.

◆ m_pTransformedFrameMatrices

D3DXMATRIX* CDXUTSDKMesh::m_pTransformedFrameMatrices
protected

Definition at line 287 of file raSDKmesh.h.

◆ m_pVertexBufferArray

SDKMESH_VERTEX_BUFFER_HEADER* CDXUTSDKMesh::m_pVertexBufferArray
protected

Definition at line 273 of file raSDKmesh.h.

◆ m_pWorldPoseFrameMatrices

D3DXMATRIX* CDXUTSDKMesh::m_pWorldPoseFrameMatrices
protected

Definition at line 288 of file raSDKmesh.h.

◆ m_strPath

char CDXUTSDKMesh::m_strPath[MAX_PATH]
protected

Definition at line 269 of file raSDKmesh.h.

◆ m_strPathW

char CDXUTSDKMesh::m_strPathW[MAX_PATH]
protected

Definition at line 268 of file raSDKmesh.h.


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