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

#include <BoneHierarchy.h>

Public Member Functions

 FBoneHierarchy ()
 
 FBoneHierarchy (const FBoneHierarchy &)=delete
 
 FBoneHierarchy (FBoneHierarchy &&Other)
 
FBoneHierarchyoperator= (const FBoneHierarchy &)=delete
 
FBoneHierarchyoperator= (FBoneHierarchy &&Other)
 
void InitPreAdd (const int32 NumBones)
 
void Add (TUniquePtr< FAnalyticImplicitGroup > &&AnalyticShapeGroupIn)
 
void InitPostAdd ()
 
bool HasBoneIndex (const uint32 BoneIndex) const
 
const TArray< int32 > & GetBoneIndices () const
 
void SetSocketIndexForBone (const uint32 BoneIndex, const int32 SocketIndex)
 
int32 GetSocketIndexForBone (const uint32 BoneIndex) const
 
const TArray< TUniquePtr< FAnalyticImplicitGroup > > & GetAnalyticShapeGroups () const
 
TArray< TUniquePtr< FAnalyticImplicitGroup > > & GetAnalyticShapeGroups ()
 
FAnalyticImplicitGroupGetAnalyticShapeGroup (const int32 BoneIndex)
 
const FAnalyticImplicitGroupGetAnalyticShapeGroup (const int32 BoneIndex) const
 
void PrepareForUpdate ()
 
void SetAnimLocalSpaceTransform (const int32 BoneIndex, const FTransform &BoneXf)
 
void SetActorWorldSpaceTransform (const FTransform &InActorLocalToWorld)
 
bool PrepareAnimWorldSpaceTransforms ()
 
const FTransformGetAnimWorldSpaceTransformsForBone (const int32 BoneIndex) const
 
const FTransformGetPrevAnimWorldSpaceTransformForBone (const int32 BoneIndex) const
 
int32 GetTransformIndex (const int32 BoneIndex) const
 

Protected Member Functions

void InitHierarchy ()
 
bool UpdateAnimWorldSpaceTransforms (const TArray< int32 > &TargetIndices)
 
void PropagateAnimDirtyFlags ()
 
void GetDirtyIndices (TArray< int32 > &TargetIndices, const uint8 Mask) const
 
void GetDirtyAnimIndices (TArray< int32 > &TargetIndices)
 
bool GetAnimLocalDirty (const int32 TransformIndex) const
 
void SetAnimLocalDirty (const int32 TransformIndex)
 
void SetAnimLocalClean (const int32 TransformIndex)
 

Protected Attributes

TArray< TUniquePtr< FAnalyticImplicitGroup > > ImplicitGroups
 
TArray< int32BoneIndices
 
TArray< int32SocketIndices
 
TMap< int32, FAnalyticImplicitGroup * > BoneToShapeGroup
 
TArray< FAnalyticImplicitGroup * > Roots
 
TMap< int32, int32BoneToTransformIndex
 
TMap< int32, int32TransformToBoneIndex
 
TArray< FTransformLocalSpaceTransforms
 
TArray< FTransformWorldSpaceTransforms
 
TArray< FTransformPrevWorldSpaceTransforms
 
TArray< uint8AnimDirty
 
TArray< int32ParentIndices
 
TArray< TArray< int32 > > ChildIndices
 
FTransform ActorLocalToWorld
 
bool ActorLocalToWorldDirty
 
TArray< int32TempTargetIndices
 

Detailed Description

A hierarchy of transforms (bones) that tracks the state of transforms within the hierarchy, to do partial updates.

Constructor & Destructor Documentation

◆ FBoneHierarchy() [1/3]

FBoneHierarchy::FBoneHierarchy ( )
inline

◆ FBoneHierarchy() [2/3]

FBoneHierarchy::FBoneHierarchy ( const FBoneHierarchy )
delete

◆ FBoneHierarchy() [3/3]

FBoneHierarchy::FBoneHierarchy ( FBoneHierarchy &&  Other)
inline

Member Function Documentation

◆ Add()

void FBoneHierarchy::Add ( TUniquePtr< FAnalyticImplicitGroup > &&  AnalyticShapeGroupIn)
inline

Add a structure to the hierarchy.

◆ GetAnalyticShapeGroup() [1/2]

FAnalyticImplicitGroup * FBoneHierarchy::GetAnalyticShapeGroup ( const int32  BoneIndex)
inline

◆ GetAnalyticShapeGroup() [2/2]

const FAnalyticImplicitGroup * FBoneHierarchy::GetAnalyticShapeGroup ( const int32  BoneIndex) const
inline

◆ GetAnalyticShapeGroups() [1/2]

TArray< TUniquePtr< FAnalyticImplicitGroup > > & FBoneHierarchy::GetAnalyticShapeGroups ( )
inline

◆ GetAnalyticShapeGroups() [2/2]

const TArray< TUniquePtr< FAnalyticImplicitGroup > > & FBoneHierarchy::GetAnalyticShapeGroups ( ) const
inline

◆ GetAnimLocalDirty()

bool FBoneHierarchy::GetAnimLocalDirty ( const int32  TransformIndex) const
inlineprotected

◆ GetAnimWorldSpaceTransformsForBone()

const FTransform * FBoneHierarchy::GetAnimWorldSpaceTransformsForBone ( const int32  BoneIndex) const
inline

Get all world space transforms associated with BoneIndex.

The transform for the bone is offset index 0 of the return value. If this bone has associated sub structures, and the hierarchy was initialized with FirstClassSubStructures = true, they start at index 1.

◆ GetBoneIndices()

const TArray< int32 > & FBoneHierarchy::GetBoneIndices ( ) const
inline

◆ GetDirtyAnimIndices()

void FBoneHierarchy::GetDirtyAnimIndices ( TArray< int32 > &  TargetIndices)
inlineprotected

◆ GetDirtyIndices()

void FBoneHierarchy::GetDirtyIndices ( TArray< int32 > &  TargetIndices,
const uint8  Mask 
) const
inlineprotected

Get a list of all transform indices that are dirty.

◆ GetPrevAnimWorldSpaceTransformForBone()

const FTransform * FBoneHierarchy::GetPrevAnimWorldSpaceTransformForBone ( const int32  BoneIndex) const
inline

◆ GetSocketIndexForBone()

int32 FBoneHierarchy::GetSocketIndexForBone ( const uint32  BoneIndex) const
inline

◆ GetTransformIndex()

int32 FBoneHierarchy::GetTransformIndex ( const int32  BoneIndex) const
inline

◆ HasBoneIndex()

bool FBoneHierarchy::HasBoneIndex ( const uint32  BoneIndex) const
inline

◆ InitHierarchy()

void FBoneHierarchy::InitHierarchy ( )
inlineprotected

Update each implicit group with parent and child information, and find root nodes.

Bones are sorted so that those with kinematic or dynamic bodies are first, and sorted by index (this allows to to iterate over the bone list when producing output for the animation system which asserts that the bone update list is sorted as an overly-sufficient check that parents are before children).

◆ InitPostAdd()

void FBoneHierarchy::InitPostAdd ( )
inline

Build the hierarchy. Must be done after adding structures, and before updating or sampling.

◆ InitPreAdd()

void FBoneHierarchy::InitPreAdd ( const int32  NumBones)
inline

Prepare the hierarchy for adding structures (optional).

◆ operator=() [1/2]

FBoneHierarchy & FBoneHierarchy::operator= ( const FBoneHierarchy )
delete

◆ operator=() [2/2]

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

◆ PrepareAnimWorldSpaceTransforms()

bool FBoneHierarchy::PrepareAnimWorldSpaceTransforms ( )
inline

Update all world space transforms for sampling.

◆ PrepareForUpdate()

void FBoneHierarchy::PrepareForUpdate ( )
inline

◆ PropagateAnimDirtyFlags()

void FBoneHierarchy::PropagateAnimDirtyFlags ( )
inlineprotected

Propagate bone space dirty flags from parents to sub structures and children.

◆ SetActorWorldSpaceTransform()

void FBoneHierarchy::SetActorWorldSpaceTransform ( const FTransform InActorLocalToWorld)
inline

Update the local-to-world transform of the actor the bones this hierarchy represents belongs to.

◆ SetAnimLocalClean()

void FBoneHierarchy::SetAnimLocalClean ( const int32  TransformIndex)
inlineprotected

◆ SetAnimLocalDirty()

void FBoneHierarchy::SetAnimLocalDirty ( const int32  TransformIndex)
inlineprotected

◆ SetAnimLocalSpaceTransform()

void FBoneHierarchy::SetAnimLocalSpaceTransform ( const int32  BoneIndex,
const FTransform BoneXf 
)
inline

Updates the local/bone space transform of a bone.

Setting transforms at this level requires the transform hierarchy to be resolved prior to sampling.

◆ SetSocketIndexForBone()

void FBoneHierarchy::SetSocketIndexForBone ( const uint32  BoneIndex,
const int32  SocketIndex 
)
inline

◆ UpdateAnimWorldSpaceTransforms()

bool FBoneHierarchy::UpdateAnimWorldSpaceTransforms ( const TArray< int32 > &  TargetIndices)
inlineprotected

Update the component space transforms of the specified indices.

Member Data Documentation

◆ ActorLocalToWorld

FTransform FBoneHierarchy::ActorLocalToWorld
protected

◆ ActorLocalToWorldDirty

bool FBoneHierarchy::ActorLocalToWorldDirty
protected

◆ AnimDirty

TArray<uint8> FBoneHierarchy::AnimDirty
protected

◆ BoneIndices

TArray<int32> FBoneHierarchy::BoneIndices
protected

◆ BoneToShapeGroup

TMap<int32, FAnalyticImplicitGroup*> FBoneHierarchy::BoneToShapeGroup
protected

◆ BoneToTransformIndex

TMap<int32, int32> FBoneHierarchy::BoneToTransformIndex
protected

◆ ChildIndices

TArray<TArray<int32> > FBoneHierarchy::ChildIndices
protected

◆ ImplicitGroups

TArray<TUniquePtr<FAnalyticImplicitGroup> > FBoneHierarchy::ImplicitGroups
protected

◆ LocalSpaceTransforms

TArray<FTransform> FBoneHierarchy::LocalSpaceTransforms
protected

◆ ParentIndices

TArray<int32> FBoneHierarchy::ParentIndices
protected

◆ PrevWorldSpaceTransforms

TArray<FTransform> FBoneHierarchy::PrevWorldSpaceTransforms
protected

◆ Roots

TArray<FAnalyticImplicitGroup*> FBoneHierarchy::Roots
protected

◆ SocketIndices

TArray<int32> FBoneHierarchy::SocketIndices
protected

◆ TempTargetIndices

TArray<int32> FBoneHierarchy::TempTargetIndices
protected

◆ TransformToBoneIndex

TMap<int32, int32> FBoneHierarchy::TransformToBoneIndex
protected

◆ WorldSpaceTransforms

TArray<FTransform> FBoneHierarchy::WorldSpaceTransforms
protected

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