Rotor

Struct Rotor 

Source
pub struct Rotor<T>(pub T, pub T, pub T, pub T);
Expand description

TODO

Tuple Fields§

§0: T§1: T§2: T§3: T

Implementations§

Source§

impl<T> Rotor<T>

Source

pub fn new(x_rot: T, y_rot: T, z_rot: T, w_rot: T) -> Self

Trait Implementations§

Source§

impl<T> From<Axes<T>> for Rotor<T>
where T: Copy,

Source§

fn from(other: Axes<T>) -> Self

Converts to this type from the input type.
Source§

impl<T> From<Euler<T>> for Rotor<T>
where T: Construct<T> + Copy,

Source§

fn from(e: Euler<T>) -> Self

Converts to this type from the input type.
Source§

impl<T> From<Matrix3<T>> for Rotor<T>

Source§

fn from(_: Matrix3<T>) -> Self

Converts to this type from the input type.
Source§

impl<T> From<Quaternion<T>> for Rotor<T>
where T: Construct<T> + Copy,

Source§

fn from(q: Quaternion<T>) -> Self

Converts to this type from the input type.
Source§

impl<T> From<Rotor<T>> for Axes<T>
where T: Mul<T, Output = T> + Div<T, Output = T> + F32Fmt + Add<T, Output = T> + Copy,

Source§

fn from(r: Rotor<T>) -> Self

Converts to this type from the input type.
Source§

impl<T> From<Rotor<T>> for Euler<T>
where T: Construct<T> + Copy,

Source§

fn from(r: Rotor<T>) -> Self

Converts to this type from the input type.
Source§

impl<T> From<Rotor<T>> for Matrix3<T>

Source§

fn from(_: Rotor<T>) -> Matrix3<T>

Converts to this type from the input type.
Source§

impl<T> From<Rotor<T>> for Quaternion<T>
where T: Construct<T> + Copy,

Source§

fn from(r: Rotor<T>) -> Self

Converts to this type from the input type.
Source§

impl<T> One for Rotor<T>
where T: One + Zero,

Source§

const ONE: Self

Source§

impl<T> Rotation<T> for Rotor<T>
where T: Construct<T>,

Source§

fn look_at_xy(_pos: Vector3<T>, _look_at: Vector3<T>) -> Self

Generate a rotation for an object at a position look at a point. only uses the X and Y rotation axes to arrive at this result Z rotation axis Read more
Source§

fn look_at_xz(_pos: Vector3<T>, _look_at: Vector3<T>) -> Self

Generate a rotation for an object at a position look at a point. only uses the X and Z rotation axes to arrive at this result Z rotation axis Read more
Source§

fn look_at_yz(_pos: Vector3<T>, _look_at: Vector3<T>) -> Self

Generate a rotation for an object at a position look at a point. only uses the Z and Y rotation axes to arrive at this result Z rotation axis Read more
Source§

fn look_at_lock( _pos: Vector3<T>, _look_at: Vector3<T>, _locked_axis: Vector3<T>, ) -> Self

Generate a rotation for an object at a position look at a point. only uses the Z and Y rotation axes to arrive at this result Z rotation axis Read more
Source§

fn camera_look_at_xy(pos: Vector3<T>, look_at: Vector3<T>) -> Self

Camera Objects look along the -Z axis so the look_at function for a camera object needs to be modified a little. flipping the pos and the look_at should do the trick. TODO: finish comments watch out bc z is reversed and things may get wonky Read more
Source§

fn camera_look_at_xz(pos: Vector3<T>, look_at: Vector3<T>) -> Self

Source§

fn camera_look_at_yz(pos: Vector3<T>, look_at: Vector3<T>) -> Self

Source§

fn camera_look_at_lock( pos: Vector3<T>, look_at: Vector3<T>, locked_axis: Vector3<T>, ) -> Self

Source§

const X_AXIS: Vector3<T> = _

Source§

const Y_AXIS: Vector3<T> = _

Source§

const Z_AXIS: Vector3<T> = _

Source§

impl<T> Two for Rotor<T>
where T: Two + Zero,

Source§

const TWO: Self

Source§

impl<T> Zero for Rotor<T>
where T: Zero,

Source§

const ZERO: Self

Auto Trait Implementations§

§

impl<T> Freeze for Rotor<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for Rotor<T>
where T: RefUnwindSafe,

§

impl<T> Send for Rotor<T>
where T: Send,

§

impl<T> Sync for Rotor<T>
where T: Sync,

§

impl<T> Unpin for Rotor<T>
where T: Unpin,

§

impl<T> UnwindSafe for Rotor<T>
where T: UnwindSafe,

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

impl<T, A> Typed<T> for A
where T: Construct<A>,