UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FMeshElementContainer Class Reference

#include <MeshElementContainer.h>

+ Inheritance diagram for FMeshElementContainer:

Classes

class  FElementIDs
 

Public Member Functions

 FMeshElementContainer ()=default
 
 FMeshElementContainer (const FMeshElementContainer &)=default
 
FMeshElementContaineroperator= (const FMeshElementContainer &)=default
 
 FMeshElementContainer (FMeshElementContainer &&Other)
 
FMeshElementContaineroperator= (FMeshElementContainer &&Other)
 
void Reset (const int32 Elements=0)
 
void Reserve (const int32 Elements)
 
int32 Add ()
 
void Insert (const int32 Index)
 
void Remove (const int32 Index)
 
int32 Num () const
 
int32 GetArraySize () const
 
int32 GetFirstValidID () const
 
bool IsValid (const int32 Index) const
 
FAttributesSetBaseGetAttributes ()
 
const FAttributesSetBaseGetAttributes () const
 
MESHDESCRIPTION_API void Compact (TSparseArray< int32 > &OutIndexRemap)
 
MESHDESCRIPTION_API void Remap (const TSparseArray< int32 > &IndexRemap)
 
FElementIDs GetElementIDs () const
 

Protected Attributes

TBitArray BitArray
 
FAttributesSetBase Attributes
 
int32 NumHoles = 0
 

Friends

FArchiveoperator<< (FArchive &Ar, FMeshElementContainer &Container)
 

Detailed Description

Class representing a collection of mesh elements, such as vertices or triangles. It has two purposes: 1) To generate new element IDs on demand, and recycle those which have been discarded. 2) To hold a map of attributes for a given element type and their values.

Constructor & Destructor Documentation

◆ FMeshElementContainer() [1/3]

FMeshElementContainer::FMeshElementContainer ( )
default

◆ FMeshElementContainer() [2/3]

FMeshElementContainer::FMeshElementContainer ( const FMeshElementContainer )
default

◆ FMeshElementContainer() [3/3]

FMeshElementContainer::FMeshElementContainer ( FMeshElementContainer &&  Other)
inline

Move constructor which ensures that NumHoles is set correctly in the moved object

Member Function Documentation

◆ Add()

int32 FMeshElementContainer::Add ( )
inline

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

◆ Compact()

void FMeshElementContainer::Compact ( TSparseArray< int32 > &  OutIndexRemap)

Compacts elements and returns a remapping table

◆ GetArraySize()

int32 FMeshElementContainer::GetArraySize ( ) const
inline

Returns the index after the last valid element

◆ GetAttributes() [1/2]

FAttributesSetBase & FMeshElementContainer::GetAttributes ( )
inline

Accessor for attributes

◆ GetAttributes() [2/2]

const FAttributesSetBase & FMeshElementContainer::GetAttributes ( ) const
inline

◆ GetElementIDs()

FElementIDs FMeshElementContainer::GetElementIDs ( ) const
inline

Return iterable proxy object from container

◆ GetFirstValidID()

int32 FMeshElementContainer::GetFirstValidID ( ) const
inline

Returns the first valid ID

◆ Insert()

void FMeshElementContainer::Insert ( const int32  Index)
inline

Inserts a new element with the given index

◆ IsValid()

bool FMeshElementContainer::IsValid ( const int32  Index) const
inline

Returns whether the given ID is valid or not

◆ Num()

int32 FMeshElementContainer::Num ( ) const
inline

Returns the number of elements in the container

◆ operator=() [1/2]

FMeshElementContainer & FMeshElementContainer::operator= ( const FMeshElementContainer )
default

◆ operator=() [2/2]

FMeshElementContainer & FMeshElementContainer::operator= ( FMeshElementContainer &&  Other)
inline

Move assignment operator which ensures that NumHoles is set correctly in the moved object

◆ Remap()

void FMeshElementContainer::Remap ( const TSparseArray< int32 > &  IndexRemap)

Remaps elements according to the passed remapping table

◆ Remove()

void FMeshElementContainer::Remove ( const int32  Index)
inline

Removes the element with the given ID

◆ Reserve()

void FMeshElementContainer::Reserve ( const int32  Elements)
inline

Reserves space for the specified total number of elements

◆ Reset()

void FMeshElementContainer::Reset ( const int32  Elements = 0)
inline

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

Friends And Related Symbol Documentation

◆ operator<<

FArchive & operator<< ( FArchive Ar,
FMeshElementContainer Container 
)
friend

Serializer

Member Data Documentation

◆ Attributes

FAttributesSetBase FMeshElementContainer::Attributes
protected

Attributes associated with this element container

◆ BitArray

TBitArray FMeshElementContainer::BitArray
protected

A bit array of all indices currently in use

◆ NumHoles

int32 FMeshElementContainer::NumHoles = 0
protected

A count of the number of unused indices in the bit array. IMPORTANT: This must always correspond to the number of zeroes in the BitArray.


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