|Microsoft DirectX 9.0|
Welds together replicated vertices that have equal attributes. This method uses specified epsilons for equality comparisons.
const LPD3DXMESH pMesh, DWORD Flags, CONST D3DXWELDEPSILONS* pEpsilon, CONST DWORD* pAdjacencyIn, DWORD* pAdjacencyOut, DWORD* pFaceRemap, LPD3DXBUFFER* ppVertexRemap );
- [in] Pointer to an ID3DXMesh object, the mesh from which to weld vertices.
- [in] Combination of one or more flags from D3DXMESH.
- [in] Pointer to a D3DXWELDEPSILONS structure, specifying the epsilon values to be used for this method.
- [in] Pointer to an array of three DWORDs per face that specify the three neighbors for each face in the source mesh. If the edge has no adjacent faces, the value is 0xffffffff. If this parameter is set to NULL, ID3DXBaseMesh::GenerateAdjacency will be called to create logical adjacency information.
- [in, out] Pointer to a destination buffer for the face adjacency array of the optimized mesh. The face adjacency is stored as an array of arrays. The innermost array is three indices of adjacent triangles, and the outer array is one set of face adjacency per triangle in the mesh.
- [out] Pointer to a destination buffer containing the new index for each face.
- [out] Address of a pointer to an ID3DXBuffer interface, containing the new index for each vertex.
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.
This method uses the provided adjacency information to determine the points that are replicated. This method uses an epsilon compare to merge vertices, and requires vertices with equal position to already have been calculated and represented by point-representative data.
This method takes logically welded vertices and combines the ones that have similar components, such as normals within pEpsilon or texture coordinates within pEpsilon.
Header d3dx9mesh.h Import library d3dx9.lib Minimum operating systems Windows 98