Microsoft DirectX 8.0 (C++)

ID3DXMesh::GenerateAdjacency

Uses an epsilon value to generate face adjacency information that is more flexible for optimization and simplification operations.

HRESULT GenerateAdjacency(
  FLOAT Epsilon,
  DWORD* pAdjacency
);

Parameters

Epsilon
[in] Separation distance under which vertices are welded. This parameter is currently ignored and uses an epsilon of 0.0.
pAdjacency
[in, out] Pointer to a destination buffer for the face adjacency array of the 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.

Return Values

If the method succeeds, the return value is D3D_OK.

If the method fails, the return value can be one of the following values.

D3DERR_INVALIDCALL
D3DXERR_INVALIDDATA
E_OUTOFMEMORY

Remarks

This method only logically welds the vertices and no changes are made to the mesh. D3DXWeldVertices should be called after this method if modifying the mesh is desired.

Requirements

  Header: Declared in D3dx8mesh.h.
  Import Library: Use D3dx8.lib.