ID3DXPRTEngine::GetAdaptedMesh method

Returns a mesh with modifications resulting from adaptive spatial sampling. The returned mesh contains only positions, normals, and texture coordinates (if defined).

Syntax

HRESULT GetAdaptedMesh(
  [in]      LPDIRECT3DDEVICE9 pDevice,
  [in, out] UINT              *pFaceRemap,
  [in, out] UINT              *pVertRemap,
  [in, out] FLOAT             *pfVertWeights,
  [out]     LPD3DXMESH        *ppMesh
);

Parameters

pDevice [in]

Type: LPDIRECT3DDEVICE9

Pointer to an IDirect3DDevice9 device that is used to create the output mesh.

pFaceRemap [in, out]

Type: UINT*

Pointer to the original mesh face that was split to generate the current face.

pVertRemap [in, out]

Type: UINT*

Pointer to a destination array containing the three original mesh vertices that are the parents of the current vertex.

pfVertWeights [in, out]

Type: FLOAT*

Pointer to a destination array containing blending factors for the pVertRemap vertices.

ppMesh [out]

Type: LPD3DXMESH*

Pointer to the output ID3DXMesh mesh object.

Return value

Type: HRESULT

If the method succeeds, the return value is S_OK. If the method fails, the following value will be returned.D3DERR_INVALIDCALL

Remarks

pVertRemap and pfVertWeights can be used to interpolate any per-vertex value over the mesh.

Requirements

Requirement Value
Header
D3DX9Mesh.h
Library
D3dx9.lib

See also

ID3DXPRTEngine