-
Notifications
You must be signed in to change notification settings - Fork 151
UVAtlasComputeIMTFromSignal
UVAtlas |
---|
Calculates per-triangle IMT's from a custom application-specified signal that varies over the surface of the mesh (generally at a higher frequency than vertex data), to be used as input to UVAtlasCreate or UVAtlasPartition. The signal is evaluated via a user-specified callback function.
HRESULT UVAtlasComputeIMTFromSignal(
const XMFLOAT3* positions, const XMFLOAT2* texcoords, size_t nVerts,
const void* indices, DXGI_FORMAT indexFormat, size_t nFaces,
size_t signalDimension, float maxUVDistance,
std::function <HRESULT(const DirectX::XMFLOAT2 *uv, size_t primitiveID,
size_t signalDimension, void* userData, float* signalOut)> signalCallback,
void *userData,
std::function<HRESULT(float percentComplete)> statusCallBack,
float* pIMTArray);
signalDimension: How many floats per vertex to use in calculating the IMT.
maxUVDistance: The subdivision will continue until the distance between all vertices is at most this value.
signalCallback: Callback to use to get the signal. It is given the uv coordinates of a vertex, a face id, the number of floats to generate, and an optional userData pointer.
pIMTArray: The resulting IMT data which is passed to UVAtlasCreate or UVAtlasPack which is an array of 3 float values per face.
This function requires that the input mesh contain a signal-to-mesh texture mapping (i.e.. texture coordinates). It allows the user to define a signal arbitrarily over the surface of the mesh.
All content and source code for this package are subject to the terms of the MIT License.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.
- Universal Windows Platform apps
- Windows desktop apps
- Windows 11
- Windows 10
- Windows 8.1
- Xbox One
- Xbox Series X|S
- Windows Subsystem for Linux
- x86
- x64
- ARM64
- Visual Studio 2022
- Visual Studio 2019 (16.11)
- clang/LLVM v12 - v18
- GCC 10.5, 11.4, 12.3
- MinGW 12.2, 13.2
- CMake 3.20