class

FDualQuatSkinning

The CPU half of the GPU dual-quaternion path. The bone arena keeps its Mat4 slots: a DQ palette is PACKED into the same 64-byte records (row 0 = real, row 1 = dual, row 2 = scale, row 3 = 0,0,0,1) and the draw's bone base carries a flag bit telling every skinned pass which encoding its records use. Blend() mirrors Common/Skinning.hlsli exactly so a test can pin the shader's arithmetic without a GPU.

Module
Animation
Header
#include "Animation/DualQuatSkinning.h"
Namespace
Mowo

Properties

TypeNameDescription
static constexpr uint32_tkBoneBaseDualQuatBitHigh bit of a packed bone base: the palette at that base is DQ-encoded. Bases stay far below 2^31 (the arena is a few thousand slots), and the bit survives every push site unchanged, which is what lets one upload decide the encoding for the G-Buffer, shadow, velocity, selection and pre-skin passes at once. Default 0x80000000u.
static constexpr uint32_tkBoneBaseMaskDefault 0x7FFFFFFFu.

Public functions

ReturnsNameDescription
FDualQuatFromMatrix
Mat4ToMatrix
voidPack
FDualQuatUnpack
voidPackPaletteConverts a skinning palette in place of the memcpy the arena upload would otherwise do.
Vec3TransformPoint
Vec3TransformDirection
FDualQuatBlendWeighted blend with the antipodality fix (each real part is flipped onto the first weighted bone's hemisphere) and renormalisation.

Function details

FromMatrix

C++
static FDualQuat FromMatrix(const Mat4& m)

ToMatrix

C++
static Mat4 ToMatrix(const FDualQuat& dq)

Pack

C++
static void Pack(const FDualQuat& dq, Mat4& out)

Unpack

C++
static FDualQuat Unpack(const Mat4& packed)

PackPalette

C++
static void PackPalette(const Mat4* src, uint32_t count, Mat4* dst)

Converts a skinning palette in place of the memcpy the arena upload would otherwise do. dst may not alias src.

TransformPoint

C++
static Vec3 TransformPoint(const FDualQuat& dq, const Vec3& p)

TransformDirection

C++
static Vec3 TransformDirection(const FDualQuat& dq, const Vec3& d)

Blend

C++
static FDualQuat Blend(const FDualQuat* bones, const float* weights, uint32_t count)

Weighted blend with the antipodality fix (each real part is flipped onto the first weighted bone's hemisphere) and renormalisation.

Generated from Animation/DualQuatSkinning.h via animation.json · Oct 26, 2026Version 1.0.0