Struct static_math::dual_quaternion::DualQuaternion[][src]

pub struct DualQuaternion<T> { /* fields omitted */ }

Implementations

impl<T> DualQuaternion<T>[src]

pub const fn new(q_real: Quaternion<T>, q_dual: Quaternion<T>) -> Self[src]

pub const fn new_from(a: T, b: T, c: T, d: T, e: T, f: T, g: T, h: T) -> Self[src]

impl<T: Num + Copy> DualQuaternion<T>[src]

pub fn real(&self) -> Quaternion<T>[src]

Get the real Quaternion part

pub fn dual(&self) -> Quaternion<T>[src]

Get the dual Quaternion part

pub fn new_from_rotation(r: &Quaternion<T>) -> Self[src]

Create a pure rotation transformation from a given Quaternion

pub fn new_from_point(v: &V3<T>) -> Self[src]

Create a Dual Quaternion that represent a point when the real part is a unit and the dual part is a pure Quaternion

impl<T: Float + Signed> DualQuaternion<T>[src]

pub fn to_homogeneous(&self) -> M44<T>[src]

Convert the DualQuaternion to a homogeneus transformation matrix M44<Float> in SE(3)

pub fn inverse(&self) -> Self[src]

Calculate the inverse of the DualQuaternion

pub fn get_screw_parameters(&self) -> (V3<T>, V3<T>, T, T)[src]

Get the screw parameters from this DualQuaternion the implementation follow the following paper: “Dual Quaternions” by Yan-Bin Jia

Output: l: V3 a unit 3d vector that represent one of the plucker coordinates m: V3 a vector in 3d that represent the moment of the line l and his norm represent the distance from the origin to the line theta: Float the amount of rotation around the screw axis l d: Float the amount of translation along the screw axis l

pub fn new_from_screw_parameters(l: &V3<T>, m: &V3<T>, theta: T, d: T) -> Self[src]

Create a DualQuaternion from the screw parameters

Function arguments: l: a unit vector that represent the screw axis m: screw axis moment that its perpendicular to l (m * l = 0) and the norm represent the actual moment theta: screw angle, represent the amount of rotation around the screw axis d: screw displacement, represent the amount of displacement along the screw axis

pub fn pow(&self, exponent: T) -> Self[src]

Compute the power of the DualQuaternion

Function arguments: exponent: Float the exponent to raise the power

Output: Self^(exponent)

pub fn screw_lerp(begin: &Self, end: &Self, tau: T) -> Self[src]

Screw Linear Interpolation: is an extension of the spherical linear interpolation (SLERP) over Quaternions. It performs a screw motion with constant rotation and translation speeds from begin to end

Function arguments: begin: DualQuaternion<Float> the first “point” for the interpolation end: DualQuaternion<Float> the second “point” for the interpolation tau: Float in [0, 1] representing how far along and around the screw axis to interpolate

pub fn log(&self) -> Option<Self>[src]

impl<T: Float> DualQuaternion<T>[src]

pub fn new_from_array(array: [T; 7]) -> Self[src]

Create a DualQuaternion from an array that encodes a Quaternion and a 3d vecto (V3)

pub fn new_from_translation(t: &V3<T>) -> Self[src]

Create a DualQuaternion that represent a pure translation transformation

pub fn new_from_rot_trans(rot: &Quaternion<T>, translation: &V3<T>) -> Self[src]

Create a new DualQuaternion from a rotation(Quaternion) and translation(V3)

pub fn is_normalized(&self) -> bool[src]

impl<T: Float + FloatConst + Sum> DualQuaternion<T>[src]

pub fn normalize(&self) -> Option<Self>[src]

Normalize the DualQuaternion only if necessary

pub fn new_from_homogeneous(t: &M44<T>) -> Self[src]

Create a new DualQuaternion from a homogeneous transformation matrix in SE(3)

pub fn new_from_rotation_matrix(m: &M33<T>) -> Self[src]

Create a DualQuaternion that represent a rotation pure transformation

impl<T: Num + Copy + Signed> DualQuaternion<T>[src]

pub fn conj(&self) -> Self[src]

Calculate the conjugate of the DualQuaternion

pub fn conj_as_dual(&self) -> Self[src]

Calculate the dual number conjugation of the DualQuaternion

pub fn conj_combined(&self) -> Self[src]

Calculate the combined(as a dual number and Quaternion) conjugation of the DualQuaternion

pub fn norm(&self) -> Self[src]

Calculate the norm of the DualQuaternion

pub fn to_rotation_translation(&self) -> (M33<T>, V3<T>)[src]

Get the underlying rotation and translation from the DualQuaternion

pub fn get_translation(&self) -> V3<T>[src]

Get the underlying translation from the DualQuaternion

pub fn to_quaternion_translation(&self) -> (Quaternion<T>, V3<T>)[src]

Get the underlying Quaternion and translation from the DualQuaternion

pub fn transform_point(&self, point: &V3<T>) -> V3<T>[src]

Transform the given point in 3D with the transformation that represent this DualQuaternion like a homogeneous transformation in SE(3)

impl<T: Num + Copy> DualQuaternion<T>[src]

pub fn new_from_vecs(q_real: &V4<T>, q_dual: &V4<T>) -> Self[src]

Construct a new DualQuaternion from two V4

pub fn zero() -> Self[src]

construct a zero DualQuaternion

pub fn one() -> DualQuaternion<T>[src]

construct a unit DualQuaternion

Trait Implementations

impl<T: Num + Copy> Add<DualQuaternion<T>> for DualQuaternion<T>[src]

type Output = Self

The resulting type after applying the + operator.

fn add(self, rhs: Self) -> Self[src]

Performs the + operation. Read more

impl<T: Clone> Clone for DualQuaternion<T>[src]

fn clone(&self) -> DualQuaternion<T>[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<T: Debug> Debug for DualQuaternion<T>[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<T: Num + Display> Display for DualQuaternion<T>[src]

fn fmt(&self, dest: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<T: Float + Signed> Div<DualQuaternion<T>> for DualQuaternion<T>[src]

type Output = Self

The resulting type after applying the / operator.

fn div(self, rhs: Self) -> Self::Output[src]

Performs the / operation. Read more

impl<T: Num + Copy> Mul<DualQuaternion<T>> for DualQuaternion<T>[src]

type Output = Self

The resulting type after applying the * operator.

fn mul(self, rhs: Self) -> Self::Output[src]

Performs the * operation. Read more

impl<T: Num + Copy> Mul<T> for DualQuaternion<T>[src]

type Output = Self

The resulting type after applying the * operator.

fn mul(self, rhs: T) -> Self::Output[src]

Performs the * operation. Read more

impl<T: Num + Copy + Signed> Neg for DualQuaternion<T>[src]

type Output = Self

The resulting type after applying the - operator.

fn neg(self) -> Self[src]

Performs the unary - operation. Read more

impl<T: Num + Copy> One for DualQuaternion<T>[src]

fn one() -> Self[src]

Create an identity DualQuaternion

fn set_one(&mut self)[src]

Sets self to the multiplicative identity element of Self, 1.

fn is_one(&self) -> bool where
    Self: PartialEq<Self>, 
[src]

Returns true if self is equal to the multiplicative identity. Read more

impl<T: PartialEq> PartialEq<DualQuaternion<T>> for DualQuaternion<T>[src]

fn eq(&self, other: &DualQuaternion<T>) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &DualQuaternion<T>) -> bool[src]

This method tests for !=.

impl<T: Num + Copy> Sub<DualQuaternion<T>> for DualQuaternion<T>[src]

type Output = Self

The resulting type after applying the - operator.

fn sub(self, rhs: Self) -> Self[src]

Performs the - operation. Read more

impl<T: Num + Copy> Zero for DualQuaternion<T>[src]

fn zero() -> Self[src]

Returns the additive identity element of Self, 0. Read more

fn is_zero(&self) -> bool[src]

Returns true if self is equal to the additive identity.

fn set_zero(&mut self)[src]

Sets self to the additive identity element of Self, 0.

impl<T: Copy> Copy for DualQuaternion<T>[src]

impl<T> StructuralPartialEq for DualQuaternion<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for DualQuaternion<T> where
    T: RefUnwindSafe

impl<T> Send for DualQuaternion<T> where
    T: Send

impl<T> Sync for DualQuaternion<T> where
    T: Sync

impl<T> Unpin for DualQuaternion<T> where
    T: Unpin

impl<T> UnwindSafe for DualQuaternion<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T> ToString for T where
    T: Display + ?Sized
[src]

pub default fn to_string(&self) -> String[src]

Converts the given value to a String. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.