ConstBone-local articulation rotation; unit length expected.
Optionalaxes: IAutoMovieJointAxes
Clinical axis basis; defaults to DEFAULT_JOINT_AXES.
Optionalframe: IAutoMovieRestFrame
Rest frame lifting rest-relative angles to clinical ones; omitted, the angles stay rest-relative.
Optionaldomain: IAutoMovieJointRotationDomain
Bone and resolved ROM that choose among equivalent charts;
omitted or with a null constraint, the principal chart is returned.
Recover a joint's flexion, abduction and twist, in degrees, from its bone-local rotation: the inverse of jointToQuaternion for the same
axesandframe. IK solvers compute quaternions and lower them through this into the angles a pose carries.Changing basis by
M = [flexion | abduction | twist]turns a proximal twist'sqTwist · qAbduction · qFlexionintoRz·Ry·Rxand a distal twist'sqAbduction · qFlexion · qTwistintoRy·Rx·Rz. The explicit clinical orderqFlexion · qAbduction · qTwistusesRx·Ry·Rz. The inverse reads each matrix from dot products of the axes with the rotated axes. At the gimbal (middle angle ±90°), only one combination of the outer angles is determined. The inverse pins flexion for a legacy proximal twist, abduction for a legacy distal twist, and twist for the explicit clinical order to zero, preserving the observable combination. The pin holds within a projected cosine of the square root of the unit roundoff, about 1.5e-8, where the two outer angles are otherwise rounding noise and the pinned angles rebuild the rotation within 1e-7 radian. A left-handed basis, such as the default (flexion × abduction = −twist), is extracted against−twistand the twist sign restored, so the round trip holds for any orthonormal basis.framelifts the rest-relative angles to clinical ones,clinical = sign · r + neutral. Adomainwith a non-null constraint also considers the rotation's second Euler chart,(f + 180, 180 − a, t + 180)for proximal twist and flexion-abduction-twist, and(180 − f, a + 180, t + 180)for a distal one, and the full-turn alias of each angle nearest the constraint's range. The candidate with the least jointRomOvershoot wins, the principal chart on a tie. Every candidate is the same rotation, so a pose no chart can hold keeps its overshoot instead of being clamped.Throws on a non-finite quaternion component or an invalid axis basis (see normalizeJointAxes). A non-unit quaternion is read as its rotation matrix, which is only a rotation for a unit quaternion.