Microsoft DirectX 8.0 (C++) |
Welds replicated vertices together that have attributes that are equal.
HRESULT D3DXValidMesh( CONST LPD3DXMESH pMesh, float fEpsilon, CONST DWORD* pAdjacencyIn, DWORD* pAdjacencyOut, DWORD* pFaceRemap, LPD3DXBUFFER* ppVertexRemap );
[in] Pointer to an array of three DWORDs per face that specify the three neighbors for each face in the source mesh. If this parameter is set to NULL, then ID3DXMesh::GenerateAdjacency will be called to create logical adjacency information.
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.