Struct static_math::quaternion::Quaternion [−][src]
#[repr(C)]pub struct Quaternion<T> { /* fields omitted */ }
Expand description
Quaternion type
Implementations
construct a unit Quaternion
Construct a new Quternion from a V4
convert the Quaternion to a rotation matrix
convert a rotation matrix M33 to a Quaternion
generate a Quaternion that represents a rotation of a angle theta
around the axis(normalized) v
generate a Quaternion that represents a rotation of a angle theta
around the axis(normalized) v
, the angle theta
is encoded in the
norm of the vector v
create a quaternion that represents the rotation from a Euler angles with the roll-pitch-yay convention
get the axis of rotation from which this Quaternion represent
combine the two previous methods: get_axis
and get_angle
normalize the Quaternion
Spherical Linear Interpolation between two Quaternions this implementation follow this implementations:
https://www.mrpt.org/tutorials/programming/maths-and-geometry/slerp-interpolation/
Function arguments:
a
: Quaternion(normalized)
b
: Quaternion(normalized)
t
: Float in the closed interval [0.0, 1.0]
Calculate the instantaneous Quaternion derivative representing a Quaternion rotating at rate given by a vector rate
Function arguments:
rate
: V3
get the euler angles from the Quaternion
Trait Implementations
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl<T> RefUnwindSafe for Quaternion<T> where
T: RefUnwindSafe,
impl<T> Send for Quaternion<T> where
T: Send,
impl<T> Sync for Quaternion<T> where
T: Sync,
impl<T> Unpin for Quaternion<T> where
T: Unpin,
impl<T> UnwindSafe for Quaternion<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more