Struct g3::Motor

source ·
pub struct Motor { /* private fields */ }
Expand description

A Motor is a combination of a translation along a line combined with a rotation about an axis parallel to that line. In other words, it is the geometric product of a Translator and a Rotor.

Implementations§

source§

impl Motor

source

pub const fn new( a: f32, b: f32, c: f32, d: f32, e: f32, f: f32, g: f32, h: f32 ) -> Motor

a + be23 + ce31 + de12 + ee01 + fe02 + ge03 + h*e0123

source

pub fn from_screw_axis(angle: f32, d: f32, l: Line) -> Motor

Produce a screw motion rotating and translating by given amounts along a provided Euclidean axis.

source

pub fn one() -> Motor

Motor with only scalar component set to one

source

pub fn from_scalar(s: f32) -> Motor

source

pub fn inverse(&self) -> Motor

source

pub fn normalized(&self) -> Motor

source

pub fn constrained(&self) -> Motor

source

pub fn log(&self) -> Line

source

pub fn sqrt(self) -> Motor

source

pub fn reverse(self) -> Motor

source

pub fn approx_eq(&self, other: Motor, epsilon: f32) -> bool

source

pub fn e12(&self) -> f32

source

pub fn e21(&self) -> f32

source

pub fn e31(&self) -> f32

source

pub fn e13(&self) -> f32

source

pub fn e23(&self) -> f32

source

pub fn e32(&self) -> f32

source

pub fn scalar(&self) -> f32

source

pub fn e01(&self) -> f32

source

pub fn e10(&self) -> f32

source

pub fn e02(&self) -> f32

source

pub fn e20(&self) -> f32

source

pub fn e03(&self) -> f32

source

pub fn e30(&self) -> f32

source

pub fn e0123(&self) -> f32

Trait Implementations§

source§

impl Add<Motor> for Motor

§

type Output = Motor

The resulting type after applying the + operator.
source§

fn add(self, m: Self) -> Motor

Performs the + operation. Read more
source§

impl Add<Motor> for f32

§

type Output = Motor

The resulting type after applying the + operator.
source§

fn add(self, m: Motor) -> Motor

Performs the + operation. Read more
source§

impl Add<Translator> for Motor

§

type Output = Motor

The resulting type after applying the + operator.
source§

fn add(self, t: Translator) -> Motor

Performs the + operation. Read more
source§

impl Add<f32> for Motor

§

type Output = Motor

The resulting type after applying the + operator.
source§

fn add(self, s: f32) -> Motor

Performs the + operation. Read more
source§

impl AddAssign<Motor> for Motor

source§

fn add_assign(&mut self, m: Self)

Performs the += operation. Read more
source§

impl Clone for Motor

source§

fn clone(&self) -> Motor

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Motor

source§

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

Formats the value using the given formatter. Read more
source§

impl Default for Motor

source§

fn default() -> Motor

Returns the “default value” for a type. Read more
source§

impl Display for Motor

source§

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

Formats the value using the given formatter. Read more
source§

impl Div<Motor> for Motor

§

type Output = Motor

The resulting type after applying the / operator.
source§

fn div(self, m: Motor) -> Motor

Performs the / operation. Read more
source§

impl Div<Motor> for Rotor

§

type Output = Motor

The resulting type after applying the / operator.
source§

fn div(self, m: Motor) -> Self::Output

Performs the / operation. Read more
source§

impl Div<Rotor> for Motor

§

type Output = Motor

The resulting type after applying the / operator.
source§

fn div(self, r: Rotor) -> Motor

Performs the / operation. Read more
source§

impl Div<Translator> for Motor

§

type Output = Motor

The resulting type after applying the / operator.
source§

fn div(self, t: Translator) -> Motor

Performs the / operation. Read more
source§

impl Div<f32> for Motor

§

type Output = Motor

The resulting type after applying the / operator.
source§

fn div(self, s: f32) -> Motor

Performs the / operation. Read more
source§

impl DivAssign<f32> for Motor

source§

fn div_assign(&mut self, s: f32)

Performs the /= operation. Read more
source§

impl Fn(Line) for Motor

source§

extern "rust-call" fn call(&self, args: (Line,)) -> Self::Output

🔬This is a nightly-only experimental API. (fn_traits)
Performs the call operation.
source§

impl Fn(Origin) for Motor

source§

extern "rust-call" fn call(&self, _args: (Origin,)) -> Point

🔬This is a nightly-only experimental API. (fn_traits)
Performs the call operation.
source§

impl Fn(Plane) for Motor

source§

extern "rust-call" fn call(&self, args: (Plane,)) -> Plane

🔬This is a nightly-only experimental API. (fn_traits)
Performs the call operation.
source§

impl Fn(Point) for Motor

source§

extern "rust-call" fn call(&self, args: (Point,)) -> Point

🔬This is a nightly-only experimental API. (fn_traits)
Performs the call operation.
source§

impl FnMut(Line) for Motor

source§

extern "rust-call" fn call_mut(&mut self, args: (Line,)) -> Line

🔬This is a nightly-only experimental API. (fn_traits)
Performs the call operation.
source§

impl FnMut(Origin) for Motor

source§

extern "rust-call" fn call_mut(&mut self, args: (Origin,)) -> Point

🔬This is a nightly-only experimental API. (fn_traits)
Performs the call operation.
source§

impl FnMut(Plane) for Motor

source§

extern "rust-call" fn call_mut(&mut self, args: (Plane,)) -> Plane

🔬This is a nightly-only experimental API. (fn_traits)
Performs the call operation.
source§

impl FnMut(Point) for Motor

source§

extern "rust-call" fn call_mut(&mut self, args: (Point,)) -> Point

🔬This is a nightly-only experimental API. (fn_traits)
Performs the call operation.
source§

impl FnOnce(Line) for Motor

§

type Output = Line

The returned type after the call operator is used.
source§

extern "rust-call" fn call_once(self, args: (Line,)) -> Line

🔬This is a nightly-only experimental API. (fn_traits)
Performs the call operation.
source§

impl FnOnce(Origin) for Motor

§

type Output = Point

The returned type after the call operator is used.
source§

extern "rust-call" fn call_once(self, args: (Origin,)) -> Point

🔬This is a nightly-only experimental API. (fn_traits)
Performs the call operation.
source§

impl FnOnce(Plane) for Motor

§

type Output = Plane

The returned type after the call operator is used.
source§

extern "rust-call" fn call_once(self, args: (Plane,)) -> Plane

🔬This is a nightly-only experimental API. (fn_traits)
Performs the call operation.
source§

impl FnOnce(Point) for Motor

§

type Output = Point

The returned type after the call operator is used.
source§

extern "rust-call" fn call_once(self, args: (Point,)) -> Point

🔬This is a nightly-only experimental API. (fn_traits)
Performs the call operation.
source§

impl From<Motor> for [f32; 16]

source§

fn from(r: Motor) -> Self

Converts to this type from the input type.
source§

impl From<Rotor> for Motor

source§

fn from(r: Rotor) -> Motor

Converts to this type from the input type.
source§

impl From<Translator> for Motor

source§

fn from(t: Translator) -> Motor

Converts to this type from the input type.
source§

impl Mul<Motor> for Motor

§

type Output = Motor

The resulting type after applying the * operator.
source§

fn mul(self, m: Motor) -> Motor

Performs the * operation. Read more
source§

impl Mul<Motor> for Rotor

§

type Output = Motor

The resulting type after applying the * operator.
source§

fn mul(self, m: Motor) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<Motor> for Translator

§

type Output = Motor

The resulting type after applying the * operator.
source§

fn mul(self, m: Motor) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<Motor> for f32

§

type Output = Motor

The resulting type after applying the * operator.
source§

fn mul(self, m: Motor) -> Motor

Performs the * operation. Read more
source§

impl Mul<Rotor> for Motor

§

type Output = Motor

The resulting type after applying the * operator.
source§

fn mul(self, r: Rotor) -> Motor

Performs the * operation. Read more
source§

impl Mul<Translator> for Motor

§

type Output = Motor

The resulting type after applying the * operator.
source§

fn mul(self, t: Translator) -> Motor

Performs the * operation. Read more
source§

impl Mul<f32> for Motor

§

type Output = Motor

The resulting type after applying the * operator.
source§

fn mul(self, s: f32) -> Motor

Performs the * operation. Read more
source§

impl MulAssign<Motor> for Motor

source§

fn mul_assign(&mut self, m: Motor)

Performs the *= operation. Read more
source§

impl MulAssign<Rotor> for Motor

source§

fn mul_assign(&mut self, r: Rotor)

Performs the *= operation. Read more
source§

impl MulAssign<Translator> for Motor

source§

fn mul_assign(&mut self, t: Translator)

Performs the *= operation. Read more
source§

impl MulAssign<f32> for Motor

source§

fn mul_assign(&mut self, s: f32)

Performs the *= operation. Read more
source§

impl Neg for Motor

§

type Output = Motor

The resulting type after applying the - operator.
source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
source§

impl PartialEq<Motor> for Motor

source§

fn eq(&self, other: &Motor) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Sub<Motor> for Motor

§

type Output = Motor

The resulting type after applying the - operator.
source§

fn sub(self, m: Motor) -> Motor

Performs the - operation. Read more
source§

impl SubAssign<Motor> for Motor

source§

fn sub_assign(&mut self, m: Self)

Performs the -= operation. Read more
source§

impl Copy for Motor

source§

impl StructuralPartialEq for Motor

Auto Trait Implementations§

§

impl RefUnwindSafe for Motor

§

impl Send for Motor

§

impl Sync for Motor

§

impl Unpin for Motor

§

impl UnwindSafe for Motor

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.