Microsoft DirectX 8.1 (C++) |
Welds replicated vertices together, which have vertex attributes that are equal. This method used specified epislions for equality comparisons.
HRESULT D3DXWeldVertices( CONST LPD3DXMESH pMesh, LPD3DXWELDEPSILONS pEpsilon, CONST DWORD* pAdjacencyIn, DWORD* pAdjacencyOut, DWORD* pFaceRemap, LPD3DXBUFFER* ppVertexRemap );
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 |
E_OUTOFMEMORY |
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 fEpsilon or texture coordinates within fEpsilon.
Header: Declared in D3dx8mesh.h.
Import Library: Use D3dx8.lib.