D3DXCleanMesh
Cleans a mesh, preparing it for simplification.
HRESULT D3DXCleanMesh(
D3DXCLEANTYPE CleanType,
LPD3DXMESH pMeshIn,
CONST DWORD * pAdjacencyIn,
LPD3DXMESH * ppMeshOut,
DWORD * pAdjacencyOut,
LPD3DXBUFFER * ppErrorsAndWarnings
);
Parameters
- CleanType
- [in] Vertex operations to perform in preparation for mesh cleaning. See D3DXCLEANTYPE.
- pMeshIn
- [in] Pointer to an ID3DXMesh interface, representing the mesh to be cleaned.
- pAdjacencyIn
- [in] 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] 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] Pointer to an array of three DWORDs per face that specify the three neighbors for each face in the output mesh.
- ppErrorsAndWarnings
- [out] Returns a buffer containing a string of errors and warnings, which explain the problems found in the mesh.
Return Values
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
Header: Declared in D3dx9mesh.h.