Navigation
API > API/Runtime > API/Runtime/GeometryCore > API/Runtime/GeometryCore/Util
References
| Module | GeometryCore |
| Header | /Engine/Source/Runtime/GeometryCore/Public/Util/UniqueIndexSet.h |
| Include | #include "Util/UniqueIndexSet.h" |
Syntax
class FUniqueIndexSet
Remarks
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.
Variables
| Type | Name | Description | |
|---|---|---|---|
| int64 * | Bits | ||
| int32 | MaxIndex | ||
| int32 | NumWords | ||
| TArray< int32 > | Values |
Destructors
| Type | Name | Description | |
|---|---|---|---|
| TODO: second bit set that tracks which blocks of ints have been set. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| bool | Add
(
int32 Index |
Add Index to the set | |
| TArray< int32 >::RangedForConstIteratorType | begin () |
Range-for support. Do not directly call these functions. | |
| void | Collect
(
ArrayType& Storage |
Add the members of the current index set to an object that supports .Reserve(int) and .Add(int) | |
| bool | Contains
(
int32 Index |
||
| TArray< int32 >::RangedForConstIteratorType | end () |
||
| const TArray< int32 > & | Indices () |
||
| void | Initialize
(
int32 MaxIndexIn, |
Initialize the set with maximum index. | |
| const int32 | Num () |
||
| void | SwapValuesWith
(
TArray< int32 >& OtherArray |
Swap the internal TArray with another TArray. | |
| TArray< int32 > && | TakeValues () |