#[repr(C)]pub struct Motor {
pub r: [f32; 4],
pub d: [f32; 4],
}Expand description
3D Projective Geometric Algebra (PGA) Motor (Motor { r, d }) representing rigid body
transformations (rotations, translations, and general Chasles screw motions) in $\mathbf{P}(\mathbb{R}^*_{3,0,1})$.
Fields§
§r: [f32; 4]Rotor component [s, e12, e13, e23].
d: [f32; 4]Dual translation/screw component [e0123, e03, e02, e01].
Implementations§
Source§impl Motor
impl Motor
Sourcepub fn from_translation(v: [f32; 3]) -> Self
pub fn from_translation(v: [f32; 3]) -> Self
Pure translation motor along v = [dx, dy, dz].
Sourcepub fn from_axis_angle(axis: [f32; 3], angle_rad: f32) -> Self
pub fn from_axis_angle(axis: [f32; 3], angle_rad: f32) -> Self
Pure rotation motor around axis by angle_rad radians.
Sourcepub fn from_screw(axis: [f32; 3], angle_rad: f32, slide_m: f32) -> Self
pub fn from_screw(axis: [f32; 3], angle_rad: f32, slide_m: f32) -> Self
Chasles screw motor combining rotation angle_rad around axis and linear translation
slide_m along axis.
Sourcepub const fn motor_reverse(self) -> Self
pub const fn motor_reverse(self) -> Self
PGA reversion $\widetilde{M}$.
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§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DependencyElement for T
§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.