-
Notifications
You must be signed in to change notification settings - Fork 151
ComputeSubsets
Chuck Walbourn edited this page Jan 21, 2022
·
3 revisions
DirectXMesh |
---|
Returns a list of face offsets and counts based on the input attributes id array.
std::vector<std::pair<size_t,size_t>> ComputeSubsets(
const uint32_t* attributes, size_t nFaces );
The result is a std::vector
of value pairs (as a std::pair<size_t,size_t>
) where each first value is the offset in the faces array for the start of the attribute subset, and second is the number of faces in that attribute subset.
For a sorted attribute array, it returns a minimum length list of subsets which covers all faces.
uint32_t cubeAttributes[ 12 ] = { 0, 0, 1, 1, 2, 2, 3, 3, 3, 3, 5, 5 };
auto subsets = ComputeSubsets( cubeAttributes, 12 );
// subsets contains 5 pairs: <0, 2>, <2, 2>, <4, 2>, <6, 4>, <10, 2>
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
DirectX Tool Kit for DirectX 11