Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/FAnimationRuntime
Description
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.
| Name | GetComponentSpaceTransformWithCache |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Public/AnimationRuntime.h |
| Include Path | #include "AnimationRuntime.h" |
| Source | /Engine/Source/Runtime/Engine/Private/Animation/AnimationRuntime.cpp |
static const FTransform & GetComponentSpaceTransformWithCache
(
const FReferenceSkeleton & InRefSkeleton,
const TArray < FTransform > & InBoneSpaceTransforms,
int32 BoneIndex,
TArray < FTransform > & CachedTransforms,
TArray < bool > & CachedTransformReady
)
Parameters
| Name | Remarks |
|---|---|
| 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. |