![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <MeshAttributeArray.h>
Public Member Functions | |
| TMeshAttributeArrayBase (uint32 InExtent=1) | |
| int32 | Num () const |
| const AttributeType * | GetData () const |
| void | Initialize (const int32 ElementCount, const AttributeType &Default) |
| void | SetNum (const int32 ElementCount, const AttributeType &Default) |
| uint32 | GetHash (uint32 Crc=0) const |
| void | Insert (const int32 Index, const AttributeType &Default) |
| void | SetToDefault (const int32 Index, const AttributeType &Default) |
| void | Remap (const TSparseArray< int32 > &IndexRemap, const AttributeType &Default) |
| const AttributeType & | operator[] (const int32 Index) const |
| AttributeType & | operator[] (const int32 Index) |
| const AttributeType * | GetElementBase (const int32 Index) const |
| AttributeType * | GetElementBase (const int32 Index) |
| uint32 | GetExtent () const |
| uint32 | GetHash (uint32 Crc) const |
Protected Attributes | |
| TArray< AttributeType > | Container |
| uint32 | Extent |
Friends | |
| template<typename T > | |
| TEnableIf<!TIsBulkSerializable< T >::Value, FArchive >::Type & | operator<< (FArchive &Ar, TMeshAttributeArrayBase< T > &Array) |
| template<typename T > | |
| TEnableIf< TIsBulkSerializable< T >::Value, FArchive >::Type & | operator<< (FArchive &Ar, TMeshAttributeArrayBase< T > &Array) |
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().
|
inlineexplicit |
|
inline |
Return base of data
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Initializes the array to the given size with the default value
| void TMeshAttributeArrayBase< AttributeType >::Insert | ( | const int32 | Index, |
| const AttributeType & | Default | ||
| ) |
Expands the array if necessary so that the passed element index is valid. Newly created elements will be assigned the default value.
|
inline |
Return size of container
|
inline |
|
inline |
Element accessors
| void TMeshAttributeArrayBase< AttributeType >::Remap | ( | const TSparseArray< int32 > & | IndexRemap, |
| const AttributeType & | Default | ||
| ) |
Remaps elements according to the passed remapping table
|
inline |
|
inline |
Fills the index with the default value
|
friend |
Custom serialization for TMeshAttributeArrayBase.
|
friend |
Custom serialization for TMeshAttributeArrayBase.
|
protected |
The actual container, represented by a regular array
|
protected |
Number of array elements in this attribute type