D3DXConcatenateMeshes
Microsoft DirectX 9.0 SDK Update (October 2004)

D3DXConcatenateMeshes Function


Concatenates a group of meshes into one common mesh. This method can optionally apply a matrix transformation to each input mesh and its texture coordinates.

Syntax

HRESULT WINAPI D3DXConcatenateMeshes(      

    LPD3DXMESH *ppMeshes,     UINT NumMeshes,     DWORD Options,     const D3DXMATRIX *pGeomXForms,     const D3DXMATRIX *pTextureXForms,     const D3DVERTEXELEMENT9 *pDecl,     LPDIRECT3DDEVICE9 pD3DDevice,     LPD3DXMESH *ppMeshOut );

Parameters

ppMeshes
[in] Array of pointers to input D3DXMATRIX meshes to concatenate. These meshes can store precomputed radiance transfer (PRT) vectors.
NumMeshes
[in] Number of input meshes to concatenate.
Options
[in] Combination of one or more flags from the D3DXMESH enumeration, specifying creation options for the output mesh. Equivalent to the Options parameter of the D3DXCreateMesh function.
pGeomXForms
[in] Optional pointer to a D3DXMATRIX transformation matrix to apply to each submesh. May be NULL.
pTextureXForms
[in] Optional pointer to a D3DXMATRIX transformation matrix to apply to the (u, v) coordinates of each submesh. May be NULL.
pDecl
[in] Optional pointer to a D3DVERTEXELEMENT9 vertex declaration to use for merging mesh data. May be NULL.
pD3DDevice
[in] Pointer to a IDirect3DDevice9 device that is used to create the new mesh.
ppMeshOut
[in, out] Address of a pointer to the output ID3DXMesh mesh object.

Return Value

If the function succeeds, the return value is S_OK.

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

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

If no vertex declaration is given as part of the Options mesh creation parameter, the method will generate a union of all of the vertex declarations of the submeshes, promoting channels and types if necessary. The method will create an attribute table from attribute tables of the input meshes. To ensure creation of an attribute table, call ID3DXPMesh::Optimize with Flags set to D3DXMESHOPT_COMPACT and D3DXMESHOPT_ATTRSORT.

Function Information

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


© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.