Struct nalgebra::UnitQuat
[−]
[src]
pub struct UnitQuat<N> { // some fields omitted }
A unit quaternion that can represent a 3D rotation.
Methods
impl<N: BaseFloat> UnitQuat<N>
fn new(axisangle: Vec3<N>) -> UnitQuat<N>
Creates a new unit quaternion from the axis-angle representation of a rotation.
fn new_with_quat(q: Quat<N>) -> UnitQuat<N>
Creates a new unit quaternion from a quaternion.
The input quaternion will be normalized.
fn new_with_euler_angles(roll: N, pitch: N, yaw: N) -> UnitQuat<N>
Creates a new unit quaternion from Euler angles.
The primitive rotations are applied in order: 1 roll − 2 pitch − 3 yaw.
fn to_rot(&self) -> Rot3<N>
Builds a rotation matrix from this quaternion.
impl<N> UnitQuat<N>
unsafe fn new_with_unit_quat(q: Quat<N>) -> UnitQuat<N>
Creates a new unit quaternion from a quaternion.
This is unsafe because the input quaternion will not be normalized.
fn quat<'a>(&'a self) -> &'a Quat<N>
The Quat
representation of this unit quaternion.