?/TD> |
Microsoft DirectX 9.0 |
Cleans a mesh, preparing it for simplification.
Syntax
HRESULT D3DXCleanMesh(
LPD3DXMESH pMeshIn, const DWORD *pAdjacencyIn, LPD3DXMESH *ppMeshOut, DWORD *pAdjacencyOut, LPD3DXBUFFER *ppErrorsAndWarnings );
Parameters
- 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 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_INVALIDCALL The method call is invalid. For example, a method's parameter may have an invalid value. E_OUTOFMEMORY Microsoft?Direct3D?could not allocate sufficient memory to complete the call.
Remarks
This method cleans the mesh by adding another vertex where two fans of triangles share the same vertex.
Function Information
Header d3dx9mesh.h Import library d3dx9.lib Minimum operating systems Windows 98