warp.quat_from_euler#

warp.quat_from_euler(
e: vec3f,
i: int,
j: int,
k: int,
) quatf#
  • Kernel

  • Differentiable

Construct a quaternion from Euler angles and an axis sequence.

Parameters:
  • e – Euler angles in radians.

  • i – Index of the first axis in {0, 1, 2}.

  • j – Index of the second axis in {0, 1, 2}.

  • k – Index of the third axis in {0, 1, 2}.

Notes

Angles are read by axis index (e[0]``=X, ``e[1]``=Y, ``e[2]``=Z), so use distinct axes ``(i, j, k) for an unambiguous inverse with quat_to_euler().

Returns:

Quaternion in (x, y, z, w) layout.

Return type:

wp.quat