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

Public Member Functions

 FPerTrackCompressor (int32 InCompressionType, const FTranslationTrack &TranslationData, const FPerTrackParams &Params)
 
 FPerTrackCompressor (int32 InCompressionType, const FRotationTrack &RotationData, const FPerTrackParams &Params)
 
 FPerTrackCompressor (int32 InCompressionType, const FScaleTrack &ScaleData, const FPerTrackParams &Params)
 

Public Attributes

float MaxError
 
double SumError
 
TArray< uint8CompressedBytes
 
AnimationCompressionFormat ActualCompressionMode
 
int32 ActualKeyFlags
 
bool bReallyNeedsFrameTable
 

Protected Member Functions

void Reset ()
 
int32 MakeHeader (const int32 NumKeys, const AnimationCompressionFormat KeyFormat, const int32 KeyFlags)
 
void PadOutputStream ()
 
void AppendBytes (const void *Data, int32 Length)
 
void CompressTranslation_Identity (const FTranslationTrack &TranslationData)
 
void CompressTranslation_16_16_16 (const FTranslationTrack &TranslationData, float ZeroingThreshold)
 
void CompressTranslation_Uncompressed (const FTranslationTrack &TranslationData, float ZeroingThreshold)
 
void CompressTranslation_10_11_11 (const FTranslationTrack &TranslationData, float ZeroingThreshold)
 
void CompressRotation_Identity (const FRotationTrack &RotationData)
 
template<typename CompressorType >
void InnerCompressRotation (const FRotationTrack &RotationData)
 
void CompressRotation_Uncompressed (const FRotationTrack &RotationData)
 
void CompressRotation_16_16_16 (const FRotationTrack &RotationData, float ZeroingThreshold)
 
void CompressRotation_11_11_10 (const FRotationTrack &RotationData, float ZeroingThreshold)
 
void CompressRotation_Fixed32 (const FRotationTrack &RotationData)
 
void CompressRotation_Float32 (const FRotationTrack &RotationData)
 
void CompressScale_Identity (const FScaleTrack &ScaleData)
 
void CompressScale_16_16_16 (const FScaleTrack &ScaleData, float ZeroingThreshold)
 
void CompressScale_Uncompressed (const FScaleTrack &ScaleData, float ZeroingThreshold)
 
void CompressScale_10_11_11 (const FScaleTrack &ScaleData, float ZeroingThreshold)
 
template<typename FrameIndexType >
void EmitKeyToFrameTable (int32 NumFrames, float FramesPerSecond, const TArray< float > &Times)
 
void ProcessKeyToFrameTable (const FPerTrackParams &Params, const TArray< float > &FrameTimes)
 

Static Protected Member Functions

template<typename T >
static FBox CalculateQuatACF96Bounds (const UE::Math::TQuat< T > *Points, int32 NumPoints)
 

Detailed Description

This class compresses a single rotation or translation track into an internal buffer, keeping error metrics as it goes.

Constructor & Destructor Documentation

◆ FPerTrackCompressor() [1/3]

FPerTrackCompressor::FPerTrackCompressor ( int32  InCompressionType,
const FTranslationTrack TranslationData,
const FPerTrackParams Params 
)
inline

Constructs a compressed track of translation data

◆ FPerTrackCompressor() [2/3]

FPerTrackCompressor::FPerTrackCompressor ( int32  InCompressionType,
const FRotationTrack RotationData,
const FPerTrackParams Params 
)
inline

Constructs a compressed track of rotation data

◆ FPerTrackCompressor() [3/3]

FPerTrackCompressor::FPerTrackCompressor ( int32  InCompressionType,
const FScaleTrack ScaleData,
const FPerTrackParams Params 
)
inline

Constructs a compressed track of Scale data

Member Function Documentation

◆ AppendBytes()

void FPerTrackCompressor::AppendBytes ( const void Data,
int32  Length 
)
inlineprotected

Writes Length bytes from Data to the output stream

◆ CalculateQuatACF96Bounds()

template<typename T >
static FBox FPerTrackCompressor::CalculateQuatACF96Bounds ( const UE::Math::TQuat< T > *  Points,
int32  NumPoints 
)
inlinestaticprotected

◆ CompressRotation_11_11_10()

void FPerTrackCompressor::CompressRotation_11_11_10 ( const FRotationTrack RotationData,
float  ZeroingThreshold 
)
inlineprotected

◆ CompressRotation_16_16_16()

void FPerTrackCompressor::CompressRotation_16_16_16 ( const FRotationTrack RotationData,
float  ZeroingThreshold 
)
inlineprotected

◆ CompressRotation_Fixed32()

void FPerTrackCompressor::CompressRotation_Fixed32 ( const FRotationTrack RotationData)
inlineprotected

◆ CompressRotation_Float32()

void FPerTrackCompressor::CompressRotation_Float32 ( const FRotationTrack RotationData)
inlineprotected

◆ CompressRotation_Identity()

void FPerTrackCompressor::CompressRotation_Identity ( const FRotationTrack RotationData)
inlineprotected

◆ CompressRotation_Uncompressed()

void FPerTrackCompressor::CompressRotation_Uncompressed ( const FRotationTrack RotationData)
inlineprotected

◆ CompressScale_10_11_11()

void FPerTrackCompressor::CompressScale_10_11_11 ( const FScaleTrack ScaleData,
float  ZeroingThreshold 
)
inlineprotected

◆ CompressScale_16_16_16()

void FPerTrackCompressor::CompressScale_16_16_16 ( const FScaleTrack ScaleData,
float  ZeroingThreshold 
)
inlineprotected

◆ CompressScale_Identity()

void FPerTrackCompressor::CompressScale_Identity ( const FScaleTrack ScaleData)
inlineprotected

◆ CompressScale_Uncompressed()

void FPerTrackCompressor::CompressScale_Uncompressed ( const FScaleTrack ScaleData,
float  ZeroingThreshold 
)
inlineprotected

◆ CompressTranslation_10_11_11()

void FPerTrackCompressor::CompressTranslation_10_11_11 ( const FTranslationTrack TranslationData,
float  ZeroingThreshold 
)
inlineprotected

◆ CompressTranslation_16_16_16()

void FPerTrackCompressor::CompressTranslation_16_16_16 ( const FTranslationTrack TranslationData,
float  ZeroingThreshold 
)
inlineprotected

◆ CompressTranslation_Identity()

void FPerTrackCompressor::CompressTranslation_Identity ( const FTranslationTrack TranslationData)
inlineprotected

◆ CompressTranslation_Uncompressed()

void FPerTrackCompressor::CompressTranslation_Uncompressed ( const FTranslationTrack TranslationData,
float  ZeroingThreshold 
)
inlineprotected

◆ EmitKeyToFrameTable()

void FPerTrackCompressor::EmitKeyToFrameTable ( int32  NumFrames,
float  FramesPerSecond,
const TArray< float > &  Times 
)
inlineprotected

Helper method for writing out the key->frame mapping table with a given index type

◆ InnerCompressRotation()

void FPerTrackCompressor::InnerCompressRotation ( const FRotationTrack RotationData)
inlineprotected

◆ MakeHeader()

int32 FPerTrackCompressor::MakeHeader ( const int32  NumKeys,
const AnimationCompressionFormat  KeyFormat,
const int32  KeyFlags 
)
inlineprotected

Creates a header integer with four fields: NumKeys can be no more than 24 bits (positions 0..23) KeyFlags can be no more than 3 bits (positions 24..27) bReallyNeedsFrameTable is a single bit (position 27) KeyFormat can be no more than 4 bits (positions 31..28)

Also updates the ActualCompressionMode field

◆ PadOutputStream()

void FPerTrackCompressor::PadOutputStream ( )
inlineprotected

Ensures that the CompressedBytes output stream is a multiple of 4 bytes long

◆ ProcessKeyToFrameTable()

void FPerTrackCompressor::ProcessKeyToFrameTable ( const FPerTrackParams Params,
const TArray< float > &  FrameTimes 
)
inlineprotected

Writes out the key->frame mapping table if it is needed for the current compression type

◆ Reset()

void FPerTrackCompressor::Reset ( )
inlineprotected

Resets the compression buffer to defaults (no data)

Member Data Documentation

◆ ActualCompressionMode

AnimationCompressionFormat FPerTrackCompressor::ActualCompressionMode

◆ ActualKeyFlags

int32 FPerTrackCompressor::ActualKeyFlags

◆ bReallyNeedsFrameTable

bool FPerTrackCompressor::bReallyNeedsFrameTable

Does the compression scheme need a key->frame table (needed if the keys are spaced non-uniformly in time)

◆ CompressedBytes

TArray<uint8> FPerTrackCompressor::CompressedBytes

◆ MaxError

float FPerTrackCompressor::MaxError

◆ SumError

double FPerTrackCompressor::SumError

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