Struct cgmath::Decomposed

source ·
pub struct Decomposed<V: VectorSpace, R> {
    pub scale: V::Scalar,
    pub rot: R,
    pub disp: V,
}
Expand description

A generic transformation consisting of a rotation, displacement vector and scale amount.

Fields§

§scale: V::Scalar§rot: R§disp: V

Trait Implementations§

source§

impl<S, R, E: BaseFloat> ApproxEq for Decomposed<S, R>where S: ApproxEq<Epsilon = E> + VectorSpace, S::Scalar: ApproxEq<Epsilon = E>, R: ApproxEq<Epsilon = E>,

§

type Epsilon = E

Used for specifying relative comparisons.
source§

fn default_epsilon() -> E

The default tolerance to use when testing values that are close together. Read more
source§

fn default_max_relative() -> E

The default relative tolerance for testing values that are far-apart. Read more
source§

fn default_max_ulps() -> u32

The default ULPs to tolerate when testing values that are far-apart. Read more
source§

fn relative_eq(&self, other: &Self, epsilon: E, max_relative: E) -> bool

A test for equality that uses a relative comparison if the values are far apart.
source§

fn ulps_eq(&self, other: &Self, epsilon: E, max_ulps: u32) -> bool

A test for equality that uses units in the last place (ULP) if the values are far apart.
source§

fn relative_ne( &self, other: &Self, epsilon: Self::Epsilon, max_relative: Self::Epsilon ) -> bool

The inverse of ApproxEq::relative_eq.
source§

fn ulps_ne(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool

The inverse of ApproxEq::ulps_eq.
source§

impl<V: Clone + VectorSpace, R: Clone> Clone for Decomposed<V, R>where V::Scalar: Clone,

source§

fn clone(&self) -> Decomposed<V, R>

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<V: Debug + VectorSpace, R: Debug> Debug for Decomposed<V, R>where V::Scalar: Debug,

source§

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

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

impl<S: BaseFloat, R: Rotation2<S>> From<Decomposed<Vector2<S>, R>> for Matrix3<S>

source§

fn from(dec: Decomposed<Vector2<S>, R>) -> Matrix3<S>

Converts to this type from the input type.
source§

impl<S: BaseFloat, R: Rotation3<S>> From<Decomposed<Vector3<S>, R>> for Matrix4<S>

source§

fn from(dec: Decomposed<Vector3<S>, R>) -> Matrix4<S>

Converts to this type from the input type.
source§

impl<P: EuclideanSpace, R: Rotation<P>> Transform<P> for Decomposed<P::Diff, R>where P::Scalar: BaseFloat, P::Diff: VectorSpace,

source§

fn one() -> Decomposed<P::Diff, R>

Create an identity transformation. That is, a transformation which does nothing.
source§

fn look_at(eye: P, center: P, up: P::Diff) -> Decomposed<P::Diff, R>

Create a transformation that rotates a vector to look at center from eye, using up for orientation.
source§

fn transform_vector(&self, vec: P::Diff) -> P::Diff

Transform a vector using this transform.
source§

fn transform_point(&self, point: P) -> P

Transform a point using this transform.
source§

fn concat(&self, other: &Decomposed<P::Diff, R>) -> Decomposed<P::Diff, R>

Combine this transform with another, yielding a new transformation which has the effects of both.
source§

fn inverse_transform(&self) -> Option<Decomposed<P::Diff, R>>

Create a transform that “un-does” this one.
source§

fn concat_self(&mut self, other: &Self)

Combine this transform with another, in-place.
source§

impl<V: Copy + VectorSpace, R: Copy> Copy for Decomposed<V, R>where V::Scalar: Copy,

source§

impl<S: BaseFloat, R: Rotation2<S>> Transform2<S> for Decomposed<Vector2<S>, R>

source§

impl<S: BaseFloat, R: Rotation3<S>> Transform3<S> for Decomposed<Vector3<S>, R>

Auto Trait Implementations§

§

impl<V, R> RefUnwindSafe for Decomposed<V, R>where R: RefUnwindSafe, V: RefUnwindSafe, <V as VectorSpace>::Scalar: RefUnwindSafe,

§

impl<V, R> Send for Decomposed<V, R>where R: Send, V: Send, <V as VectorSpace>::Scalar: Send,

§

impl<V, R> Sync for Decomposed<V, R>where R: Sync, V: Sync, <V as VectorSpace>::Scalar: Sync,

§

impl<V, R> Unpin for Decomposed<V, R>where R: Unpin, V: Unpin, <V as VectorSpace>::Scalar: Unpin,

§

impl<V, R> UnwindSafe for Decomposed<V, R>where R: UnwindSafe, V: UnwindSafe, <V as VectorSpace>::Scalar: UnwindSafe,

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,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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 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.
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.
source§

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

Performs the conversion.