RTCQuaternionDecomposition - structure that represents a quaternion decomposition of an affine transformation
struct RTCQuaternionDecomposition { float scale_x, scale_y, scale_z; float skew_xy, skew_xz, skew_yz; float shift_x, shift_y, shift_z; float quaternion_r, quaternion_i, quaternion_j, quaternion_k; float translation_x, translation_y, translation_z; };
The struct RTCQuaternionDecomposition represents an affine transformation decomposed into three parts. An upper triangular scaling/skew/shift matrix
a translation matrix
and a rotation matrix R, represented as a quaternion
quaternion~r~ + quaternion~i~ i + quaternion~j~ i + quaternion~k~ k
where i, j k are the imaginary quaternion units. The passed quaternion will be normalized internally.
The affine transformation matrix corresponding to a RTCQuaternionDecomposition is TRS and a point p = (p~x~, p~y~, p~z~, 1)^T^ will be transformed as
The functions rtcInitQuaternionDecomposition, rtcQuaternionDecompositionSetQuaternion, rtcQuaternionDecompositionSetScale, rtcQuaternionDecompositionSetSkew, rtcQuaternionDecompositionSetShift, and rtcQuaternionDecompositionSetTranslation allow to set the fields of the structure more conveniently.
No error code is set by this function.
[rtcSetGeometryTransformQuaternion], [rtcInitQuaternionDecomposition]