engine
 
载入中...
搜索中...
未找到
静态 Public 成员函数 | 所有成员列表
FAnimationCompression_PerTrackUtils类 参考

This class contains helper methods for dealing with animations compressed with the per-track codec 更多...

#include <AnimationCompression.h>

静态 Public 成员函数

static uint16 CompressFixed16 (float Value, int32 Log2MaxValue=0)
 Compresses a float into a signed fixed point number, which can range from the symmetrical values of -2^Log2MaxValue . 更多...
 
static FORCEINLINE void DecomposeHeader (int32 Header, int32 &KeyFormat, int32 &NumKeys, int32 &FormatFlags)
 Decomposes a header created with MakeHeader into three/four fields (two are still left packed into FormatFlags): 更多...
 
static FORCEINLINE void DecomposeHeader (int32 Header, int32 &KeyFormat, int32 &NumKeys, int32 &FormatFlags, int32 &BytesPerKey, int32 &FixedBytes)
 Decomposes a header created with MakeHeader into three/four fields (two are still left packed into FormatFlags): 更多...
 
template<int32 Log2MaxValue>
static float DecompressFixed16 (uint16 Value)
 Decompresses a fixed point number encoded by ComrpessFixed16 更多...
 
template<bool bIsDataAligned = true>
static FORCEINLINE_DEBUGGABLE void DecompressRotation (int32 Format, int32 FormatFlags, FQuat &Out, const uint8 *RESTRICT TopOfStream, const uint8 *RESTRICT KeyData)
 Decompress a single rotation key from a single track that was compressed with the PerTrack codec (scalar)
 
template<bool bIsDataAligned = true>
static FORCEINLINE_DEBUGGABLE void DecompressScale (int32 Format, int32 FormatFlags, FVector &Out, const uint8 *RESTRICT TopOfStream, const uint8 *RESTRICT KeyData)
 Decompress a single Scale key from a single track that was compressed with the PerTrack codec (scalar)
 
template<bool bIsDataAligned = true>
static FORCEINLINE_DEBUGGABLE void DecompressTranslation (int32 Format, int32 FormatFlags, FVector &Out, const uint8 *RESTRICT TopOfStream, const uint8 *RESTRICT KeyData)
 Decompress a single translation key from a single track that was compressed with the PerTrack codec (scalar)
 
static void GetAllSizesFromFormat (int32 KeyFormat, int32 FormatFlags, int32 &KeyComponentCount, int32 &KeyComponentSize, int32 &FixedComponentCount, int32 &FixedComponentSize)
 Figures out the size of various parts of a compressed track from the format and format flags combo 更多...
 
static int32 GetKeyCountFromHeader (int32 Header)
 Extracts the number of keys from a header created by MakeHeader 更多...
 
static int32 MakeHeader (const int32 NumKeys, const int32 KeyFormat, const int32 KeyFlags, bool bReallyNeedsFrameTable)
 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)
 

详细描述

This class contains helper methods for dealing with animations compressed with the per-track codec

成员函数说明

◆ CompressFixed16()

static uint16 FAnimationCompression_PerTrackUtils::CompressFixed16 ( float  Value,
int32  Log2MaxValue = 0 
)
inlinestatic

Compresses a float into a signed fixed point number, which can range from the symmetrical values of -2^Log2MaxValue .

. 2^Log2MaxValue. No clamping is done, values that don't fit will overflow.

For example, a Log2MaxValue of 0 can encode -1..1, and 7 can encode -128..128.

参数
ValueValue to encode
Log2MaxValueEncoding range (can be 0..15)
返回
The quantized value

◆ DecomposeHeader() [1/2]

static FORCEINLINE void FAnimationCompression_PerTrackUtils::DecomposeHeader ( int32  Header,
int32 &  KeyFormat,
int32 &  NumKeys,
int32 &  FormatFlags 
)
inlinestatic

Decomposes a header created with MakeHeader into three/four fields (two are still left packed into FormatFlags):

参数
HeaderThe header to decompose
KeyFormat[OUT] The encoding format used for each key
NumKeys[OUT] The number of keys in this track
FormatFlags[OUT] Three bits of format-specific information and a single bit to indicate if a key->frame table follows the keys

◆ DecomposeHeader() [2/2]

static FORCEINLINE void FAnimationCompression_PerTrackUtils::DecomposeHeader ( int32  Header,
int32 &  KeyFormat,
int32 &  NumKeys,
int32 &  FormatFlags,
int32 &  BytesPerKey,
int32 &  FixedBytes 
)
inlinestatic

Decomposes a header created with MakeHeader into three/four fields (two are still left packed into FormatFlags):

参数
HeaderThe header to decompose
KeyFormat[OUT] The encoding format used for each key
NumKeys[OUT] The number of keys in this track
FormatFlags[OUT] Three bits of format-specific information and a single bit to indicate if a key->frame table follows the keys

And some derived values:

参数
BytesPerKey[OUT] The number of bytes each key takes up
FixedBytes[OUT] The number of fixed bytes at the head of the track stream

◆ DecompressFixed16()

template<int32 Log2MaxValue>
static float FAnimationCompression_PerTrackUtils::DecompressFixed16 ( uint16  Value)
inlinestatic

Decompresses a fixed point number encoded by ComrpessFixed16

参数
ValueValue to decode
Log2MaxValueEncoding range (can be 0..15)
返回
The decompressed value

◆ GetAllSizesFromFormat()

static void FAnimationCompression_PerTrackUtils::GetAllSizesFromFormat ( int32  KeyFormat,
int32  FormatFlags,
int32 &  KeyComponentCount,
int32 &  KeyComponentSize,
int32 &  FixedComponentCount,
int32 &  FixedComponentSize 
)
inlinestatic

Figures out the size of various parts of a compressed track from the format and format flags combo

参数
KeyFormatThe encoding format used for each key
FormatFlagsThree bits of format-specific information and a single bit to indicate if a key->frame table follows the keys

◆ GetKeyCountFromHeader()

static int32 FAnimationCompression_PerTrackUtils::GetKeyCountFromHeader ( int32  Header)
inlinestatic

Extracts the number of keys from a header created by MakeHeader

参数
HeaderHeader to extract the number of keys from
返回
The number of keys encoded in the header

该类的文档由以下文件生成: