![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
Classes | |
| struct | FDeltaBatchHeader |
| class | FDwordBitReader |
| class | FDwordBitWriter |
| class | FDwordViewBitWriter |
| struct | FQuantizedDelta |
Variables | |
| constexpr uint32 | IndexMaxBits = 31u |
| constexpr uint32 | PositionMaxBits = 28u |
| constexpr float | PositionMinValue = -134217728.0f |
| constexpr float | PositionMaxValue = 134217720.0f |
| constexpr uint32 | TangentZMaxBits = 16u |
| constexpr float | TangentZMinValue = -32768.0f |
| constexpr float | TangentZMaxValue = 32767.0f |
| constexpr uint32 | BatchSizeBits = 6u |
| constexpr uint32 | BatchSize = 1u << BatchSizeBits |
| constexpr uint32 | NumBatchHeaderDwords = 10u |
| ENGINE_API uint32 UE::MorphTargetVertexCodec::CalculateBatchDwords | ( | const FDeltaBatchHeader & | BatchHeader | ) |
Calculates the number of Dwords the batch data has from BatchHeader.
|
inline |
|
inline |
| ENGINE_API void UE::MorphTargetVertexCodec::Decode | ( | TConstArrayView< FDeltaBatchHeader > | InBatchHeaders, |
| TConstArrayView< uint32 > | InCompressedVertices, | ||
| const float | InPositionPrecision, | ||
| const float | InTangentZPrecision, | ||
| TArray< FMorphTargetDelta > & | OutMorphDeltas | ||
| ) |
Decode all the vertices given by the two arrays.
| ENGINE_API void UE::MorphTargetVertexCodec::DequantizeDelta | ( | FMorphTargetDelta & | OutDelta, |
| const bool | bInNeedsTangent, | ||
| const FQuantizedDelta & | InQuantizedDelta, | ||
| const float | InPositionPrecision, | ||
| const float | InTangentZPrecision | ||
| ) |
| ENGINE_API void UE::MorphTargetVertexCodec::Encode | ( | TConstArrayView< FMorphTargetDelta > | InMorphDeltas, |
| const TBitArray<> * | InVertexNeedsTangents, | ||
| const float | InPositionPrecision, | ||
| const float | InTangentZPrecision, | ||
| TArray< FDeltaBatchHeader > & | OutBatchHeaders, | ||
| TArray< uint32 > & | OutCompressedVertices | ||
| ) |
Encodes the morph deltas, using the given precision, into a pair of arrays – one to store the header data that describes a bit-packed batch of vertices and another that stores the actual bit packed vertices themselves. Note that due to the compressor throwing away deltas that are under the precision threshold, the number of output deltas may not match the number of deltas that end up getting packed.
| InMorphDeltas | The list of morph deltas that will be compressed. |
| InVertexNeedsTangents | An optional bit array of vertices that require tangents to be present. If nullptr, then all vertices are assumed to require tangents. Used to ignore compressing tangents on sections that compute them automatically at render time. |
| InPositionPrecision | The precision required for the compression the position data. The greater this value the fewer bits are used for storing the resulting position values. |
| InTangentZPrecision | The precision required for the compression the tangent data. The greater this value the fewer bits are used for storing the resulting tangent values. |
| OutBatchHeaders | The list of block headers for each compressed block of morph deltas. Multiple headers are required since the final amount of bits required is dependent on the spread of position/tangent values within each block. |
| OutCompressedVertices | The actual compressed data. |
| ENGINE_API bool UE::MorphTargetVertexCodec::IterativeDecode | ( | uint64 & | InOutNextItemToken, |
| TConstArrayView< FDeltaBatchHeader > | InBatchHeaders, | ||
| TConstArrayView< uint32 > | InCompressedVertices, | ||
| const float | InPositionPrecision, | ||
| const float | InTangentZPrecision, | ||
| FMorphTargetDelta & | OutMorphTargetDelta | ||
| ) |
Iteratively decode a single morph target delta entry from the data stream. The InOutNextItemToken is an opaque value that should be initialized to zero for the first entry. It will be adjusted to point to the next entry after a successful decode.
| ENGINE_API void UE::MorphTargetVertexCodec::QuantizeDelta | ( | const FMorphTargetDelta & | InDelta, |
| const bool | bInNeedsTangent, | ||
| FQuantizedDelta & | OutQuantizedDelta, | ||
| const float | InPositionPrecision, | ||
| const float | InTangentZPrecision | ||
| ) |
Quantize FMorphTargetDelta using the given precision.
| ENGINE_API void UE::MorphTargetVertexCodec::ReadHeader | ( | FDeltaBatchHeader & | OutBatchHeader, |
| const TArrayView< const uint32 > | InData | ||
| ) |
Reads and decodes OutBatchHeader bits from InData.
| void UE::MorphTargetVertexCodec::ReadHeader | ( | FDeltaBatchHeader & | OutBatchHeader, |
| TConstArrayView< uint32 > | InData | ||
| ) |
| ENGINE_API void UE::MorphTargetVertexCodec::ReadQuantizedDeltas | ( | TArrayView< FQuantizedDelta > | OutQuantizedDeltas, |
| const FDeltaBatchHeader & | InBatchHeader, | ||
| TConstArrayView< uint32 > | InData | ||
| ) |
Reads and decodes the batch quantized data from InData to OutQuantizeDeletas. InData must be sufficiently large to hold the number of Dwords specified by InBatchHeader.
| ENGINE_API void UE::MorphTargetVertexCodec::WriteHeader | ( | const FDeltaBatchHeader & | InBatchHeader, |
| TArrayView< uint32 > | OutData | ||
| ) |
Encodes and writes InBatchHeader bits to OutData.
| ENGINE_API void UE::MorphTargetVertexCodec::WriteQuantizedDeltas | ( | TConstArrayView< FQuantizedDelta > | InQuantizedDeltas, |
| const FDeltaBatchHeader & | InBatchHeader, | ||
| TArrayView< uint32 > | OutData | ||
| ) |
Encodes and writes the batch quantized data from InQuantizeDeletas to OutData. OutData must be sufficiently large to hold the number of Dwords specified by InBatchHeader.
|
constexpr |