Struct g3::Rotor

source ·
pub struct Rotor(pub f32x4);
Expand description

The rotor is an entity that represents a rigid rotation about an axis.

Tuple Fields§

§0: f32x4

Implementations§

source§

impl Rotor

source

pub fn new(ang_rad: f32, x: f32, y: f32, z: f32) -> Rotor

source

pub fn from_euler_angles(roll: f32, pitch: f32, yaw: f32) -> Rotor

source

pub fn load_normalized(data: [f32; 4]) -> Rotor

source

pub fn normalized(&self) -> Rotor

source

pub fn inverse(&self) -> Rotor

source

pub fn reverse(&self) -> Rotor

source

pub fn constrained(&self) -> Rotor

source

pub fn log(&self) -> Branch

source

pub fn sqrt(&self) -> Rotor

source

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

source

pub fn scalar(&self) -> f32

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

Trait Implementations§

source§

impl Add<Rotor> for Rotor

§

type Output = Rotor

The resulting type after applying the + operator.
source§

fn add(self, r: Rotor) -> Rotor

Performs the + operation. Read more
source§

impl Add<Rotor> for f32

§

type Output = Rotor

The resulting type after applying the + operator.
source§

fn add(self, r: Rotor) -> Rotor

Performs the + operation. Read more
source§

impl Add<f32> for Rotor

§

type Output = Rotor

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl AddAssign<Rotor> for Rotor

source§

fn add_assign(&mut self, r: Self)

Performs the += operation. Read more
source§

impl Clone for Rotor

source§

fn clone(&self) -> Rotor

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 Rotor

source§

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

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

impl Default for Rotor

source§

fn default() -> Rotor

Returns the “default value” for a type. 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<Rotor> for Rotor

§

type Output = Rotor

The resulting type after applying the / operator.
source§

fn div(self, other: Rotor) -> Self::Output

Performs the / operation. Read more
source§

impl Div<Translator> for Rotor

§

type Output = Motor

The resulting type after applying the / operator.
source§

fn div(self, t: Translator) -> Self::Output

Performs the / operation. Read more
source§

impl Div<f32> for Rotor

§

type Output = Rotor

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl DivAssign<f32> for Rotor

source§

fn div_assign(&mut self, s: f32)

Performs the /= operation. Read more
source§

impl Fn(&Plane) for Rotor

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(Branch) for Rotor

source§

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

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

impl Fn(Direction) for Rotor

source§

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

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

impl Fn(Line) for Rotor

source§

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

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

impl Fn(Plane) for Rotor

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 Rotor

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(&Plane) for Rotor

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(Branch) for Rotor

source§

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

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

impl FnMut(Direction) for Rotor

source§

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

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

impl FnMut(Line) for Rotor

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(Plane) for Rotor

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 Rotor

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(&Plane) for Rotor

§

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(Branch) for Rotor

§

type Output = Branch

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

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

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

impl FnOnce(Direction) for Rotor

§

type Output = Direction

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

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

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

impl FnOnce(Line) for Rotor

§

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(Plane) for Rotor

§

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 Rotor

§

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<EulerAngles> for Rotor

source§

fn from(ea: EulerAngles) -> Self

Converts to this type from the input type.
source§

impl From<Rotor> for [f32; 16]

source§

fn from(r: Rotor) -> Self

Converts to this type from the input type.
source§

impl From<Rotor> for [f32; 4]

source§

fn from(r: Rotor) -> Self

Converts to this type from the input type.
source§

impl From<Rotor> for EulerAngles

source§

fn from(r: Rotor) -> 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 Into<Rotor> for [f32; 4]

source§

fn into(self) -> Rotor

Converts this type into the (usually inferred) input type.
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<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<Rotor> for Rotor

§

type Output = Rotor

The resulting type after applying the * operator.
source§

fn mul(self, r: Rotor) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<Rotor> for Translator

§

type Output = Motor

The resulting type after applying the * operator.
source§

fn mul(self, r: Rotor) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<Translator> for Rotor

§

type Output = Motor

The resulting type after applying the * operator.
source§

fn mul(self, t: Translator) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<f32> for Rotor

§

type Output = Rotor

The resulting type after applying the * operator.
source§

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

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<f32> for Rotor

source§

fn mul_assign(&mut self, s: f32)

Performs the *= operation. Read more
source§

impl Neg for Rotor

§

type Output = Rotor

The resulting type after applying the - operator.
source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
source§

impl PartialEq<Rotor> for Rotor

source§

fn eq(&self, other: &Rotor) -> 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<Rotor> for Rotor

§

type Output = Rotor

The resulting type after applying the - operator.
source§

fn sub(self, r: Rotor) -> Rotor

Performs the - operation. Read more
source§

impl SubAssign<Rotor> for Rotor

source§

fn sub_assign(&mut self, r: Self)

Performs the -= operation. Read more
source§

impl Copy for Rotor

source§

impl StructuralPartialEq for Rotor

Auto Trait Implementations§

§

impl RefUnwindSafe for Rotor

§

impl Send for Rotor

§

impl Sync for Rotor

§

impl Unpin for Rotor

§

impl UnwindSafe for Rotor

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, 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.