D3DXCleanMesh function

Cleans a mesh, preparing it for simplification.

Syntax

HRESULT D3DXCleanMesh(
  _In_        D3DXCLEANTYPE CleanType,
  _In_        LPD3DXMESH    pMeshIn,
  _In_  const DWORD         *pAdjacencyIn,
  _Out_       LPD3DXMESH    *ppMeshOut,
  _Out_       DWORD         *pAdjacencyOut,
  _Out_       LPD3DXBUFFER  *ppErrorsAndWarnings
);

Parameters

CleanType [in]

Type: D3DXCLEANTYPE

Vertex operations to perform in preparation for mesh cleaning. See D3DXCLEANTYPE.

pMeshIn [in]

Type: LPD3DXMESH

Pointer to an ID3DXMesh interface, representing the mesh to be cleaned.

pAdjacencyIn [in]

Type: const DWORD*

Pointer to an array of three DWORDs per face that specify the three neighbors for each face in the mesh to be cleaned.

ppMeshOut [out]

Type: LPD3DXMESH*

Address of a pointer to an ID3DXMesh interface, representing the returned cleaned mesh. The same mesh is returned that was passed in if no cleaning was necessary.

pAdjacencyOut [out]

Type: DWORD*

Pointer to an array of three DWORDs per face that specify the three neighbors for each face in the output mesh.

ppErrorsAndWarnings [out]

Type: LPD3DXBUFFER*

Returns a buffer containing a string of errors and warnings, which explain the problems found in the mesh.

Return value

Type: HRESULT

If the function succeeds, the return value is D3D_OK. If the function fails, the return value can be one of the following: D3DERR_INVALIDCALL, E_OUTOFMEMORY.

Remarks

This function cleans a mesh using the cleaning method and options specified in the CleanType parameter. See the D3DXCLEANTYPE enumeration for a description of the available options.

Requirements

Requirement Value
Header
D3DX9Mesh.h
Library
D3dx9.lib

See also

Mesh Functions