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 | AccumulateLocalSpaceAdditivePose
(
FAnimationPoseData& BaseAnimationPoseData, |
||
| 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, |
||
| void | BlendPosesTogether
(
TArrayView< const FCompactPose > SourcePoses, |
||
| void | BlendPosesTogether
(
TArrayView< const FCompactPose > SourcePoses, |
||
| void | BlendPosesTogetherIndirect
(
TArrayView< const FCompactPose*const > SourcePoses, |
||
| 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 | BlendTwoPosesTogether
(
const FAnimationPoseData& SourcePoseOneData, |
||
| void | BlendTwoPosesTogetherPerBone
(
const FAnimationPoseData& SourcePoseOneData, |
||
| 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 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 | 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 | 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 USkeleton* Skeleton, |
||
| void | FillUpComponentSpaceTransformsRetargetBasePose
(
const USkeletalMesh* Mesh, |
||
| 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, |
Space bases | |
| 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 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. | |
| void | GetKeyIndicesFromTime
(
int32& OutKeyIndex1, |
Get KeyIndices using FFrameRate::AsFrameTime to calculate the keys and alpha value | |
| FTransform | GetSpaceTransform
(
FA2CSPose& Pose, |
FA2Pose/FA2CSPose Interfaces for template functions. | |
| FTransform | GetSpaceTransform
(
FA2Pose& Pose, |
FA2Pose/FA2CSPose Interfaces for template functions. | |
| 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. Stores results in A. Performs A = Lerp(A, B, Alpha); | |
| 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, |
Retarget a single bone transform, to apply right after extraction. | |
| 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 |
Deprecated Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AccumulateAdditivePose
(
FCompactPose& BasePose, |
Use AccumulateAdditivePose with other signature | |
| void | AccumulateLocalSpaceAdditivePose
(
FCompactPose& BasePose, |
Use AccumulateAdditivePose with other signature | |
| void | AccumulateMeshSpaceRotationAdditiveToLocalPose
(
FCompactPose& BasePose, |
Use AccumulateAdditivePose with other signature | |
| void | BlendPosesPerBoneFilter
(
FCompactPose& BasePose, |
Please use the BlendPosesPerBoneFilterwith different signature. | |
| void | BlendPosesTogether
(
TArrayView< const FCompactPose > SourcePoses, |
Use BlendPosesTogether with other signature | |
| void | BlendPosesTogether
(
TArrayView< const FCompactPose > SourcePoses, |
Use BlendPosesTogether with other signature | |
| void | BlendPosesTogetherIndirect
(
TArrayView< const FCompactPose*const > SourcePoses, |
Use BlendPosesTogetherIndirect with other signature | |
| void | BlendPosesTogetherPerBone
(
TArrayView< const FCompactPose > SourcePoses, |
Use BlendPosesTogetherPerBone with other signature | |
| void | BlendPosesTogetherPerBone
(
TArrayView< const FCompactPose > SourcePoses, |
Use BlendPosesTogetherPerBone with other signature | |
| void | BlendPosesTogetherPerBoneInMeshSpace
(
TArrayView< FCompactPose > SourcePoses, |
Use BlendPosesTogetherPerBone with other signature | |
| void | BlendTransformsByWeight
(
FTransform& OutTransform, |
Please use BlendTransform() for weighted blending | |
| void | BlendTwoPosesTogether
(
const FCompactPose& SourcePose1, |
Use BlendTwoPosesTogether with other signature | |
| void | BlendTwoPosesTogetherPerBone
(
const FCompactPose& SourcePose1, |
Use BlendTwoPosesTogether with other signature |