Struct Euler

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

Rotations around the x y and z axes in radians radian = value/PI do not include PI

Tuple Fields§

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

Implementations§

Source§

impl<T> Euler<T>

Source

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

Trait Implementations§

Source§

impl<T> Add<T> for Euler<T>
where T: Add<T, Output = T> + Copy,

Source§

type Output = Euler<T>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: T) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> Add for Euler<T>
where T: Add<T, Output = T> + Copy,

Source§

type Output = Euler<T>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Euler<T>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T: Clone> Clone for Euler<T>

Source§

fn clone(&self) -> Euler<T>

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<T> Debug for Euler<T>
where T: Debug + Copy,

Source§

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

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

impl<T> Div<T> for Euler<T>
where T: Div<T, Output = T> + Copy,

Source§

type Output = Euler<T>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: T) -> Self::Output

Performs the / operation. Read more
Source§

impl<T> Div for Euler<T>
where T: Div<T, Output = T> + Copy,

Source§

type Output = Euler<T>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Euler<T>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T: F32Fmt> F32Fmt for Euler<T>

Source§

type F32Fmt = Euler<<T as F32Fmt>::F32Fmt>

Source§

fn intoF32Fmt(self) -> Self::F32Fmt

Source§

fn fromF32Fmt(f32_fmt: Self::F32Fmt) -> Self

Source§

fn sqrt(self) -> Self

Source§

fn cbrt(self) -> Self

Source§

fn f32_const_mul(self, constant: f32) -> Self

Source§

fn sin_mul(self, _mul_by: Self) -> Self
where Self: Mul<Self, Output = Self> + Sized,

Source§

fn cos_mul(self, _mul_by: Self) -> Self
where Self: Mul<Self, Output = Self> + Sized,

Source§

fn tan_mul(self, _mul_by: Self) -> Self
where Self: Mul<Self, Output = Self> + Sized,

Source§

fn asin_mul(self, _mul_by: Self) -> Self
where Self: Mul<Self, Output = Self> + Sized,

Source§

fn acos_mul(self, _mul_by: Self) -> Self
where Self: Mul<Self, Output = Self> + Sized,

Source§

fn atan_mul(self, _mul_by: Self) -> Self
where Self: Mul<Self, Output = Self> + Sized,

Source§

fn atan2_mul(self, _other: Self, _mul_by: Self) -> Self
where Self: Mul<Self, Output = Self> + Sized,

Source§

fn sinh_mul(self, _mul_by: Self) -> Self
where Self: Mul<Self, Output = Self> + Sized,

Source§

fn cosh_mul(self, _mul_by: Self) -> Self
where Self: Mul<Self, Output = Self> + Sized,

Source§

fn tanh_mul(self, _mul_by: Self) -> Self
where Self: Mul<Self, Output = Self> + Sized,

Source§

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

Source§

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

Converts to this type from the input type.
Source§

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

Source§

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

Converts to this type from the input type.
Source§

impl<T> From<Euler<T>> for Matrix3<T>

Source§

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

Converts to this type from the input type.
Source§

impl<T> From<Euler<T>> for Quaternion<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<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 Euler<T>

Source§

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

Converts to this type from the input type.
Source§

impl<T> From<Quaternion<T>> for Euler<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 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> Mul<T> for Euler<T>
where T: Mul<T, Output = T> + Copy,

Source§

type Output = Euler<T>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: T) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> Mul for Euler<T>
where T: Mul<T, Output = T> + Copy,

Source§

type Output = Euler<T>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Euler<T>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> Neg for Euler<T>
where T: Neg<Output = T> + Copy,

Source§

type Output = Euler<T>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<T> One for Euler<T>
where T: One,

Source§

const ONE: Self

Source§

impl<T> PartialEq for Euler<T>
where Self: Rem<T, Output = Self>, T: Add<T, Output = T> + One + PartialEq + Copy,

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T> Rem<T> for Euler<T>
where T: Rem<T, Output = T> + Copy,

Source§

type Output = Euler<T>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: T) -> Self::Output

Performs the % operation. Read more
Source§

impl<T> Rem for Euler<T>
where T: Rem<T, Output = T> + Copy,

Source§

type Output = Euler<T>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Euler<T>) -> Self::Output

Performs the % operation. Read more
Source§

impl<T> Rotation<T> for Euler<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> SignOps for Euler<T>

Source§

fn ptcopysign(self, _sign: Self) -> Self

Source§

fn ptsignum(self) -> i8

Source§

fn abs(self) -> Self

Source§

impl<T> Sub<T> for Euler<T>
where T: Sub<T, Output = T> + Copy,

Source§

type Output = Euler<T>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: T) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> Sub for Euler<T>
where T: Sub<T, Output = T> + Copy,

Source§

type Output = Euler<T>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Euler<T>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> Two for Euler<T>
where T: Two,

Source§

const TWO: Self

Source§

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

Source§

const ZERO: Self

Source§

impl<T> Construct<T> for Euler<T>
where T: Construct<T>,

Source§

impl<T: Copy> Copy for Euler<T>

Auto Trait Implementations§

§

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

§

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

§

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

§

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

§

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

§

impl<T> UnwindSafe for Euler<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> 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> 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, 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>,