Page
Library
Module
Module type
Parameter
Class
Class type
Source
Gg.QuatQuaternions.
type t = quatThe type for quaternions.
val v : float -> float -> float -> float -> quatv x y z w is the quaternion xi+ yj + zk + w.
val zero : quatzero is the zero quaternion.
val id : quatid 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.