-
Notifications
You must be signed in to change notification settings - Fork 148
UVAtlasPartition
Chuck Walbourn edited this page Jan 21, 2022
·
4 revisions
UVAtlas |
---|
Create a UV atlas for a mesh, which is then followed by a call to UVAtlasPack.
HRESULT UVAtlasPartition(
const XMFLOAT3* positions, size_t nVerts,
const void* indices, DXGI_FORMAT indexFormat, size_t nFaces,
size_t maxChartNumber, float maxStretch,
const uint32_t *adjacency, const uint32_t *falseEdgeAdjacency,
const float *pIMTArray,
std::function<HRESULT(float percentComplete)> statusCallBack,
float callbackFrequency,
UVATLAS options,
std::vector<UVAtlasVertex>& vMeshOutVertexBuffer,
std::vector<uint8_t>& vMeshOutIndexBuffer,
std::vector<uint32_t>* pvFacePartitioning,
std::vector<uint32_t>* pvVertexRemapArray,
std::vector<uint32_t>& vPartitionResultAdjacency,
float *maxStretchOut = nullptr, size_t *numChartsOut = nullptr);
See UVAtlasCreate which details the majority of the parameters to this function.
vPartitionResultAdjacency: Contains three values per face. This is used as input to the UVAtlasPack.
UVAtlas can partition mesh geometry two ways:
- Based on the number of charts
- Based on the maximum allowed stretch. If the maximum allowed stretch is 0, each triangle will likely be in its own chart
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 opencode@microsoft.com with any additional questions or comments.
- Universal Windows Platform apps
- Windows desktop apps
- Windows 11
- Windows 10
- Windows 8.1
- Windows 7 Service Pack 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