Splits an affine matrix into the translation, rotation and scale that
compose would rebuild it from.
The world driver pass reads a node's world position and orientation this
way, recomputes it for an aim, parent or IK driver, and composes it back.
Scale is the length of each basis column and is never negative, since
validators admit only positive scale and the engine never mirrors. A matrix
with a mirrored or sheared basis, such as a child rotated under a
non-uniformly scaled parent, has no exact decomposition; its rotation is
then an approximation that need not be unit length.
A collapsed axis, whose basis column has length exactly zero, carries no
direction, so its rotation axis is completed from the others: one missing
axis is the right-handed cross product of the remaining two, and with only
one axis left the other two follow the shortest-arc rotation that carries
that axis's canonical direction onto it. A fully collapsed matrix has the
identity rotation. For a finite unsheared matrix, composing the result
again reproduces every nonzero column to rounding, and the rotation is a
finite unit quaternion.
Splits an affine matrix into the translation, rotation and scale that compose would rebuild it from.
The world driver pass reads a node's world position and orientation this way, recomputes it for an aim, parent or IK driver, and composes it back. Scale is the length of each basis column and is never negative, since validators admit only positive scale and the engine never mirrors. A matrix with a mirrored or sheared basis, such as a child rotated under a non-uniformly scaled parent, has no exact decomposition; its rotation is then an approximation that need not be unit length.
A collapsed axis, whose basis column has length exactly zero, carries no direction, so its rotation axis is completed from the others: one missing axis is the right-handed cross product of the remaining two, and with only one axis left the other two follow the shortest-arc rotation that carries that axis's canonical direction onto it. A fully collapsed matrix has the identity rotation. For a finite unsheared matrix, composing the result again reproduces every nonzero column to rounding, and the rotation is a finite unit quaternion.