Navigation
API > API/Runtime > API/Runtime/MeshDescription
Inheritance Hierarchy
- FMeshElementContainer
- TMeshElementContainer
References
| Module | MeshDescription |
| Header | /Engine/Source/Runtime/MeshDescription/Public/MeshElementContainer.h |
| Include | #include "MeshElementContainer.h" |
Syntax
class FMeshElementContainer
Remarks
Class representing a collection of mesh elements, such as vertices or triangles. It has two purposes: 1) To generate new element IDs on demand, and recycle those which have been discarded. 2) To hold a map of attributes for a given element type and their values.
Variables
| Type | Name | Description | |
|---|---|---|---|
| FAttributesSetBase | Attributes | Attributes associated with this element container | |
| TBitArray | BitArray | A bit array of all indices currently in use | |
| int32 | NumHoles | A count of the number of unused indices in the bit array. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
FMeshElementContainer
(
const FMeshElementContainer& |
|||
FMeshElementContainer
(
FMeshElementContainer&& Other |
Move constructor which ensures that NumHoles is set correctly in the moved object |
Functions
| Type | Name | Description | |
|---|---|---|---|
| int32 | Add () |
Add a new element at the next available index, and return the new ID | |
| void | Compact
(
TSparseArray< int32 >& OutIndexRemap |
Compacts elements and returns a remapping table | |
| int32 | GetArraySize () |
Returns the index after the last valid element | |
| const FAttributesSetBase & | |||
| FAttributesSetBase & | Accessor for attributes | ||
| FElementIDs | Return iterable proxy object from container | ||
| int32 | Returns the first valid ID | ||
| void | Insert
(
const int32 Index |
Inserts a new element with the given index | |
| bool | IsValid
(
const int32 Index |
Returns whether the given ID is valid or not | |
| int32 | Num () |
Returns the number of elements in the container | |
| void | Remap
(
const TSparseArray< int32 >& IndexRemap |
Remaps elements according to the passed remapping table | |
| void | Remove
(
const int32 Index |
Removes the element with the given ID | |
| void | Reserve
(
const int32 Elements |
Reserves space for the specified total number of elements | |
| void | Reset
(
const int32 Elements |
Resets the container, optionally reserving space for elements to be added |
Operators
| Type | Name | Description | |
|---|---|---|---|
| FMeshElementContainer & | operator=
(
FMeshElementContainer&& Other |
Move assignment operator which ensures that NumHoles is set correctly in the moved object | |
| FMeshElementContainer & | operator=
(
const FMeshElementContainer& |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FElementIDs | This is a special type of iterator which returns successive IDs of valid elements, rather than the elements themselves. |