ID3DXTextureGutterHelper::GetBaryMap method

Retrieves texel barycentric coordinates.

Syntax

HRESULT GetBaryMap(
  [in, out] D3DXVECTOR2 *pBaryData
);

Parameters

pBaryData [in, out]

Type: D3DXVECTOR2*

Pointer to a D3DXVECTOR2 structure that contains the first two barycentric coordinates of each texel.

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

The third barycentric coordinate is given by:

    1 - ( pBaryData.x + pBaryData.y )

Barycentric coordinates are always specified with respect to the triangle returned by ID3DXTextureGutterHelper::GetFaceMap.

The barycentric coordinates returned by this method are valid only for valid (non-class 0) texels. ID3DXTextureGutterHelper::GetGutterMap will return nonzero values for valid texels.

Class 2 texels are mapped to the nearest point on the triangle in texel space.

The application must allocate and manage pBaryData.

Barycentric coordinates define a point inside a triangle in terms of the triangle's vertices. For a more in-depth description of barycentric coordinates, see Mathworld's Barycentric Coordinates Description.

Requirements

Requirement Value
Header
D3DX9Mesh.h
Library
D3dx9.lib

See also

ID3DXTextureGutterHelper