Navigation
API > API/Runtime > API/Runtime/MeshDescription
This defines the container used to hold mesh element attributes of a particular name and index. It is a simple TArray, so that all attributes are packed contiguously for each element ID.
Note that the container may grow arbitrarily as new elements are inserted, but it will never be shrunk as elements are removed. The only operations that will shrink the container are Initialize() and Remap().
| Name | TMeshAttributeArrayBase |
| Type | class |
| Header File | /Engine/Source/Runtime/MeshDescription/Public/MeshAttributeArray.h |
| Include Path | #include "MeshAttributeArray.h" |
Syntax
template<typename AttributeType>
class TMeshAttributeArrayBase
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TMeshAttributeArrayBase
(
uint32 InExtent |
MeshAttributeArray.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
const AttributeType * GetData() |
Return base of data | MeshAttributeArray.h | |
const AttributeType * GetElementBase
(
const int32 Index |
MeshAttributeArray.h | ||
AttributeType * GetElementBase
(
const int32 Index |
MeshAttributeArray.h | ||
uint32 GetExtent() |
MeshAttributeArray.h | ||
uint32 GetHash
(
uint32 Crc |
MeshAttributeArray.h | ||
uint32 GetHash
(
uint32 Crc |
We have to manually implement this or else the default behavior will just hash FName ComparisonIndex and Number, which aren't deterministic | MeshAttributeArray.h | |
void Initialize
(
const int32 ElementCount, |
Initializes the array to the given size with the default value | MeshAttributeArray.h | |
void Insert
(
const int32 Index, |
Expands the array if necessary so that the passed element index is valid. | MeshAttributeArray.h | |
int32 Num() |
Return size of container | MeshAttributeArray.h | |
void Remap
(
const TSparseArray< int32 >& IndexRemap, |
Remaps elements according to the passed remapping table | MeshAttributeArray.h | |
void SetNum
(
const int32 ElementCount, |
MeshAttributeArray.h | ||
void SetToDefault
(
const int32 Index, |
Fills the index with the default value | MeshAttributeArray.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
const AttributeType & operator[]
(
const int32 Index |
Element accessors | MeshAttributeArray.h | |
AttributeType & operator[]
(
const int32 Index |
MeshAttributeArray.h |