UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
AnimEncoding Class Reference

#include <AnimEncoding.h>

+ Inheritance diagram for AnimEncoding:

Static Protected Member Functions

static float TimeToIndex (float SequenceLength, float RelativePos, int32 NumKeys, EAnimInterpolationType Interpolation, int32 &PosIndex0Out, int32 &PosIndex1Out)
 
static float TimeToIndex (EAnimInterpolationType Interpolation, int32 NumberOfFrames, const uint8 *FrameTable, float RelativePos, int32 NumKeys, int32 &PosIndex0Out, int32 &PosIndex1Out)
 

Member Function Documentation

◆ TimeToIndex() [1/2]

float AnimEncoding::TimeToIndex ( EAnimInterpolationType  Interpolation,
int32  NumberOfFrames,
const uint8 FrameTable,
float  RelativePos,
int32  NumKeys,
int32 PosIndex0Out,
int32 PosIndex1Out 
)
inlinestaticprotected

Utility function to determine the two key indices to interpolate given a relative position in the animation

Parameters
InterpolationThe Interpolation type of the sequence
NumberOfFramesThe number of frames in the original sequence
FrameTableThe frame table containing a frame index for each key.
RelativePosThe relative position to solve in the range [0,1] inclusive.
NumKeysThe number of keys present in the track being solved.
PosIndex0OutOutput value for the closest key index before the RelativePos specified.
PosIndex1OutOutput value for the closest key index after the RelativePos specified.
Returns
The rate at which to interpolate the two keys returned to obtain the final result.

Utility function to determine the two key indices to interpolate given a relative position in the animation

Parameters
SeqThe UAnimSequence container.
FrameTableThe frame table containing a frame index for each key.
RelativePosThe relative position to solve in the range [0,1] inclusive.
NumKeysThe number of keys present in the track being solved.
PosIndex0OutOutput value for the closest key index before the RelativePos specified.
PosIndex1OutOutput value for the closest key index after the RelativePos specified.
Returns
The rate at which to interpolate the two keys returned to obtain the final result.

◆ TimeToIndex() [2/2]

float AnimEncoding::TimeToIndex ( float  SequenceLength,
float  RelativePos,
int32  NumKeys,
EAnimInterpolationType  Interpolation,
int32 PosIndex0Out,
int32 PosIndex1Out 
)
inlinestaticprotectedvirtual

Handles Byte-swapping incoming animation data from a MemoryReader

Parameters
CompressedDataThe compressed animation data being operated on.
MemoryReaderThe MemoryReader object to read from.
SourceArVersionThe version of the archive that the data is coming from. Handles Byte-swapping outgoing animation data to an array of BYTEs
CompressedDataThe compressed animation data being operated on.
SerializedDataThe output buffer.
ForceByteSwappingtrue is byte swapping is not optional. Decompress all requested rotation components from an Animation Sequence
AtomsThe FTransform array to fill in.
DesiredPairsArray of requested bone information
DecompContextThe decompression context to use. Decompress all requested translation components from an Animation Sequence
AtomsThe FTransform array to fill in.
DesiredPairsArray of requested bone information
DecompContextThe decompression context to use. Decompress all requested translation components from an Animation Sequence
AtomsThe FTransform array to fill in.
DesiredPairsArray of requested bone information
DecompContextThe decompression context to use. Utility function to determine the two key indices to interpolate given a relative position in the animation
SequenceLengthThe length of the anim sequence
RelativePosThe relative position to solve in the range [0,1] inclusive.
NumKeysThe number of keys present in the track being solved.
InterpolationThe Interpolation type of the sequence
PosIndex0OutOutput value for the closest key index before the RelativePos specified.
PosIndex1OutOutput value for the closest key index after the RelativePos specified.
Returns
The rate at which to interpolate the two keys returned to obtain the final result.

Utility function to determine the two key indices to interpolate given a relative position in the animation

Parameters
SeqThe UAnimSequence container.
RelativePosThe relative position to solve in the range [0,1] inclusive.
NumKeysThe number of keys present in the track being solved.
PosIndex0OutOutput value for the closest key index before the RelativePos specified.
PosIndex1OutOutput value for the closest key index after the RelativePos specified.
Returns
The rate at which to interpolate the two keys returned to obtain the final result.

The documentation for this class was generated from the following file: