warp.transform_decompose#
- warp.transform_decompose(
- m: Matrix[float32, Literal[4], Literal[4]],
Kernel
Differentiable
Decompose a 4x4 transformation matrix into 3D position, quaternion orientation, and 3D scale.
\[\begin{split}M = \begin{bmatrix} s_x R_{00} & s_y R_{01} & s_z R_{02} & p_x \\ s_x R_{10} & s_y R_{11} & s_z R_{12} & p_y \\ s_x R_{20} & s_y R_{21} & s_z R_{22} & p_z \\ 0 & 0 & 0 & 1 \end{bmatrix}\end{split}\]Where:
\(R\) is the 3x3 rotation matrix extracted from the input matrix after removing scale.
\(p\) is the 3D position vector \([p_x, p_y, p_z]\) extracted from the input matrix.
\(s\) is the 3D scale vector \([s_x, s_y, s_z]\) extracted from the input matrix.
- Parameters:
m (Matrix[Float, 4, 4]) – The matrix to decompose.
- Returns:
A tuple containing the position vector, quaternion orientation, and scale vector.
- Return type:
Tuple[Vector[Float, 3], Quaternion[Float], Vector[Float, 3]]