Library
Module
Module type
Parameter
Class
Class type
type t = quat
The type for quaternions.
val v : float -> float -> float -> float -> quat
v x y z w
is the quaternion x
i+ y
j + z
k + w
.
val zero : quat
zero
is the zero quaternion.
val id : quat
id
is the identity quaternion 1
.
conj q
is the quaternion conjugate q*
.
slerp q r t
is the spherical linear interpolation between q
and r
at t
. Non commutative, torque minimal and constant velocity.
squad q cq cr r t
is the spherical cubic interpolation between q
and r
at t
. cq
and cr
indicate the tangent orientations at q
and r
.
nlerp q r t
is the normalized linear interpolation between q
and r
at t
. Commutative, torque minimal and inconstant velocity.
of_m4 m
is the unit quaternion for the rotation in the 3x3 top left matrix in m
.
Unit quaternion for the rotation, see M3.rot3_map
.
Unit quaternion for the rotation, see M3.rot3_axis
.
Unit quaternion for the rotation, see M3.rot3_zyx
.
to_rot3_axis q
is the rotation axis and angle in radians of the unit quaternion q
.
to_rot_zyx q
is the x, y, z axis angles in radians of the unit quaternion q
.
apply3 q v
applies the 3D rotation of the unit quaternion q
to the vector (or point) v
.