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>,
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>,
source§fn default_epsilon() -> E
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
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
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,
impl<V: Clone + VectorSpace, R: Clone> Clone for Decomposed<V, R>where V::Scalar: Clone,
source§fn clone(&self) -> Decomposed<V, R>
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)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<V: Debug + VectorSpace, R: Debug> Debug for Decomposed<V, R>where
V::Scalar: Debug,
impl<V: Debug + VectorSpace, R: Debug> Debug for Decomposed<V, R>where V::Scalar: Debug,
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,
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
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>
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,
impl<P: EuclideanSpace, R: Rotation<Space = P>> One for Decomposed<P::Diff, R>where P::Scalar: BaseFloat,
source§impl<V: PartialEq + VectorSpace, R: PartialEq> PartialEq<Decomposed<V, R>> for Decomposed<V, R>where
V::Scalar: PartialEq,
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
fn eq(&self, other: &Decomposed<V, R>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.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>,
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
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
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
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,
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>
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>
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>
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
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>
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
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>
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>>
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)
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>
impl<S: BaseFloat, R: Rotation2<Scalar = S>> Transform2 for Decomposed<Vector2<S>, R>
source§impl<S: BaseFloat, R: Rotation3<Scalar = S>> Transform3 for Decomposed<Vector3<S>, R>
impl<S: BaseFloat, R: Rotation3<Scalar = S>> Transform3 for Decomposed<Vector3<S>, R>
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>,
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>,
impl<V: Copy + VectorSpace, R: Copy> Copy for Decomposed<V, R>where V::Scalar: Copy,
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more