FAnimationRuntime::GetComponentSpaceTransformWithCache

Calculate the component-space bone transform for the specified bone.

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Public/AnimationRuntime.h

Include

#include "AnimationRuntime.h"

Source

/Engine/Source/Runtime/Engine/Private/Animation/AnimationRuntime.cpp

Syntax

static const FTransform & GetComponentSpaceTransformWithCache
(
    const FReferenceSkeleton & InRefSkeleton,
    const TArray< FTransform > & InBoneSpaceTransforms,
    int32 BoneIndex,
    TArray< FTransform > & CachedTransforms,
    TArray< bool > & CachedTransformReady
)

Remarks

Calculate the component-space bone transform for the specified bone. This is similar to GetComponentSpaceTransform(), but uses a cached array of transforms to prevent re-calculations when requesting transforms for multiple bones with shared parents. This is only likely to be more efficient than FillUpComponentSpaceTransforms if you only need a relatively small number of bone transforms.

Parameters

Parameter

Description

InRefSkeleton

The bone hierarchy

InBoneSpaceTransforms

Bone-space transforms for all bones in the hierarchy

BoneIndex

We calculate the component-space transform of this bone

CachedTransforms

An array of transforms which holds the transforms of any bones whose transforms have been previously calculated. Should be initialized with CachedTransforms.SetNumUninitialized(BoneSpaceTransforms.Num()) before first use.

CachedTransformReady

An array of flags indicating which bone transforms have been cached. Should be initialized with CachedTransformReady.SetNumZeroed(BoneSpaceTransforms.Num()) before first use.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss