UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Anim::FAnimationEvaluator Struct Reference

#include <AnimationEvaluation.h>

Public Member Functions

 FAnimationEvaluator (USkeletalMeshComponent *InSkeletalMeshComponent)
 
 ~FAnimationEvaluator ()
 
void Update (const bool bRefreshBoneTransforms)
 
bool IsValid (const bool bForTransform=false) const
 
CONSTRAINTS_API FTransform GetGlobalTransform (const FName InSocketName) const
 
FTransform GetRelativeTransform (const FName InSocketName) const
 
bool AddPostEvaluationTask (const FAnimationEvaluationTask &InTask)
 

Detailed Description

FAnimationEvaluator allows evaluating the animation of a skeletal mesh without having to tick it directly. USkeletalMeshComponent::TickAnimation & USkeletalMeshComponent::RefreshBoneTransforms update internal data, in particular bones transforms, which leads to several side effects (motion blur for example) as well as poor performance. This structure provides a cached equivalent of USkeletalMeshComponent::RefreshBoneTransforms, which is only updated on demand. It's also bound to USkeletalMeshComponent::OnBoneTransformsFinalizedMC so that it's updated with the real values once the skeletal mesh is finally up to date.

Constructor & Destructor Documentation

◆ FAnimationEvaluator()

UE::Anim::FAnimationEvaluator::FAnimationEvaluator ( USkeletalMeshComponent *  InSkeletalMeshComponent)

◆ ~FAnimationEvaluator()

UE::Anim::FAnimationEvaluator::~FAnimationEvaluator ( )

Member Function Documentation

◆ AddPostEvaluationTask()

bool UE::Anim::FAnimationEvaluator::AddPostEvaluationTask ( const FAnimationEvaluationTask InTask)

Adds a post-evaluation task to this evaluator if it has not already been added (returns true if added).

◆ GetGlobalTransform()

FTransform UE::Anim::FAnimationEvaluator::GetGlobalTransform ( const FName  InSocketName) const

Returns InSocketName component space transform composed with the skeletal mesh component's global transform.

◆ GetRelativeTransform()

FTransform UE::Anim::FAnimationEvaluator::GetRelativeTransform ( const FName  InSocketName) const

Returns InSocketName component space transform composed with the skeletal mesh component's relative transform.

◆ IsValid()

bool UE::Anim::FAnimationEvaluator::IsValid ( const bool  bForTransform = false) const

Returns true if the skeletal mesh component, its skeletal mesh and the transforms are valid for use. If bForTransform is true, the sizes of the component space transforms from the skeletal mesh component and those of the context are tested.

◆ Update()

void UE::Anim::FAnimationEvaluator::Update ( const bool  bRefreshBoneTransforms)

Clears the context and refresh the bones transforms if bRefreshBoneTransforms is true.


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