UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
Chaos::Facades::FCollectionHierarchyFacade Class Reference

#include <CollectionHierarchyFacade.h>

Public Types

enum class  EPersistencePolicy : uint8 { KeepExistingPersistence , MustBePersistent }
 

Public Member Functions

CHAOS_API FCollectionHierarchyFacade (FManagedArrayCollection &InCollection)
 
CHAOS_API FCollectionHierarchyFacade (const FManagedArrayCollection &InCollection)
 
void DefineSchema ()
 
CHAOS_API bool IsValid () const
 
bool IsConst () const
 
CHAOS_API bool HasLevelAttribute () const
 
CHAOS_API bool IsLevelAttributePersistent () const
 
CHAOS_API int32 GetRootIndex () const
 
CHAOS_API TArray< int32GetRootIndices () const
 
CHAOS_API TArray< int32GetChildrenAsArray (int32 TransformIndex) const
 
CHAOS_API const TSet< int32 > * FindChildren (int32 TransformIndex) const
 
CHAOS_API int32 GetParent (int32 TransformIndex) const
 
CHAOS_API void EnumerateChildTransforms (int32 TransformIndex, TFunctionRef< bool(int32)> ShouldProcess, TFunctionRef< void(int32)> ProcessTransformFunc) const
 
CHAOS_API int32 GetInitialLevel (int32 TransformIndex) const
 
CHAOS_API void GenerateLevelAttribute ()
 
CHAOS_API TArray< int32GetTransformArrayInDepthFirstOrder () const
 
CHAOS_API TArray< int32ComputeTransformIndicesInDepthFirstOrder () const
 
CHAOS_API TArray< int32ComputeTransformIndicesInBreadthFirstOrder () const
 
CHAOS_API void GenerateBreadthFirstOrderIndicesAttribute ()
 
CHAOS_API const TArray< int32 > & GetBreadthFirstOrderIndicesFromAttribute () const
 

Static Public Member Functions

static CHAOS_API TArray< int32GetRootIndices (const TManagedArrayAccessor< int32 > &ParentAttribute)
 

Detailed Description

Provides an API to read and manipulate hierarchy in a managed array collection

Member Enumeration Documentation

◆ EPersistencePolicy

Enumerator
KeepExistingPersistence 
MustBePersistent 

Constructor & Destructor Documentation

◆ FCollectionHierarchyFacade() [1/2]

Chaos::Facades::FCollectionHierarchyFacade::FCollectionHierarchyFacade ( FManagedArrayCollection InCollection)

◆ FCollectionHierarchyFacade() [2/2]

Chaos::Facades::FCollectionHierarchyFacade::FCollectionHierarchyFacade ( const FManagedArrayCollection InCollection)

Member Function Documentation

◆ ComputeTransformIndicesInBreadthFirstOrder()

TArray< int32 > Chaos::Facades::FCollectionHierarchyFacade::ComputeTransformIndicesInBreadthFirstOrder ( ) const

compute transform indices in a breadth first order ( root to leaves )

◆ ComputeTransformIndicesInDepthFirstOrder()

TArray< int32 > Chaos::Facades::FCollectionHierarchyFacade::ComputeTransformIndicesInDepthFirstOrder ( ) const

compute transform indices in a depth first order

◆ DefineSchema()

void Chaos::Facades::FCollectionHierarchyFacade::DefineSchema ( )
inline

Create the facade attributes.

◆ EnumerateChildTransforms()

void Chaos::Facades::FCollectionHierarchyFacade::EnumerateChildTransforms ( int32  TransformIndex,
TFunctionRef< bool(int32)>  ShouldProcess,
TFunctionRef< void(int32)>  ProcessTransformFunc 
) const

Enumerate transforms at or under TransformIndex where ShouldProcess returns true, stopping recursion and calling ProcessTransformFunc on such transforms.

◆ FindChildren()

const TSet< int32 > * Chaos::Facades::FCollectionHierarchyFacade::FindChildren ( int32  TransformIndex) const

Get set of children from a transform index, or nullptr if not available

◆ GenerateBreadthFirstOrderIndicesAttribute()

CHAOS_API void Chaos::Facades::FCollectionHierarchyFacade::GenerateBreadthFirstOrderIndicesAttribute ( )

generate a non serialize array that stores the indices of the transforms in a breath first order

◆ GenerateLevelAttribute()

void Chaos::Facades::FCollectionHierarchyFacade::GenerateLevelAttribute ( )

Update level attribute for all elements (and create it if it is missing ) @Param PersistencePolicy whether to make the attribute persistent or keep the existing state

◆ GetBreadthFirstOrderIndicesFromAttribute()

CHAOS_API const TArray< int32 > & Chaos::Facades::FCollectionHierarchyFacade::GetBreadthFirstOrderIndicesFromAttribute ( ) const

get the breadth first ordered transform indices from the stored attribute if any may return empty array if the attribute does not exists

◆ GetChildrenAsArray()

TArray< int32 > Chaos::Facades::FCollectionHierarchyFacade::GetChildrenAsArray ( int32  TransformIndex) const

Get direct children from a specific transform index. Assumes parent attribute is valid.

◆ GetInitialLevel()

int32 Chaos::Facades::FCollectionHierarchyFacade::GetInitialLevel ( int32  TransformIndex) const

Get initial level of a specific transform index If the attribute is missing return INDEX_NONE

◆ GetParent()

int32 Chaos::Facades::FCollectionHierarchyFacade::GetParent ( int32  TransformIndex) const

Get parent of a specific transform index

◆ GetRootIndex()

int32 Chaos::Facades::FCollectionHierarchyFacade::GetRootIndex ( ) const

Get the root index

◆ GetRootIndices() [1/2]

TArray< int32 > Chaos::Facades::FCollectionHierarchyFacade::GetRootIndices ( ) const

Get the root indicies

◆ GetRootIndices() [2/2]

TArray< int32 > Chaos::Facades::FCollectionHierarchyFacade::GetRootIndices ( const TManagedArrayAccessor< int32 > &  ParentAttribute)
static

Get the root indicies

◆ GetTransformArrayInDepthFirstOrder()

TArray< int32 > Chaos::Facades::FCollectionHierarchyFacade::GetTransformArrayInDepthFirstOrder ( ) const

Get transform indices in a depth first order

◆ HasLevelAttribute()

bool Chaos::Facades::FCollectionHierarchyFacade::HasLevelAttribute ( ) const

whether the level attribute is available

◆ IsConst()

bool Chaos::Facades::FCollectionHierarchyFacade::IsConst ( ) const
inline

Is this facade const access

◆ IsLevelAttributePersistent()

bool Chaos::Facades::FCollectionHierarchyFacade::IsLevelAttributePersistent ( ) const

whether the level attribute is persistent

◆ IsValid()

bool Chaos::Facades::FCollectionHierarchyFacade::IsValid ( ) const

Valid if parent and children arrays are available


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