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

Go to the source code of this file.

Classes

struct  BoneTrackPair
 
class  AnimEncoding
 
class  AnimEncodingLegacyBase
 

Macros

#define USE_ANIMATION_CODEC_BATCH_SOLVER   1
 
#define ANIMATION_ENCODING_PACKAGE_ORIGINAL   0
 
#define CURRENT_ANIMATION_ENCODING_PACKAGE_VERSION   ANIMATION_ENCODING_PACKAGE_ORIGINAL
 
#define MAX_BONES   65536
 
#define AC_UnalignedSwap(MemoryArchive, Data, Len)
 

Typedefs

typedef TArray< BoneTrackPairBoneTrackArray
 
typedef TArray< FTransform, TMemStackAllocator<> > FTransformArray
 

Functions

ENGINE_API void AnimationFormat_GetStats (const FUECompressedAnimData &CompressedData, int32 &NumTransTracks, int32 &NumRotTracks, int32 &NumScaleTracks, int32 &TotalNumTransKeys, int32 &TotalNumRotKeys, int32 &TotalNumScaleKeys, float &TranslationKeySize, float &RotationKeySize, float &ScaleKeySize, int32 &OverheadSize, int32 &NumTransTracksWithOneKey, int32 &NumRotTracksWithOneKey, int32 &NumScaleTracksWithOneKey)
 
template<typename CompressedDataType >
void AnimationFormat_SetInterfaceLinks (CompressedDataType &CompressedData)
 
void PadMemoryWriter (FMemoryWriter *MemoryWriter, uint8 *&TrackData, const int32 Alignment)
 
void PadMemoryReader (FMemoryReader *MemoryReader, uint8 *&TrackData, const int32 Alignment)
 
template<typename TABLE_TYPE >
int32 FindLowKeyIndex (const TABLE_TYPE *FrameTable, int32 NumKeys, int32 SearchFrame, int32 KeyEstimate)
 

Variables

ENGINE_API const int32 CompressedTranslationStrides [ACF_MAX]
 
ENGINE_API const int32 CompressedTranslationNum [ACF_MAX]
 
ENGINE_API const int32 CompressedRotationStrides [ACF_MAX]
 
ENGINE_API const int32 CompressedRotationNum [ACF_MAX]
 
ENGINE_API const int32 CompressedScaleStrides [ACF_MAX]
 
ENGINE_API const int32 CompressedScaleNum [ACF_MAX]
 
ENGINE_API const uint8 PerTrackNumComponentTable [ACF_MAX *8]
 

Macro Definition Documentation

◆ AC_UnalignedSwap

#define AC_UnalignedSwap (   MemoryArchive,
  Data,
  Len 
)
Value:
MemoryArchive.Serialize( (Data), (Len) ); \
(Data) += (Len);

◆ ANIMATION_ENCODING_PACKAGE_ORIGINAL

#define ANIMATION_ENCODING_PACKAGE_ORIGINAL   0

◆ CURRENT_ANIMATION_ENCODING_PACKAGE_VERSION

#define CURRENT_ANIMATION_ENCODING_PACKAGE_VERSION   ANIMATION_ENCODING_PACKAGE_ORIGINAL

◆ MAX_BONES

#define MAX_BONES   65536

Fixed-size array of BoneTrackPair elements. Used in the bulk-animation solving process.

◆ USE_ANIMATION_CODEC_BATCH_SOLVER

#define USE_ANIMATION_CODEC_BATCH_SOLVER   1

Typedef Documentation

◆ BoneTrackArray

◆ FTransformArray

Array of FTransform using the game memory stack

Function Documentation

◆ AnimationFormat_GetStats()

ENGINE_API void AnimationFormat_GetStats ( const FUECompressedAnimData CompressedData,
int32 NumTransTracks,
int32 NumRotTracks,
int32 NumScaleTracks,
int32 TotalNumTransKeys,
int32 TotalNumRotKeys,
int32 TotalNumScaleKeys,
float TranslationKeySize,
float RotationKeySize,
float ScaleKeySize,
int32 OverheadSize,
int32 NumTransTracksWithOneKey,
int32 NumRotTracksWithOneKey,
int32 NumScaleTracksWithOneKey 
)

Extracts statistics about a given Animation Sequence

Parameters
SeqAn Animation Sequence.
NumTransTracksThe total number of Translation Tracks found.
NumRotTracksThe total number of Rotation Tracks found.
TotalNumTransKeysThe total number of Translation Keys found.
TotalNumRotKeysThe total number of Rotation Keys found.
TranslationKeySizeThe average size (in BYTES) of a single Translation Key.
RotationKeySizeThe average size (in BYTES) of a single Rotation Key.
OverheadSizeThe size (in BYTES) of overhead (offsets, scale tables, key->frame lookups, etc...)
NumTransTracksWithOneKeyThe total number of Translation Tracks found containing a single key.
NumRotTracksWithOneKeyThe total number of Rotation Tracks found containing a single key.

◆ AnimationFormat_SetInterfaceLinks()

void AnimationFormat_SetInterfaceLinks ( CompressedDataType CompressedData)

Sets the internal Animation Codec Interface Links within an Animation Sequence

Parameters
SeqAn Animation Sequence to setup links within.

Sets the internal Animation Codec Interface Links within an Animation CompressedDatauence

Parameters
SeqAn Animation Sequence to setup links within.

◆ FindLowKeyIndex()

template<typename TABLE_TYPE >
int32 FindLowKeyIndex ( const TABLE_TYPE FrameTable,
int32  NumKeys,
int32  SearchFrame,
int32  KeyEstimate 
)
inline

Utility function to find the key before the specified search value.

Parameters
FrameTableThe frame table, containing on frame index value per key.
NumKeysThe total number of keys in the table.
SearchFrameThe Frame we are attempting to find.
KeyEstimateAn estimate of the best location to search from in the KeyTable.
Returns
The index of the first key immediately below the specified search frame.

◆ PadMemoryReader()

void PadMemoryReader ( FMemoryReader MemoryReader,
uint8 *&  TrackData,
const int32  Alignment 
)

Skips a specified number of bytes in the memory reader to maintain alignment

◆ PadMemoryWriter()

void PadMemoryWriter ( FMemoryWriter MemoryWriter,
uint8 *&  TrackData,
const int32  Alignment 
)

Pads a specified number of bytes to the memory writer to maintain alignment

Variable Documentation

◆ CompressedRotationNum

ENGINE_API const int32 CompressedRotationNum[ACF_MAX]
extern

Number of swapped chunks per element.

◆ CompressedRotationStrides

ENGINE_API const int32 CompressedRotationStrides[ACF_MAX]
extern

Each CompresedRotationData track's ByteStream will be byte swapped in chunks of this size.

◆ CompressedScaleNum

ENGINE_API const int32 CompressedScaleNum[ACF_MAX]
extern

Number of swapped chunks per element.

◆ CompressedScaleStrides

ENGINE_API const int32 CompressedScaleStrides[ACF_MAX]
extern

Each CompresedScaleData track's ByteStream will be byte swapped in chunks of this size.

◆ CompressedTranslationNum

ENGINE_API const int32 CompressedTranslationNum[ACF_MAX]
extern

Number of swapped chunks per element.

◆ CompressedTranslationStrides

ENGINE_API const int32 CompressedTranslationStrides[ACF_MAX]
extern

Each CompresedTranslationData track's ByteStream will be byte swapped in chunks of this size.

◆ PerTrackNumComponentTable

ENGINE_API const uint8 PerTrackNumComponentTable[ACF_MAX *8]
extern

Number of swapped chunks per element, split out per component (high 3 bits) and flags (low 3 bits)

Note: The entry for ACF_IntervalFixed32NoW is special, and actually indicates how many fixed components there are!