Microsoft DirectX 8.0 (C++)

ID3DXMesh::ConvertAdjacencyToPointReps

Generates point representatives for the mesh.

HRESULT ConvertAdjacencyToPointReps(
  CONST DWORD* pAdjacency,
  DWORD* PointRep
);

Parameters

pAdjacency
[in] Pointer to 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.
PointRep
[in, out] Pointer to a destination buffer for the point representatives of the mesh. The point representatives are stored as an array of indices with one element per vertex.

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_INVALIDMESH
E_OUTOFMEMORY

Remarks

Point representatives are a method of describing mesh adjacency by fusing two vertices with the same x-, y-, and z- coordinates but with different normal coordinates, u- and v-coordinates, color data, and so on. In a perfectly smooth mesh (a mesh without creases, boundaries, or holes), point representatives are redundant. In that case, it is possible to compute adjacent triangles by using a hash table to locate edges that share vertex indices. In the case of creases and texture boundaries, the point representatives are required to give a unique vertex index to use in a hash table for a group of co-located vertices that make up a vertex in the mesh.

Requirements

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

See Also

ID3DXMesh::ConvertPointRepsToAdjacency