Struct static_math::dual_quaternion::DualQuaternion [−][src]
pub struct DualQuaternion<T> { /* fields omitted */ }
Implementations
impl<T> DualQuaternion<T>
[src]
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]
impl<T: Num + Copy> DualQuaternion<T>
[src]pub fn real(&self) -> Quaternion<T>
[src]
pub fn real(&self) -> Quaternion<T>
[src]Get the real Quaternion part
pub fn dual(&self) -> Quaternion<T>
[src]
pub fn dual(&self) -> Quaternion<T>
[src]Get the dual Quaternion part
pub fn new_from_rotation(r: &Quaternion<T>) -> Self
[src]
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]
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]
impl<T: Float + Signed> DualQuaternion<T>
[src]pub fn to_homogeneous(&self) -> M44<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 get_screw_parameters(&self) -> (V3<T>, V3<T>, T, T)
[src]
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
pub fn new_from_screw_parameters(l: &V3<T>, m: &V3<T>, theta: T, d: T) -> Self
[src]
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]
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]
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]
impl<T: Float> DualQuaternion<T>
[src]pub fn new_from_array(array: [T; 7]) -> Self
[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]
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]
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]
impl<T: Float + FloatConst + Sum> DualQuaternion<T>
[src]pub fn new_from_homogeneous(t: &M44<T>) -> Self
[src]
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]
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]
impl<T: Num + Copy + Signed> DualQuaternion<T>
[src]pub fn conj_as_dual(&self) -> Self
[src]
pub fn conj_as_dual(&self) -> Self
[src]Calculate the dual number conjugation of the DualQuaternion
pub fn conj_combined(&self) -> Self
[src]
pub fn conj_combined(&self) -> Self
[src]Calculate the combined(as a dual number and Quaternion) conjugation of the DualQuaternion
pub fn to_rotation_translation(&self) -> (M33<T>, V3<T>)
[src]
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]
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]
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]
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]
impl<T: Num + Copy> DualQuaternion<T>
[src]pub fn new_from_vecs(q_real: &V4<T>, q_dual: &V4<T>) -> Self
[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 one() -> DualQuaternion<T>
[src]
pub fn one() -> DualQuaternion<T>
[src]construct a unit DualQuaternion
Trait Implementations
impl<T: Num + Copy> Add<DualQuaternion<T>> for DualQuaternion<T>
[src]
impl<T: Num + Copy> Add<DualQuaternion<T>> for DualQuaternion<T>
[src]impl<T: Clone> Clone for DualQuaternion<T>
[src]
impl<T: Clone> Clone for DualQuaternion<T>
[src]fn clone(&self) -> 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]
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]
impl<T: Debug> Debug for DualQuaternion<T>
[src]impl<T: Num + Display> Display for DualQuaternion<T>
[src]
impl<T: Num + Display> Display for DualQuaternion<T>
[src]impl<T: Float + Signed> Div<DualQuaternion<T>> for DualQuaternion<T>
[src]
impl<T: Float + Signed> Div<DualQuaternion<T>> for DualQuaternion<T>
[src]impl<T: Num + Copy> Mul<DualQuaternion<T>> for DualQuaternion<T>
[src]
impl<T: Num + Copy> Mul<DualQuaternion<T>> for DualQuaternion<T>
[src]impl<T: Num + Copy> Mul<T> for DualQuaternion<T>
[src]
impl<T: Num + Copy> Mul<T> for DualQuaternion<T>
[src]impl<T: Num + Copy> One for DualQuaternion<T>
[src]
impl<T: Num + Copy> One for DualQuaternion<T>
[src]impl<T: PartialEq> PartialEq<DualQuaternion<T>> for DualQuaternion<T>
[src]
impl<T: PartialEq> PartialEq<DualQuaternion<T>> for DualQuaternion<T>
[src]fn eq(&self, other: &DualQuaternion<T>) -> bool
[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]
fn ne(&self, other: &DualQuaternion<T>) -> bool
[src]This method tests for !=
.
impl<T: Num + Copy> Sub<DualQuaternion<T>> for DualQuaternion<T>
[src]
impl<T: Num + Copy> Sub<DualQuaternion<T>> for DualQuaternion<T>
[src]impl<T: Num + Copy> Zero for DualQuaternion<T>
[src]
impl<T: Num + Copy> Zero for DualQuaternion<T>
[src]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,
T: RefUnwindSafe,
impl<T> Send for DualQuaternion<T> where
T: Send,
T: Send,
impl<T> Sync for DualQuaternion<T> where
T: Sync,
T: Sync,
impl<T> Unpin for DualQuaternion<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for DualQuaternion<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
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]
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