warp.quat_rotate_inv#

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

Return vec rotated by the inverse of the rotation that quat represents.

For example, if quat rotates vectors from a body’s local frame into world space, this maps a world-space vector into the body’s local frame.

Parameters:
  • quat – Rotation quaternion, with unit length. Gradient updates do not preserve its unit length, so re-normalize it after each update.

  • vec – Vector to rotate.

Returns:

The rotated vector, equal to quat_rotate(quat_inverse(quat), vec).