Rot

Struct Rot 

Source
pub struct Rot<const N: usize, S: Field>(/* private fields */)
where
    (): RotDim<N>;

Implementations§

Source§

impl<const N: usize, S: Field> Rot<N, S>
where (): RotDim<N>,

Source

pub const IDENT: Self

Source

pub fn angle_axis( angle: S, axis: impl Maybe<<<() as RotDim<N>>::Inner<S> as RotInner<N, S>>::Axis>, ) -> Self

Source

pub fn from_to(from: impl Maybe<Nrml<N, S>>, to: impl Maybe<Nrml<N, S>>) -> Self

Source

pub unsafe fn from_w_bi_unchecked( w: S, bi: <<() as RotDim<N>>::Inner<S> as RotInner<N, S>>::Bivector, ) -> Self

§Safety

Safe when w*w + bi.dot(bi) =~ 1. That is, the created rotor is properly unitized.

Source

pub fn from_torq( torq: <<() as RotDim<N>>::Inner<S> as RotInner<N, S>>::Bivector, ) -> Self

Source

pub fn angle(self) -> S

Source

pub fn axis( self, ) -> Option<<<() as RotDim<N>>::Inner<S> as RotInner<N, S>>::Axis>

Source

pub fn axis_or_zero( self, ) -> <<() as RotDim<N>>::Inner<S> as RotInner<N, S>>::Bivector

Source

pub fn w(self) -> S

Source

pub fn bi(self) -> <<() as RotDim<N>>::Inner<S> as RotInner<N, S>>::Bivector

Source

pub fn to_torq( self, ) -> <<() as RotDim<N>>::Inner<S> as RotInner<N, S>>::Bivector

Source

pub fn part(self, t: S) -> Self

Source

pub fn inv(self) -> Self

Source

pub fn mat(self) -> Mat<N, N, S>

Source§

impl<S: Field> Rot<3, S>

Source

pub fn pitch(angle: S) -> Self

Source

pub fn yaw(angle: S) -> Self

Source

pub fn roll(angle: S) -> Self

Source

pub fn euler_angles(self) -> (S, S, S)

Trait Implementations§

Source§

impl<const N: usize, S: Field> Apl<Nrml<N, S>> for Rot<N, S>
where (): RotDim<N>,

Source§

type Output = Nrml<N, S>

Source§

fn apl(self, other: Nrml<N, S>) -> Self::Output

Source§

impl<const N: usize, S: Field> Apl<Vect<N, S>> for Rot<N, S>
where (): RotDim<N>,

Source§

type Output = Vect<N, S>

Source§

fn apl(self, other: Vect<N, S>) -> Self::Output

Source§

impl<const N: usize, S: Field> BefAft for Rot<N, S>
where (): RotDim<N>,

Source§

fn aft(self, other: Self) -> Self

Source§

fn bef(self, other: Self) -> Self

Source§

fn aft_assign(&mut self, other: Self)

Source§

fn bef_assign(&mut self, other: Self)

Source§

impl<const N: usize, S: Clone + Field> Clone for Rot<N, S>
where (): RotDim<N>,

Source§

fn clone(&self) -> Rot<N, S>

Returns a duplicate 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<const N: usize, S: Field + Debug> Debug for Rot<N, S>
where (): RotDim<N>, <<() as RotDim<N>>::Inner<S> as RotInner<N, S>>::Axis: Debug,

Source§

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

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

impl<const N: usize, S: Field> Default for Rot<N, S>
where (): RotDim<N>,

Source§

fn default() -> Self

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

impl<const N: usize, S: Field + Display> Display for Rot<N, S>
where (): RotDim<N>, <<() as RotDim<N>>::Inner<S> as RotInner<N, S>>::Bivector: Index<usize, Output = S>, <<() as RotDim<N>>::Inner<S> as RotInner<N, S>>::Axis: Display,

Source§

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

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

impl<const N: usize, S: Field> From<Rot<N, S>> for Rig<N, S>
where (): RotDim<N>,

Source§

fn from(value: Rot<N, S>) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize, S: Copy + Field> Copy for Rot<N, S>
where (): RotDim<N>,

Auto Trait Implementations§

§

impl<const N: usize, S> !Freeze for Rot<N, S>

§

impl<const N: usize, S> !RefUnwindSafe for Rot<N, S>

§

impl<const N: usize, S> !Send for Rot<N, S>

§

impl<const N: usize, S> !Sync for Rot<N, S>

§

impl<const N: usize, S> !Unpin for Rot<N, S>

§

impl<const N: usize, S> !UnwindSafe for Rot<N, S>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<A, T> Apl<T> for A
where T: Aplable<A>,

Source§

type Output = <T as Aplable<A>>::Output

Source§

fn apl(self, other: T) -> <A as Apl<T>>::Output

Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

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> Maybe<T> for T

Source§

fn maybe(self) -> Option<T>

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

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 T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

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

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.