D3DXComputeIMTFromPerVertexSignal function

Calculate per-triangle IMT's from per-vertex data. This function allows you to calculate the IMT based off of any value in a mesh (color, normal, etc).

Syntax

HRESULT D3DXComputeIMTFromPerVertexSignal(
  _In_        LPD3DXMESH      pMesh,
  _In_  const FLOAT           *pfVertexSignal,
  _In_        UINT            uSignalDimension,
  _In_        UINT            uSignalStride,
  _In_        DWORD           dwOptions,
              LPD3DXUVATLASCB pStatusCallback,
              LPVOID          pUserContext,
  _Out_       LPD3DXBUFFER    *ppIMTData
);

Parameters

pMesh [in]

Type: LPD3DXMESH

A pointer to an input mesh (see ID3DXMesh) which contains the object geometry for calculating the IMT.

pfVertexSignal [in]

Type: const FLOAT*

A pointer to an array of per-vertex data from which IMT will be computed. The array size is uSignalStride * v, where v is the number of vertices in the mesh.

uSignalDimension [in]

Type: UINT

The number of floats per vertex.

uSignalStride [in]

Type: UINT

The number of bytes per vertex in the array. This must be a multiple of sizeof(float)

dwOptions [in]

Type: DWORD

Texture wrap options. This is a combination of one or more D3DXIMT FLAGS.

pStatusCallback

Type: LPD3DXUVATLASCB

A pointer to a callback function to monitor IMT computation progress.

pUserContext

Type: LPVOID

A pointer to a user-defined variable which is passed to the status callback function. Typically used by an application to pass a pointer to a data structure that provides context information for the callback function.

ppIMTData [out]

Type: LPD3DXBUFFER*

A pointer to the buffer (see ID3DXBuffer) containing the returned IMT array. This array can be provided as input to the D3DX UVAtlas Functions to prioritize texture-space allocation in the texture parameterization.

Return value

Type: HRESULT

If the function succeeds, the return value is D3D_OK; otherwise, the value is D3DERR_INVALIDCALL.

Requirements

Requirement Value
Header
D3DX9Mesh.h
Library
D3dx9.lib

See also

UVAtlas Functions

Using UVAtlas (Direct3D 9)