![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cModelX.h>
Public Member Functions | |
cModelX (const FILECHAR_t *pszFileName) | |
virtual | ~cModelX () |
virtual HRESULT | LoadMeshHierarchy (const FILECHAR_t *pstrMeshXFilePath, IDirect3DDevice9 *pd3dDevice) |
virtual HRESULT | DeleteDeviceObjects () |
HRESULT | FrameMove (float fElapsedTime) |
cModelXFrame * | get_FrameRoot () const |
ModelX_FrameMask_t | get_TotalFlags () const |
void | UpdateXHeader () |
const cBounds3f & | get_BBox () |
const cSpheref & | get_BSphere () |
int | ComputeBoundingBox (cBounds3f &bres) |
int | ComputeBoundingSphere (cSpheref &bsphere) |
cModelXFrame * | FindFrame (const ATOMCHAR_t *pszFrameName) const |
void | DestroyFrameX (cModelXFrame *pFrame) |
STDMETHOD() | CreateFrame (const char *pszName, _D3DXFRAME **ppNewFrame) |
ID3DXAllocateHierarchy. More... | |
STDMETHOD() | CreateMeshContainer (const char *pszName, const _D3DXMESHDATA *pMeshData, const _D3DXMATERIAL *pMaterials, const _D3DXEFFECTINSTANCE *pEffectInstances, DWORD NumMaterials, const DWORD *pAdjacency, ID3DXSkinInfo *, _D3DXMESHCONTAINER **ppNewMeshCont) |
STDMETHOD() | DestroyFrame (_D3DXFRAME *pFrameToFree) |
STDMETHOD() | DestroyMeshContainer (_D3DXMESHCONTAINER *pMeshContBase) |
STDMETHOD() | LoadTopLevelData (ID3DXFileData *pData) |
ID3DXLoadUserData. More... | |
STDMETHOD() | LoadFrameChildData (_D3DXFRAME *pF, ID3DXFileData *pData) |
STDMETHOD() | LoadMeshChildData (_D3DXMESHCONTAINER *pMC, ID3DXFileData *pData) |
UNITTEST_FRIEND (cModelX) | |
![]() | |
cXResourceFile (const FILECHAR_t *pszFileName) | |
virtual | ~cXResourceFile () |
cStringF | get_FilePath () const |
void | put_FilePath (const FILECHAR_t *pszFileName) |
STDMETHOD_ (cString, get_Name)() const | |
cStringF | get_FullPath () const |
cStringF | MakePeerPath (const FILECHAR_t *pszName) const |
virtual bool | isResourceLoaded () const noexcept |
void | put_LoadedState (HRESULT hResLoad) |
virtual HRESULT | LoadResource () |
![]() | |
cRefBase (int iRefCount=0) noexcept | |
virtual | ~cRefBase () |
int | get_RefCount () const noexcept |
HASHCODE_t | get_HashCode () const noexcept |
STDMETHOD_ (HASHCODE_t, get_HashCodeX)() const noexcept | |
virtual void | onFinalRelease () |
bool | isValidObj () const noexcept |
STDMETHOD_ (ULONG, AddRef)(void) override | |
STDMETHOD_ (ULONG, Release)(void) override | |
STDMETHOD() | QueryInterface (const IID &riid, void __RPC_FAR *__RPC_FAR *ppvObject) override |
void | IncRefCount () |
void | DecRefCount () |
bool | isStaticConstruct () const noexcept |
void | StaticConstruct () |
void | StaticDestruct () |
bool | isDestructing () noexcept |
void | SetDestructing () |
Public Attributes | |
cModelXHeader | m_ModelXHeader |
cModelXFrame * | m_pFrameRoot |
created by CreateFrame() (a list) More... | |
Static Public Attributes | |
static const char * | k_szFrameNames [ModelX_FrameName_QTY+1] |
Protected Attributes | |
bool | m_bXHeaderValid |
m_ModelXHeader is valid ? read or computed. More... | |
ModelX_FrameMask_t | m_uTotalFlags |
m_uFrameFlags | m_uChildrenFlags for all frames More... | |
![]() | |
HRESULT | m_hResLoad |
0=loaded OK, <0 = it failed to load for some reason! OLE_E_BLANK = have not yet tried to load. More... | |
Additional Inherited Members | |
![]() | |
static HRESULT GRAYCALL | OnFAIL (HRESULT hRes) |
static. so we can trap all errors here. More... | |
![]() | |
static cStringF | s_sFileLoading |
name of file loading for debug. More... | |
Define a possibly complex hierarchy of Mesh/Model parts. i.e. collections of meshes to make up a single model.
Gray3D::cModelX::cModelX | ( | const FILECHAR_t * | pszFileName | ) |
|
virtual |
int Gray3D::cModelX::ComputeBoundingBox | ( | cBounds3f & | bres | ) |
we also use this function to know how many vertex are in here
int Gray3D::cModelX::ComputeBoundingSphere | ( | cSpheref & | bsphere | ) |
cSphereWork we also use this function to know how many vertex are in here
HRESULT Gray3D::cModelX::CreateFrame | ( | const char * | pszName, |
_D3DXFRAME ** | ppNewFrame | ||
) |
ID3DXAllocateHierarchy.
HRESULT Gray3D::cModelX::CreateMeshContainer | ( | const char * | pszName, |
const _D3DXMESHDATA * | pMeshData, | ||
const _D3DXMATERIAL * | pMaterials, | ||
const _D3DXEFFECTINSTANCE * | pEffectInstances, | ||
DWORD | NumMaterials, | ||
const DWORD * | pAdjacency, | ||
ID3DXSkinInfo * | , | ||
_D3DXMESHCONTAINER ** | ppNewMeshCont | ||
) |
|
virtual |
HRESULT Gray3D::cModelX::DestroyFrame | ( | _D3DXFRAME * | pFrameToFree | ) |
void Gray3D::cModelX::DestroyFrameX | ( | cModelXFrame * | pFrame | ) |
traverse and destroy children.
HRESULT Gray3D::cModelX::DestroyMeshContainer | ( | _D3DXMESHCONTAINER * | pMeshContBase | ) |
cModelXFrame * Gray3D::cModelX::FindFrame | ( | const ATOMCHAR_t * | pszFrameName | ) | const |
HRESULT Gray3D::cModelX::FrameMove | ( | float | fElapsedTime | ) |
Called once per frame per instance, the call is the entry point for animating the scene. Shared for multi instances!! so will have to be called for each instance at render time.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
virtual |
This creates all device-dependent managed objects, such as managed textures and managed vertex buffers. Called from InitDeviceObjects() MAKE_D3DHRESULT(905) = 0x88760389 = file not found.
HRESULT Gray3D::cModelX::LoadTopLevelData | ( | ID3DXFileData * | pData | ) |
ID3DXLoadUserData.
Gray3D::cModelX::UNITTEST_FRIEND | ( | cModelX | ) |
|
inline |
|
static |
|
protected |
m_ModelXHeader is valid ? read or computed.
cModelXHeader Gray3D::cModelX::m_ModelXHeader |
for new (compiled) formats
cModelXFrame* Gray3D::cModelX::m_pFrameRoot |
created by CreateFrame() (a list)
|
protected |
m_uFrameFlags | m_uChildrenFlags for all frames