Navigation
API > API/Runtime > API/Runtime/Engine
References
| Module | Engine |
| Header | /Engine/Source/Runtime/Engine/Public/AnimationRuntime.h |
| Include | #include "AnimationRuntime.h" |
Syntax
class FAnimationRuntime
Remarks
In AnimationRunTime Library, we extract animation data based on Skeleton hierarchy, not ref pose hierarchy. Ref pose will need to be re-mapped later
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AccumulateAdditivePose
(
FAnimationPoseData& BaseAnimationPoseData, |
||
| void | AccumulateAdditivePose
(
FCompactPose& BasePose, |
Accumulate Additive Pose based on AdditiveType | |
| void | AccumulateLocalSpaceAdditivePose
(
FCompactPose& BasePose, |
Accumulates weighted AdditivePose to BasePose. Rotations are NOT normalized. | |
| void | AccumulateLocalSpaceAdditivePose
(
FAnimationPoseData& BaseAnimationPoseData, |
||
| void | AccumulateMeshSpaceRotationAdditiveToLocalPose
(
FCompactPose& BasePose, |
Accumulate a MeshSpaceRotation Additive pose to a local pose. Rotations are NOT normalized | |
| void | AccumulateMeshSpaceRotationAdditiveToLocalPose
(
FAnimationPoseData& BaseAnimationPoseData, |
||
| ETypeAdvanceAnim | AdvanceTime
(
const bool bAllowLooping, |
Advance CurrentTime to CurrentTime + MoveDelta. | |
| void | AppendActiveMorphTargets
(
const USkeletalMesh* InSkeletalMesh, |
Combine CurveKeys (that reference morph targets by name) and ActiveAnims (that reference morphs by reference) into the ActiveMorphTargets array. | |
| void | ApplyWeightToTransform
(
const FBoneContainer& RequiredBones, |
Apply Weight to the Transform Atoms = Weight * Atoms at the end | |
| void | BlendPosesPerBoneFilter
(
FCompactPose& BasePose, |
Blend Poses per bone weights : The BasePoses + BlendPoses(SourceIndex) * Blend Weights(BoneIndex) Please note BlendWeights are array, so you can define per bone base This supports multi per bone blending, but only one pose as blend at a time per track PerBoneBlendWeights.Num() == Atoms.Num() | |
| void | BlendPosesPerBoneFilter
(
FCompactPose& BasePose, |
||
| void | BlendPosesTogether
(
TArrayView< const FCompactPose > SourcePoses, |
Blends together a set of poses, each with a given weight. | |
| void | BlendPosesTogether
(
TArrayView< const FCompactPose > SourcePoses, |
||
| void | BlendPosesTogether
(
TArrayView< const FCompactPose > SourcePoses, |
Blends together a set of poses, each with a given weight. | |
| void | BlendPosesTogether
(
TArrayView< const FCompactPose > SourcePoses, |
||
| void | BlendPosesTogetherIndirect
(
TArrayView< const FCompactPose*const > SourcePoses, |
Blends together a set of poses, each with a given weight. | |
| void | BlendPosesTogetherIndirect
(
TArrayView< const FCompactPose*const > SourcePoses, |
||
| void | BlendPosesTogetherPerBone
(
TArrayView< const FCompactPose > SourcePoses, |
Blends together a set of poses, each with a given weight. | |
| void | BlendPosesTogetherPerBone
(
TArrayView< const FCompactPose > SourcePoses, |
Blends together a set of poses, each with a given weight. | |
| void | BlendPosesTogetherPerBone
(
TArrayView< const FCompactPose > SourcePoses, |
||
| void | BlendPosesTogetherPerBone
(
TArrayView< const FCompactPose > SourcePoses, |
||
| void | BlendPosesTogetherPerBoneInMeshSpace
(
TArrayView< FCompactPose > SourcePoses, |
Blends together a set of local space (not mesh space) poses, each with a given weight. | |
| void | BlendPosesTogetherPerBoneInMeshSpace
(
TArrayView< FCompactPose > SourcePoses, |
Blends together a set of local space (not mesh space) poses, each with a given weight. | |
| void | BlendPosesTogetherPerBoneRemapped
(
TArrayView< const FCompactPose > SourcePoses, |
||
| void | BlendTransformsByWeight
(
FTransform& OutTransform, |
Blend Array of Transforms by weight | |
| void | BlendTwoPosesTogether
(
const FAnimationPoseData& SourcePoseOneData, |
||
| void | BlendTwoPosesTogether
(
const FCompactPose& SourcePose1, |
Blends together two poses. | |
| void | BlendTwoPosesTogetherPerBone
(
const FAnimationPoseData& SourcePoseOneData, |
||
| void | BlendTwoPosesTogetherPerBone
(
const FCompactPose& SourcePose1, |
Blends together a set of poses, each with a given weight. | |
| void | CombineWithAdditiveAnimations
(
int32 NumAdditivePoses, |
||
| bool | ContainsNaN
(
TArray< FBoneIndexType >& RequiredBoneIndices, |
||
| void | ConvertBoneSpaceTransformToCS
(
const FTransform& ComponentTransform, |
Convert a FTransform in a specified bone space to ComponentSpace. | |
| void | ConvertCSTransformToBoneSpace
(
const FTransform& ComponentTransform, |
Convert a ComponentSpace FTransform to specified bone space. | |
| void | Convert a MeshSpaceRotation pose to Local Space. Rotations are NOT normalized. | ||
| void | ConvertPoseToAdditive
(
FCompactPose& TargetPose, |
Convert TargetPose into an AdditivePose, by doing TargetPose = TargetPose - BasePose | |
| void | ConvertPoseToMeshRotation
(
FCompactPose& LocalPose |
Convert LocalPose into MeshSpaceRotations. Rotations are NOT normalized. | |
| void | ConvertPoseToMeshSpace
(
const TArray< FTransform >& LocalTransforms, |
Convert LocalTransforms into MeshSpaceTransforms over RequiredBones. | |
| void | ConvertTransformToAdditive
(
FTransform& TargetTrasnform, |
Convert transform to additive | |
| void | CreateMaskWeights
(
TArray< FPerBoneBlendWeight >& BoneBlendWeights, |
Create Mask Weight for skeleton joints, not per mesh or per required bones Individual alphas are read from a BlendProfile using a BlendMask mode | |
| void | CreateMaskWeights
(
TArray< FPerBoneBlendWeight >& BoneBlendWeights, |
Create Mask Weight for skeleton joints, not per mesh or per required bones You'll have to filter properly with correct mesh joint or required bones The depth should not change based on LOD or mesh or skeleton They still should contain same depth | |
| void | EnsureParentsPresent
(
TArray< FBoneIndexType >& BoneIndices, |
Utility for taking an array of bone indices and ensuring that all parents are present (ie. all bones between those in the array and the root are present). | |
| void | ExcludeBonesWithNoParents
(
const TArray< int32 >& BoneIndices, |
||
| void | FillUpComponentSpaceTransforms
(
const FReferenceSkeleton& RefSkeleton, |
||
| void | FillUpComponentSpaceTransformsRefPose
(
const USkeleton* Skeleton, |
||
| void | FillUpComponentSpaceTransformsRetargetBasePose
(
const USkeletalMesh* Mesh, |
||
| void | FillUpComponentSpaceTransformsRetargetBasePose
(
const USkeleton* Skeleton, |
||
| void | FillWithRefPose
(
TArray< FTransform >& OutAtoms, |
Fill ref pose | |
| void | FillWithRetargetBaseRefPose
(
FCompactPose& OutPose, |
Fill with retarget base ref pose but this isn't used during run-time, so it always copies all of them | |
| FTransform | GetComponentSpaceRefPose
(
const FCompactPoseBoneIndex& CompactPoseBoneIndex, |
Get Reference Component Space Transform | |
| FTransform | GetComponentSpaceTransform
(
const FReferenceSkeleton& RefSkeleton, |
||
| FTransform | GetComponentSpaceTransformRefPose
(
const FReferenceSkeleton& RefSkeleton, |
Space bases | |
| const FTransform & | GetComponentSpaceTransformWithCache
(
const FReferenceSkeleton& InRefSkeleton, |
Calculate the component-space bone transform for the specified bone. | |
| void | GetKeyIndicesFromTime
(
int32& OutKeyIndex1, |
Get KeyIndices using FFrameRate::AsFrameTime to calculate the keys and alpha value | |
| void | GetKeyIndicesFromTime
(
int32& OutKeyIndex1, |
Get Key Indices (start/end with alpha from start) with input parameter Time, NumKeys from % from StartKeyIndex, meaning (CurrentKeyIndex(float)-StartKeyIndex)/(EndKeyIndex-StartKeyIndex) by this Start-End, it will be between 0-(NumKeys-1), not number of Pos/Rot key tracks The FramesPerSecond parameter must be the sample rate of the animation data, for example 30. | |
| FTransform | GetSpaceTransform
(
FA2Pose& Pose, |
FA2Pose/FA2CSPose Interfaces for template functions. | |
| FTransform | GetSpaceTransform
(
FA2CSPose& Pose, |
||
| int32 | GetStringDistance
(
const FString& First, |
Calculate distance how close two strings are. | |
| bool | HasWeight
(
float Weight |
||
| void | InitializeTransform
(
const FBoneContainer& RequiredBones, |
||
| bool | IsFullWeight
(
float Weight |
Weight utility functions | |
| void | LerpBoneTransforms
(
TArray< FTransform >& A, |
Lerp for BoneTransforms. | |
| void | LerpPoses
(
FCompactPose& PoseA, |
Lerp for FCompactPose. | |
| void | LerpPosesPerBone
(
FCompactPose& PoseA, |
Lerp for FCompactPose. | |
| void | LerpPosesWithBoneIndexList
(
FCompactPose& PoseA, |
Lerp for FCompactPose. | |
| void | MakeSkeletonRefPoseFromMesh
(
const USkeletalMesh* InMesh, |
||
| void | MirrorCurves
(
FBlendedCurve& Curves, |
Mirror (swap) curves with the specified MirrorDataTable. | |
| void | MirrorPose
(
FCompactPose& Pose, |
Mirror a pose with the specified MirrorDataTable. | |
| void | MirrorPose
(
FCompactPose& Pose, |
Mirror Pose using cached mirror bones and components space arrays. | |
| FQuat | MirrorQuat
(
const FQuat& Q, |
Mirror a quaternion across the specified mirror axis | |
| FVector | MirrorVector
(
const FVector& V, |
Mirror a vector across the specified mirror axis | |
| void | NormalizeRotations
(
FTransformArrayA2& Atoms |
||
| void | NormalizeRotations
(
const FBoneContainer& RequiredBones, |
||
| void | RetargetBoneTransform
(
const USkeleton* SourceSkeleton, |
Retarget a single bone transform, to apply right after extraction. | |
| void | RetargetBoneTransform
(
const USkeleton* MySkeleton, |
||
| void | SetSpaceTransform
(
FA2Pose& Pose, |
||
| void | SetSpaceTransform
(
FA2CSPose& Pose, |
||
| void | TickBlendWeight
(
float DeltaTime, |
||
| void | UpdateDesiredBoneWeight
(
const TArray< FPerBoneBlendWeight >& SrcBoneBlendWeights, |
Enums
| Type | Name | Description | |
|---|---|---|---|
| EBlendPosesPerBoneFilterFlags | Blending flags for BlendPosesPerBoneFilter |