Navigation
API > API/Runtime > API/Runtime/MeshDescription > API/Runtime/MeshDescription/FMeshElementIndexer
We are modelling a one-to-many relationship, where a single key yields multiple indices, e.g. obtaining all the vertex instances which reference a given vertex ID (the key).
We consolidate the data into chunks, each representing a set number of keys. This provides a balance between the number of separate allocations, and the cost of inserting a new value at a key.
| Name | FChunk |
| Type | struct |
| Header File | /Engine/Source/Runtime/MeshDescription/Public/MeshElementIndexer.h |
| Include Path | #include "MeshElementIndexer.h" |
Syntax
struct FChunk
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FChunk
(
int32 InitialSize, |
MeshElementIndexer.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Count | TArray< int32, TInlineAllocator< 1 > > | MeshElementIndexer.h | ||
| Data | TArray< int32 > | All the data for this chunk | MeshElementIndexer.h | |
| MaxCount | TArray< int32, TInlineAllocator< 1 > > | MeshElementIndexer.h | ||
| StartIndex | TArray< int32, TInlineAllocator< 1 > > | This is how we determine the location and size of a given key's data in the consolidated data. | MeshElementIndexer.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool Add
(
int32 Index, |
Add a value to the chunk at the given index | MeshElementIndexer.h | |
bool AddUnsorted
(
int32 Index, |
Add a value to the chunk at the given index, without inserting it in sorted order | MeshElementIndexer.h | |
bool Contains
(
int32 Index, |
Determine whether a value exists at the given index | MeshElementIndexer.h | |
TArrayView< const int32 > Get
(
int32 Index |
Get the range of data corresponding to this element | MeshElementIndexer.h | |
TArrayView< const ElementIDType > Get
(
int32 Index |
MeshElementIndexer.h | ||
bool Remove
(
int32 Index, |
Remove a value from the chunk at the given index | MeshElementIndexer.h | |
void Sort
(
int32 Index |
Sort values at the given index | MeshElementIndexer.h |