UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
AnimationCompression.h File Reference
#include "CoreMinimal.h"
#include "Math/FloatPacker.h"
#include "Animation/AnimEnums.h"
#include "EngineLogs.h"

Go to the source code of this file.

Classes

class  FQuatFixed48NoW
 
class  FQuatFixed32NoW
 
class  FQuatFloat96NoW
 
class  FVectorFixed48
 
class  FVectorIntervalFixed32NoW
 
class  FQuatIntervalFixed32NoW
 
class  FQuatFloat32NoW
 
class  FAnimationCompression_PerTrackUtils
 

Namespaces

namespace  AnimationCompressionUtils
 

Macros

#define TRANSLATION_ZEROING_THRESHOLD   (0.0001f)
 
#define QUATERNION_ZEROING_THRESHOLD   (0.0003f)
 
#define SCALE_ZEROING_THRESHOLD   (0.000001f)
 
#define END_EFFECTOR_DUMMY_BONE_LENGTH_SOCKET   (50.f)
 
#define END_EFFECTOR_DUMMY_BONE_LENGTH   (5.f)
 
#define Quant16BitDiv   (32767.f)
 
#define Quant16BitFactor   (32767.f)
 
#define Quant16BitOffs   (32767)
 
#define Quant10BitDiv   (511.f)
 
#define Quant10BitFactor   (511.f)
 
#define Quant10BitOffs   (511)
 
#define Quant11BitDiv   (1023.f)
 
#define Quant11BitFactor   (1023.f)
 
#define Quant11BitOffs   (1023)
 

Functions

ENGINE_API DECLARE_LOG_CATEGORY_EXTERN (LogAnimationCompression, Display, All)
 
template<typename ValueType >
ValueType AnimationCompressionUtils::UnalignedRead (const void *Ptr)
 
template<typename T >
AnimationCompressionUtils::Interpolate (const T &A, const T &B, float Alpha)
 
template<>
FVector3f AnimationCompressionUtils::Interpolate< FVector3f > (const FVector3f &A, const FVector3f &B, float Alpha)
 
template<>
FVector3d AnimationCompressionUtils::Interpolate< FVector3d > (const FVector3d &A, const FVector3d &B, float Alpha)
 
template<>
FQuat4d AnimationCompressionUtils::Interpolate< FQuat4d > (const FQuat4d &A, const FQuat4d &B, float Alpha)
 
template<>
FQuat4f AnimationCompressionUtils::Interpolate< FQuat4f > (const FQuat4f &A, const FQuat4f &B, float Alpha)
 
template<int32 FORMAT, bool bIsDataAligned = true>
void DecompressRotation (FQuat4f &Out, const uint8 *RESTRICT TopOfStream, const uint8 *RESTRICT KeyData)
 
template<int32 FORMAT, bool bIsDataAligned = true>
void DecompressTranslation (FVector3f &Out, const uint8 *RESTRICT TopOfStream, const uint8 *RESTRICT KeyData)
 
template<int32 FORMAT, bool bIsDataAligned = true>
void DecompressScale (FVector3f &Out, const uint8 *RESTRICT TopOfStream, const uint8 *RESTRICT KeyData)
 

Macro Definition Documentation

◆ END_EFFECTOR_DUMMY_BONE_LENGTH

#define END_EFFECTOR_DUMMY_BONE_LENGTH   (5.f)

Dummy bone added to end effectors to make sure rotation doesn't get too aggressively compressed.

◆ END_EFFECTOR_DUMMY_BONE_LENGTH_SOCKET

#define END_EFFECTOR_DUMMY_BONE_LENGTH_SOCKET   (50.f)

Size of Dummy bone used, when measuring error at an end effector which has a socket attached to it

◆ Quant10BitDiv

#define Quant10BitDiv   (511.f)

◆ Quant10BitFactor

#define Quant10BitFactor   (511.f)

◆ Quant10BitOffs

#define Quant10BitOffs   (511)

◆ Quant11BitDiv

#define Quant11BitDiv   (1023.f)

◆ Quant11BitFactor

#define Quant11BitFactor   (1023.f)

◆ Quant11BitOffs

#define Quant11BitOffs   (1023)

◆ Quant16BitDiv

#define Quant16BitDiv   (32767.f)

◆ Quant16BitFactor

#define Quant16BitFactor   (32767.f)

◆ Quant16BitOffs

#define Quant16BitOffs   (32767)

◆ QUATERNION_ZEROING_THRESHOLD

#define QUATERNION_ZEROING_THRESHOLD   (0.0003f)

◆ SCALE_ZEROING_THRESHOLD

#define SCALE_ZEROING_THRESHOLD   (0.000001f)

◆ TRANSLATION_ZEROING_THRESHOLD

#define TRANSLATION_ZEROING_THRESHOLD   (0.0001f)

Function Documentation

◆ DECLARE_LOG_CATEGORY_EXTERN()

ENGINE_API DECLARE_LOG_CATEGORY_EXTERN ( LogAnimationCompression  ,
Display  ,
All   
)

◆ DecompressRotation()

template<int32 FORMAT, bool bIsDataAligned = true>
void DecompressRotation ( FQuat4f Out,
const uint8 *RESTRICT  TopOfStream,
const uint8 *RESTRICT  KeyData 
)
inline

Templated Rotation Decompressor. Generates a unique decompressor per known quantization format

Parameters
OutThe FQuat to fill in.
TopOfStreamThe start of the compressed rotation stream data.
KeyDataThe compressed rotation data to decompress.
Returns
None.

◆ DecompressScale()

template<int32 FORMAT, bool bIsDataAligned = true>
void DecompressScale ( FVector3f Out,
const uint8 *RESTRICT  TopOfStream,
const uint8 *RESTRICT  KeyData 
)
inline

Templated Scale Decompressor. Generates a unique decompressor per known quantization format

Parameters
OutThe FVector to fill in.
TopOfStreamThe start of the compressed Scale stream data.
KeyDataThe compressed Scale data to decompress.
Returns
None.

◆ DecompressTranslation()

template<int32 FORMAT, bool bIsDataAligned = true>
void DecompressTranslation ( FVector3f Out,
const uint8 *RESTRICT  TopOfStream,
const uint8 *RESTRICT  KeyData 
)
inline

Templated Translation Decompressor. Generates a unique decompressor per known quantization format

Parameters
OutThe FVector to fill in.
TopOfStreamThe start of the compressed translation stream data.
KeyDataThe compressed translation data to decompress.
Returns
None.