This project has moved and is read-only. For the latest updates, please go here.
Calculate per-triangle IMT's from from per-vertex data, to be used as input to UVAtlasCreate or UVAtlasPartition. This function allows you to calculate the IMT based off of any value in a mesh (color, normal, etc).

HRESULT UVAtlasComputeIMTFromPerVertexSignal(
    _In_reads_(nVerts) const XMFLOAT3* positions, _In_ size_t nVerts,
    _When_(indexFormat == DXGI_FORMAT_R16_UINT,
    _When_(indexFormat != DXGI_FORMAT_R16_UINT,
        _In_reads_bytes_(nFaces*sizeof(uint32_t))) const void* indices,
    _In_ DXGI_FORMAT indexFormat, _In_ size_t nFaces,
    _In_reads_(signalStride*nVerts) const float *pVertexSignal,
    _In_ size_t signalDimension, _In_ size_t signalStride,
    _In_opt_ std::function<HRESULT(float percentComplete)> statusCallBack,
    _Out_writes_(nFaces * 3) float* pIMTArray);


pVertexSignal: A float array of size signalStride * nVerts.

signalDimension: How many floats per vertex to use in calculating the IMT.

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

pIMTArray: The resulting IMT data which is passed to UVAtlasCreate or UVAtlasPack which is an array of 3 float values per face.

Last edited Oct 31, 2014 at 7:39 PM by walbourn, version 8