Skip to main content

RotationOps

Trait RotationOps 

Source
pub trait RotationOps<N: ScalarType>:
    Copy
    + Debug
    + Mul<N::Rotation, Output = N::Rotation>
    + Mul<N::Vector, Output = N::Vector> {
    // Required methods
    fn to_mat(self) -> N::Matrix;
    fn inverse(self) -> Self;
    fn diff_conj1_2(&self, rhs: &Self) -> N::Matrix;
    fn diff_conj1_2_tr(&self, rhs: &Self) -> N::Matrix;
    fn dot(&self, rhs: &Self) -> N;
    fn imag(&self) -> N::Vector;
    fn real(&self) -> N;
    fn mul_assign_unchecked(&mut self, rhs: N);
}
Expand description

Trait implemented by quaternions.

Required Methods§

Source

fn to_mat(self) -> N::Matrix

Converts this rotation to a rotation matrix.

Source

fn inverse(self) -> Self

Returns the inverse of this rotation.

Source

fn diff_conj1_2(&self, rhs: &Self) -> N::Matrix

Compute the differential of inv(q1) * q2.

Source

fn diff_conj1_2_tr(&self, rhs: &Self) -> N::Matrix

Compute the transposed differential of inv(q1) * q2.

Source

fn dot(&self, rhs: &Self) -> N

Compute the dot product of two quaternions.

Source

fn imag(&self) -> N::Vector

The imaginary part of the quaternion.

Source

fn real(&self) -> N

The real (scalar) part of the quaternion.

Source

fn mul_assign_unchecked(&mut self, rhs: N)

Multiply this quaternion by a scalar without renormalizing.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl RotationOps<WideF32x4> for UnitQuaternion<SimdReal>

Available on crate feature dim3 only.
Source§

fn to_mat(self) -> Matrix3<SimdReal>

Source§

fn inverse(self) -> Self

Source§

fn diff_conj1_2(&self, rhs: &Self) -> Matrix3<SimdReal>

Source§

fn diff_conj1_2_tr(&self, rhs: &Self) -> Matrix3<SimdReal>

Source§

fn dot(&self, rhs: &Self) -> SimdReal

Source§

fn imag(&self) -> Vector3<SimdReal>

Source§

fn real(&self) -> SimdReal

Source§

fn mul_assign_unchecked(&mut self, rhs: SimdReal)

Implementors§

Source§

impl RotationOps<f32> for Rotation

Available on crate feature dim3 only.