warp.transform_to_matrix#

warp.transform_to_matrix(
xform: Transformation[float32],
) Matrix[4, 4, float32]#
  • Kernel

  • Differentiable

Convert a transformation to a 4x4 matrix.

\[\begin{split}M = \begin{bmatrix} R_{00} & R_{01} & R_{02} & p_x \\ R_{10} & R_{11} & R_{12} & p_y \\ R_{20} & R_{21} & R_{22} & p_z \\ 0 & 0 & 0 & 1 \end{bmatrix}\end{split}\]

Where:

  • \(R\) is the 3x3 rotation matrix created from the orientation quaternion of the input transform.

  • \(p\) is the 3D position vector \([p_x, p_y, p_z]\) of the input transform.

Args:

xform (Transformation[Float]): Transformation to convert.

Returns:

Matrix[4, 4, Float]: The matrix.