#[repr(C)]pub struct Motor {
pub r_w: f64,
pub r_x: f64,
pub r_y: f64,
pub r_z: f64,
pub d_w: f64,
pub d_x: f64,
pub d_y: f64,
pub d_z: f64,
}Expand description
A 3D PGA Motor (even multivector / unit dual quaternion). Real part R = (r_w, r_x, r_y, r_z), Dual part D = (d_w, d_x, d_y, d_z).
Fields§
§r_w: f64§r_x: f64§r_y: f64§r_z: f64§d_w: f64§d_x: f64§d_y: f64§d_z: f64Implementations§
Source§impl Motor
impl Motor
Sourcepub fn from_rotation_translation(rot: [f64; 4], trans: [f64; 3]) -> Self
pub fn from_rotation_translation(rot: [f64; 4], trans: [f64; 3]) -> Self
Construct a motor from a rotation quaternion [w, x, y, z] and translation [x, y, z].
Sourcepub fn from_translation(tx: f64, ty: f64, tz: f64) -> Self
pub fn from_translation(tx: f64, ty: f64, tz: f64) -> Self
Construct a pure translation motor.
Sourcepub fn to_rotation_translation(&self) -> ([f64; 4], [f64; 3])
pub fn to_rotation_translation(&self) -> ([f64; 4], [f64; 3])
Converts to rotation-translation.
Sourcepub fn log(&self) -> MotorBivector
pub fn log(&self) -> MotorBivector
Logarithmic map: log(M) ∈ se(3).
Trait Implementations§
impl Copy for Motor
impl StructuralPartialEq for Motor
Auto Trait Implementations§
impl Freeze for Motor
impl RefUnwindSafe for Motor
impl Send for Motor
impl Sync for Motor
impl Unpin for Motor
impl UnsafeUnpin for Motor
impl UnwindSafe for Motor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more