Navigation
Unreal Engine C++ API Reference > Runtime > MeshDescription
References
Module | MeshDescription |
Header | /Engine/Source/Runtime/MeshDescription/Public/MeshAttributeArray.h |
Include | #include "MeshAttributeArray.h" |
Syntax
template<typename AttributeType>
class TMeshAttributeArrayBase
Remarks
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().
Variables
Type | Name | Description | |
---|---|---|---|
![]() |
TArray< AttributeType > | Container | The actual container, represented by a regular array |
![]() |
uint32 | Extent | Number of array elements in this attribute type |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
TMeshAttributeArrayBase
(
uint32 InExtent |
Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
const AttributeType * | GetData () |
Return base of data |
![]() ![]() |
const AttributeType * | GetElementBase
(
const int32 Index |
|
![]() |
AttributeType * | GetElementBase
(
const int32 Index |
|
![]() ![]() |
uint32 | GetExtent () |
|
![]() ![]() |
uint32 | ||
![]() ![]() |
uint32 | We have to manually implement this or else the default behavior will just hash FName ComparisonIndex and Number, which aren't deterministic | |
![]() |
void | Initialize
(
const int32 ElementCount, |
Initializes the array to the given size with the default value |
![]() |
void | Expands the array if necessary so that the passed element index is valid. | |
![]() ![]() |
int32 | Num () |
Return size of container |
![]() |
void | Remap
(
const TSparseArray< int32 >& IndexRemap, |
Remaps elements according to the passed remapping table |
![]() |
void | ||
![]() |
void | SetToDefault
(
const int32 Index, |
Fills the index with the default value |
Operators
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
const AttributeType & | operator[]
(
const int32 Index |
Element accessors |
![]() |
AttributeType & | operator[]
(
const int32 Index |