?/TD>
Microsoft DirectX 9.0

D3DXLoadMeshHierarchyFromXInMemory Function


Loads the first frame heirarchy from an .x file.

Syntax

HRESULT D3DXLoadMeshHierarchyFromXInMemory(      

    LPCVOID pMemory,     DWORD SizeOfMemory,     DWORD MeshOptions,     LPDIRECT3DDEVICE9 pDevice,     LPD3DXALLOCATEHIERARCHY pAlloc,     LPD3DXLOADUSERDATA pUserDataLoader,     LPD3DXFRAME* ppFrameHeirarchy,     LPD3DXANIMATIONCONTROLLER* ppAnimController );

Parameters

pMemory
[in] ] Pointer to a buffer that contains the mesh hierarchy.
SizeOfMemory
[in] Size of the pMemory buffer, in bytes.
MeshOptions
[in] Combination of one or more flags from the D3DXMESH enumeration that specify creation options for the mesh.
pDevice
[in] Pointer to an IDirect3DDevice9 interface, the device object associated with the mesh.
pAlloc
[in] Pointer to an ID3DXAllocateHierarchy interface.
pUserDataLoader
[in] Application provided interface that allows loading of user data. See ID3DXLoadUserData.
ppFrameHeirarchy
[out, retval] Returns a pointer to the loaded frame heirarchy. See D3DXFRAME.
ppAnimController
[out, retval] Returns a pointer to the animation controller corresponding to animation in the .x file. This is created with default tracks and events. See ID3DXAnimationController.

Return Value

If the function succeeds, the return value is D3D_OK.

If the function fails, the return value can be one of the following values.

D3DERR_INVALIDCALLThe method call is invalid. For example, a method's parameter may have an invalid value.
E_OUTOFMEMORYMicrosoft?Direct3D?could not allocate sufficient memory to complete the call.


Remarks

All the meshes in the file will be collapsed into one output mesh. If the file contains a frame hierarchy, all the transformations will be applied to the mesh.

Function Information

Headerd3dx9anim.h
Import libraryd3dx9.lib
Minimum operating systems Windows 98


© 2002 Microsoft Corporation. All rights reserved.