warp.quat_to_axis_angle#

warp.quat_to_axis_angle(
quat: Quaternion[Float],
) → tuple[Vector[Float, Literal[3]], Float]#
  • Kernel: true
  • Python: true
  • Differentiable: true

Return the rotation axis and angle in radians represented by quat.

Parameters:

quat – Rotation quaternion to convert.

Returns:

A tuple (axis, angle) such that quat_from_axis_angle(axis, angle) equals normalize(quat) or -normalize(quat). angle is in radians, in [0, pi]. axis is unspecified when angle is zero, and its sign is unspecified when angle is pi.

warp.quat_to_axis_angle(
quat: Quaternion[Float],
axis: Vector[Float, Literal[3]],
angle: Float,
) → None
  • Kernel: true
  • Python: false
  • Differentiable: true

Compute the rotation axis and angle in radians represented by quat and store them in caller-provided output arguments.

Parameters:
  • quat – Rotation quaternion to convert.

  • axis – Output rotation axis. It is unspecified when angle is zero, and its sign is unspecified when angle is pi.

  • angle – Output rotation angle in radians, in [0, pi].