UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TMeshElementArray< ElementType, ElementIDType > Class Template Referencefinal

#include <MeshElementArray.h>

+ Inheritance diagram for TMeshElementArray< ElementType, ElementIDType >:

Classes

class  TElementIDs
 

Public Member Functions

void Reset (const int32 Elements=0)
 
void Reserve (const int32 Elements)
 
ElementIDType Add ()
 
ElementIDType Add (typename TTypeTraits< ElementType >::ConstInitType Element)
 
ElementIDType Add (ElementType &&Element)
 
ElementType & Insert (const ElementIDType ID)
 
ElementType & Insert (const ElementIDType ID, typename TTypeTraits< ElementType >::ConstInitType Element)
 
ElementType & Insert (const ElementIDType ID, ElementType &&Element)
 
void Remove (const ElementIDType ID)
 
ElementType & operator[] (const ElementIDType ID)
 
const ElementType & operator[] (const ElementIDType ID) const
 
int32 Num () const
 
int32 GetArraySize () const
 
ElementIDType GetFirstValidID () const
 
bool IsValid (const ElementIDType ID) const
 
TElementIDs GetElementIDs () const
 
- Public Member Functions inherited from TMeshElementArrayBase< ElementType >
void Compact (TSparseArray< int32 > &OutIndexRemap)
 
void Remap (const TSparseArray< int32 > &IndexRemap)
 

Friends

FArchiveoperator<< (FArchive &Ar, TMeshElementArray &Array)
 

Additional Inherited Members

- Protected Attributes inherited from TMeshElementArrayBase< ElementType >
TSparseArray< ElementType > Container
 

Detailed Description

template<typename ElementType, typename ElementIDType>
class TMeshElementArray< ElementType, ElementIDType >

We prefer to access elements of the container via strongly-typed IDs. This derived class imposes this type safety.

Member Function Documentation

◆ Add() [1/3]

template<typename ElementType , typename ElementIDType >
ElementIDType TMeshElementArray< ElementType, ElementIDType >::Add ( )
inline

Add a new element at the next available index, and return the new ID

◆ Add() [2/3]

template<typename ElementType , typename ElementIDType >
ElementIDType TMeshElementArray< ElementType, ElementIDType >::Add ( ElementType &&  Element)
inline

Add the provided element at the next available index, and return the ID

◆ Add() [3/3]

template<typename ElementType , typename ElementIDType >
ElementIDType TMeshElementArray< ElementType, ElementIDType >::Add ( typename TTypeTraits< ElementType >::ConstInitType  Element)
inline

Add the provided element at the next available index, and return the new ID

◆ GetArraySize()

template<typename ElementType , typename ElementIDType >
int32 TMeshElementArray< ElementType, ElementIDType >::GetArraySize ( ) const
inline

Returns the index after the last valid element

◆ GetElementIDs()

template<typename ElementType , typename ElementIDType >
TElementIDs TMeshElementArray< ElementType, ElementIDType >::GetElementIDs ( ) const
inline

Return iterable proxy object from container

◆ GetFirstValidID()

template<typename ElementType , typename ElementIDType >
ElementIDType TMeshElementArray< ElementType, ElementIDType >::GetFirstValidID ( ) const
inline

Returns the first valid ID

◆ Insert() [1/3]

template<typename ElementType , typename ElementIDType >
ElementType & TMeshElementArray< ElementType, ElementIDType >::Insert ( const ElementIDType  ID)
inline

Inserts a new element with the given ID

◆ Insert() [2/3]

template<typename ElementType , typename ElementIDType >
ElementType & TMeshElementArray< ElementType, ElementIDType >::Insert ( const ElementIDType  ID,
ElementType &&  Element 
)
inline

Inserts the provided element with the given ID

◆ Insert() [3/3]

template<typename ElementType , typename ElementIDType >
ElementType & TMeshElementArray< ElementType, ElementIDType >::Insert ( const ElementIDType  ID,
typename TTypeTraits< ElementType >::ConstInitType  Element 
)
inline

Inserts the provided element with the given ID

◆ IsValid()

template<typename ElementType , typename ElementIDType >
bool TMeshElementArray< ElementType, ElementIDType >::IsValid ( const ElementIDType  ID) const
inline

Returns whether the given ID is valid or not

◆ Num()

template<typename ElementType , typename ElementIDType >
int32 TMeshElementArray< ElementType, ElementIDType >::Num ( ) const
inline

Returns the number of elements in the container

◆ operator[]() [1/2]

template<typename ElementType , typename ElementIDType >
ElementType & TMeshElementArray< ElementType, ElementIDType >::operator[] ( const ElementIDType  ID)
inline

Returns the element with the given ID

◆ operator[]() [2/2]

template<typename ElementType , typename ElementIDType >
const ElementType & TMeshElementArray< ElementType, ElementIDType >::operator[] ( const ElementIDType  ID) const
inline

◆ Remove()

template<typename ElementType , typename ElementIDType >
void TMeshElementArray< ElementType, ElementIDType >::Remove ( const ElementIDType  ID)
inline

Removes the element with the given ID

◆ Reserve()

template<typename ElementType , typename ElementIDType >
void TMeshElementArray< ElementType, ElementIDType >::Reserve ( const int32  Elements)
inline

Reserves space for the specified total number of elements

◆ Reset()

template<typename ElementType , typename ElementIDType >
void TMeshElementArray< ElementType, ElementIDType >::Reset ( const int32  Elements = 0)
inline

Resets the container, optionally reserving space for elements to be added

Friends And Related Symbol Documentation

◆ operator<<

template<typename ElementType , typename ElementIDType >
FArchive & operator<< ( FArchive Ar,
TMeshElementArray< ElementType, ElementIDType > &  Array 
)
friend

Serializer


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