![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <UniqueIndexSet.h>
Public Member Functions | |
| GEOMETRYCORE_API | ~FUniqueIndexSet () |
| void | Initialize (int32 MaxIndexIn, int32 MaxValuesHint=0) |
| const int32 | Num () const |
| const TArray< int32 > & | Indices () const |
| bool | Add (int32 Index) |
| bool | Contains (int32 Index) const |
| template<typename ArrayType > | |
| void | Collect (ArrayType &Storage) const |
| TArray< int32 > && | TakeValues () |
| void | SwapValuesWith (TArray< int32 > &OtherArray) |
| TArray< int32 >::RangedForConstIteratorType | begin () const |
| TArray< int32 >::RangedForConstIteratorType | end () const |
Protected Attributes | |
| int32 | MaxIndex |
| TArray< int32 > | Values |
| int64 * | Bits = nullptr |
| int32 | NumWords = 0 |
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.
| FUniqueIndexSet::~FUniqueIndexSet | ( | ) |
|
inline |
Add the members of the current index set to an object that supports .Reserve(int) and .Add(int)
Initialize the set with maximum index.
| MaxValuesHint | if non-zero, we pre-allocate this much memory for the index array |
|
inline |
Swap the internal TArray with another TArray. After calling this, the set is invalid and needs to be Initialize()'d again
|
protected |
|
protected |
|
protected |