UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TMeshAttributeArrayBase< AttributeType > Class Template Reference

#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)
 

Detailed Description

template<typename AttributeType>
class TMeshAttributeArrayBase< AttributeType >

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().

Constructor & Destructor Documentation

◆ TMeshAttributeArrayBase()

template<typename AttributeType >
TMeshAttributeArrayBase< AttributeType >::TMeshAttributeArrayBase ( uint32  InExtent = 1)
inlineexplicit

Member Function Documentation

◆ GetData()

template<typename AttributeType >
const AttributeType * TMeshAttributeArrayBase< AttributeType >::GetData ( ) const
inline

Return base of data

◆ GetElementBase() [1/2]

template<typename AttributeType >
AttributeType * TMeshAttributeArrayBase< AttributeType >::GetElementBase ( const int32  Index)
inline

◆ GetElementBase() [2/2]

template<typename AttributeType >
const AttributeType * TMeshAttributeArrayBase< AttributeType >::GetElementBase ( const int32  Index) const
inline

◆ GetExtent()

template<typename AttributeType >
uint32 TMeshAttributeArrayBase< AttributeType >::GetExtent ( ) const
inline

◆ GetHash() [1/2]

uint32 TMeshAttributeArrayBase< FName >::GetHash ( uint32  Crc) const
inline

◆ GetHash() [2/2]

template<typename AttributeType >
uint32 TMeshAttributeArrayBase< AttributeType >::GetHash ( uint32  Crc = 0) const
inline

◆ Initialize()

template<typename AttributeType >
void TMeshAttributeArrayBase< AttributeType >::Initialize ( const int32  ElementCount,
const AttributeType &  Default 
)
inline

Initializes the array to the given size with the default value

◆ Insert()

template<typename AttributeType >
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.

◆ Num()

template<typename AttributeType >
int32 TMeshAttributeArrayBase< AttributeType >::Num ( ) const
inline

Return size of container

◆ operator[]() [1/2]

template<typename AttributeType >
AttributeType & TMeshAttributeArrayBase< AttributeType >::operator[] ( const int32  Index)
inline

◆ operator[]() [2/2]

template<typename AttributeType >
const AttributeType & TMeshAttributeArrayBase< AttributeType >::operator[] ( const int32  Index) const
inline

Element accessors

◆ Remap()

template<typename AttributeType >
void TMeshAttributeArrayBase< AttributeType >::Remap ( const TSparseArray< int32 > &  IndexRemap,
const AttributeType &  Default 
)

Remaps elements according to the passed remapping table

◆ SetNum()

template<typename AttributeType >
void TMeshAttributeArrayBase< AttributeType >::SetNum ( const int32  ElementCount,
const AttributeType &  Default 
)
inline

◆ SetToDefault()

template<typename AttributeType >
void TMeshAttributeArrayBase< AttributeType >::SetToDefault ( const int32  Index,
const AttributeType &  Default 
)
inline

Fills the index with the default value

Friends And Related Symbol Documentation

◆ operator<< [1/2]

template<typename AttributeType >
template<typename T >
TEnableIf<!TIsBulkSerializable< T >::Value, FArchive >::Type & operator<< ( FArchive Ar,
TMeshAttributeArrayBase< T > &  Array 
)
friend

Custom serialization for TMeshAttributeArrayBase.

◆ operator<< [2/2]

template<typename AttributeType >
template<typename T >
TEnableIf< TIsBulkSerializable< T >::Value, FArchive >::Type & operator<< ( FArchive Ar,
TMeshAttributeArrayBase< T > &  Array 
)
friend

Custom serialization for TMeshAttributeArrayBase.

Member Data Documentation

◆ Container

template<typename AttributeType >
TArray<AttributeType> TMeshAttributeArrayBase< AttributeType >::Container
protected

The actual container, represented by a regular array

◆ Extent

template<typename AttributeType >
uint32 TMeshAttributeArrayBase< AttributeType >::Extent
protected

Number of array elements in this attribute type


The documentation for this class was generated from the following file: