description | ms.assetid | title | ms.topic | ms.date | topic_type | api_name | api_type | api_location | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ID3DXBaseMesh::GenerateAdjacency method - Generate a list of mesh edges, as well as a list of faces that share each edge. |
9d52290f-1c9e-43a7-b239-35cd54e36466 |
ID3DXBaseMesh::GenerateAdjacency method (D3DX9Mesh.h) |
reference |
05/31/2018 |
|
|
|
|
Generate a list of mesh edges, as well as a list of faces that share each edge.
HRESULT GenerateAdjacency(
[in] FLOAT Epsilon,
[in] DWORD *pAdjacency
);
-
Epsilon [in]
-
Type: FLOAT
Specifies that vertices that differ in position by less than epsilon should be treated as coincident.
-
pAdjacency [in]
-
Type: DWORD*
Pointer to an array of three DWORDs per face to be filled with the indices of adjacent faces. The number of bytes in this array must be at least 3 * ID3DXBaseMesh::GetNumFaces * sizeof(DWORD).
Type: HRESULT
If the method succeeds, the return value is D3D_OK. If the method fails, the return value can be one of the following: D3DERR_INVALIDCALL, E_OUTOFMEMORY.
After an application generates adjacency information for a mesh, the mesh data can be optimized for better drawing performance.
The order of the entries in the adjacency buffer is determined by the order of the vertex indices in the index buffer. The adjacent triangle 0 always corresponds to the edge between the indices of the corners 0 and 1. The adjacent triangle 1 always corresponds to the edge between the indices of the corners 1 and 2 while the adjacent triangle 2 corresponds to the edge between the indices of the corners 2 and 0.
Requirement | Value |
---|---|
Header |
|
Library |
|