Navigation
API > API/Runtime > API/Runtime/GeometryCore
FUniqueIndexSet is used to construct a list of unique elements of integers in range [0, MaxValue]. General usage is for things like converting a vertex set to the set of connected one-ring triangles. The approach is to have a bit-array for set membership, and then accumulate unique entries in a TArray.
This is faster for construction than a TSet, but does require allocating and/or clearing the bit-array. Still generally quite a bit more efficient, particularly for large sets.
| Name | FUniqueIndexSet |
| Type | class |
| Header File | /Engine/Source/Runtime/GeometryCore/Public/Util/UniqueIndexSet.h |
| Include Path | #include "Util/UniqueIndexSet.h" |
Syntax
class FUniqueIndexSet
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FUniqueIndexSet() |
TODO: second bit set that tracks which blocks of ints have been set. | Util/UniqueIndexSet.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool Add
(
int32 Index |
Add Index to the set | Util/UniqueIndexSet.h | |
TArray< int32 >::RangedForConstIteratorType begin() |
Range-for support. Do not directly call these functions. | Util/UniqueIndexSet.h | |
void Collect
(
ArrayType& Storage |
Add the members of the current index set to an object that supports .Reserve(int) and .Add(int) | Util/UniqueIndexSet.h | |
bool Contains
(
int32 Index |
Util/UniqueIndexSet.h | ||
TArray< int32 >::RangedForConstIteratorType end() |
Util/UniqueIndexSet.h | ||
const TArray< int32 > & Indices() |
Util/UniqueIndexSet.h | ||
void Initialize
(
int32 MaxIndexIn, |
Initialize the set with maximum index. | Util/UniqueIndexSet.h | |
const int32 Num() |
Util/UniqueIndexSet.h | ||
void SwapValuesWith
(
TArray< int32 >& OtherArray |
Swap the internal TArray with another TArray. | Util/UniqueIndexSet.h | |
TArray< int32 > && TakeValues() |
Util/UniqueIndexSet.h |