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> AbsDiffEq<Decomposed<S, R>> for Decomposed<S, R>where S: AbsDiffEq<Epsilon = E> + VectorSpace, S::Scalar: AbsDiffEq<Epsilon = E>, R: AbsDiffEq<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 abs_diff_eq(&self, other: &Self, epsilon: E) -> bool

A test for equality that uses the absolute difference to compute the approximate equality of two numbers.
source§

fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool

The inverse of AbsDiffEq::abs_diff_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<Scalar = 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<Scalar = 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<Space = P>> Mul<Decomposed<<P as EuclideanSpace>::Diff, R>> for Decomposed<P::Diff, R>where P::Scalar: BaseFloat, P::Diff: VectorSpace,

source§

fn mul(self, rhs: Decomposed<P::Diff, R>) -> Self::Output

Multiplies the two transforms together. The result should be as if the two transforms were converted to matrices, then multiplied, then converted back with a (currently nonexistent) function that tries to convert a matrix into a Decomposed.

§

type Output = Decomposed<<P as EuclideanSpace>::Diff, R>

The resulting type after applying the * operator.
source§

impl<P: EuclideanSpace, R: Rotation<Space = P>> One for Decomposed<P::Diff, R>where P::Scalar: BaseFloat,

source§

fn one() -> Self

Returns the multiplicative identity element of Self, 1. Read more
source§

fn set_one(&mut self)

Sets self to the multiplicative identity element of Self, 1.
source§

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

source§

fn eq(&self, other: &Decomposed<V, R>) -> 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<S, R, E: BaseFloat> RelativeEq<Decomposed<S, R>> for Decomposed<S, R>where S: RelativeEq<Epsilon = E> + VectorSpace, S::Scalar: RelativeEq<Epsilon = E>, R: RelativeEq<Epsilon = E>,

source§

fn default_max_relative() -> E

The default relative tolerance for 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 relative_ne( &self, other: &Rhs, epsilon: Self::Epsilon, max_relative: Self::Epsilon ) -> bool

The inverse of RelativeEq::relative_eq.
source§

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

source§

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

👎Deprecated: Use look_at_rh or look_at_lh
Create a transformation that rotates a vector to look at center from eye, using up for orientation.
source§

fn look_at_lh(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 look_at_rh(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 inverse_transform_vector(&self, vec: P::Diff) -> Option<P::Diff>

Inverse 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<S: BaseFloat, R: Rotation2<Scalar = S>> Transform2 for Decomposed<Vector2<S>, R>

§

type Scalar = S

source§

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

§

type Scalar = S

source§

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

source§

fn default_max_ulps() -> u32

The default ULPs to tolerate when testing values that are far-apart. Read more
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 ulps_ne(&self, other: &Rhs, epsilon: Self::Epsilon, max_ulps: u32) -> bool

The inverse of UlpsEq::ulps_eq.
source§

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

source§

impl<V: VectorSpace, R> StructuralPartialEq for Decomposed<V, 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.