pub struct Decomposed<V, R>where
V: VectorSpace,{
pub scale: <V as VectorSpace>::Scalar,
pub rot: R,
pub disp: V,
}Expand description
A generic transformation consisting of a rotation, displacement vector and scale amount.
Fields§
§scale: <V as VectorSpace>::Scalar§rot: R§disp: VTrait Implementations§
Source§impl<S, R, E> AbsDiffEq for Decomposed<S, R>where
S: VectorSpace + AbsDiffEq<Epsilon = E>,
E: BaseFloat,
<S as VectorSpace>::Scalar: AbsDiffEq<Epsilon = E>,
R: AbsDiffEq<Epsilon = E>,
impl<S, R, E> AbsDiffEq for Decomposed<S, R>where
S: VectorSpace + AbsDiffEq<Epsilon = E>,
E: BaseFloat,
<S as VectorSpace>::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: &Decomposed<S, R>, epsilon: E) -> bool
fn abs_diff_eq(&self, other: &Decomposed<S, R>, 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, R> Clone for Decomposed<V, R>
impl<V, R> Clone for Decomposed<V, R>
Source§fn clone(&self) -> Decomposed<V, R>
fn clone(&self) -> Decomposed<V, R>
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<V, R> Debug for Decomposed<V, R>
impl<V, R> Debug for Decomposed<V, R>
Source§impl<'a, S, R> Deserialize<'a> for Decomposed<S, R>where
S: VectorSpace + Deserialize<'a>,
<S as VectorSpace>::Scalar: Deserialize<'a>,
R: Deserialize<'a>,
impl<'a, S, R> Deserialize<'a> for Decomposed<S, R>where
S: VectorSpace + Deserialize<'a>,
<S as VectorSpace>::Scalar: Deserialize<'a>,
R: Deserialize<'a>,
Source§fn deserialize<D>(
deserializer: D,
) -> Result<Decomposed<S, R>, <D as Deserializer<'a>>::Error>where
D: Deserializer<'a>,
fn deserialize<D>(
deserializer: D,
) -> Result<Decomposed<S, R>, <D as Deserializer<'a>>::Error>where
D: Deserializer<'a>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<P, R> Mul for Decomposed<<P as EuclideanSpace>::Diff, R>where
P: EuclideanSpace,
R: Rotation<Space = P>,
<P as EuclideanSpace>::Scalar: BaseFloat,
<P as EuclideanSpace>::Diff: VectorSpace,
impl<P, R> Mul for Decomposed<<P as EuclideanSpace>::Diff, R>where
P: EuclideanSpace,
R: Rotation<Space = P>,
<P as EuclideanSpace>::Scalar: BaseFloat,
<P as EuclideanSpace>::Diff: VectorSpace,
Source§fn mul(
self,
rhs: Decomposed<<P as EuclideanSpace>::Diff, R>,
) -> <Decomposed<<P as EuclideanSpace>::Diff, R> as Mul>::Output
fn mul( self, rhs: Decomposed<<P as EuclideanSpace>::Diff, R>, ) -> <Decomposed<<P as EuclideanSpace>::Diff, R> as Mul>::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.
Source§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, R> One for Decomposed<<P as EuclideanSpace>::Diff, R>
impl<P, R> One for Decomposed<<P as EuclideanSpace>::Diff, R>
Source§fn one() -> Decomposed<<P as EuclideanSpace>::Diff, R>
fn one() -> Decomposed<<P as EuclideanSpace>::Diff, R>
Source§impl<V, R> PartialEq for Decomposed<V, R>
impl<V, R> PartialEq for Decomposed<V, R>
Source§impl<S, R, E> RelativeEq for Decomposed<S, R>where
S: VectorSpace + RelativeEq<Epsilon = E>,
E: BaseFloat,
<S as VectorSpace>::Scalar: RelativeEq<Epsilon = E>,
R: RelativeEq<Epsilon = E>,
impl<S, R, E> RelativeEq for Decomposed<S, R>where
S: VectorSpace + RelativeEq<Epsilon = E>,
E: BaseFloat,
<S as VectorSpace>::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: &Decomposed<S, R>,
epsilon: E,
max_relative: E,
) -> bool
fn relative_eq( &self, other: &Decomposed<S, R>, 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<V, R> Serialize for Decomposed<V, R>
impl<V, R> Serialize for Decomposed<V, R>
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl<P, R> Transform<P> for Decomposed<<P as EuclideanSpace>::Diff, R>where
P: EuclideanSpace,
R: Rotation<Space = P>,
<P as EuclideanSpace>::Scalar: BaseFloat,
<P as EuclideanSpace>::Diff: VectorSpace,
impl<P, R> Transform<P> for Decomposed<<P as EuclideanSpace>::Diff, R>where
P: EuclideanSpace,
R: Rotation<Space = P>,
<P as EuclideanSpace>::Scalar: BaseFloat,
<P as EuclideanSpace>::Diff: VectorSpace,
Source§fn look_at(
eye: P,
center: P,
up: <P as EuclideanSpace>::Diff,
) -> Decomposed<<P as EuclideanSpace>::Diff, R>
fn look_at( eye: P, center: P, up: <P as EuclideanSpace>::Diff, ) -> Decomposed<<P as EuclideanSpace>::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 as EuclideanSpace>::Diff,
) -> Decomposed<<P as EuclideanSpace>::Diff, R>
fn look_at_lh( eye: P, center: P, up: <P as EuclideanSpace>::Diff, ) -> Decomposed<<P as EuclideanSpace>::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 as EuclideanSpace>::Diff,
) -> Decomposed<<P as EuclideanSpace>::Diff, R>
fn look_at_rh( eye: P, center: P, up: <P as EuclideanSpace>::Diff, ) -> Decomposed<<P as EuclideanSpace>::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 as EuclideanSpace>::Diff,
) -> <P as EuclideanSpace>::Diff
fn transform_vector( &self, vec: <P as EuclideanSpace>::Diff, ) -> <P as EuclideanSpace>::Diff
Transform a vector using this transform.
Source§fn inverse_transform_vector(
&self,
vec: <P as EuclideanSpace>::Diff,
) -> Option<<P as EuclideanSpace>::Diff>
fn inverse_transform_vector( &self, vec: <P as EuclideanSpace>::Diff, ) -> Option<<P as EuclideanSpace>::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 as EuclideanSpace>::Diff, R>,
) -> Decomposed<<P as EuclideanSpace>::Diff, R>
fn concat( &self, other: &Decomposed<<P as EuclideanSpace>::Diff, R>, ) -> Decomposed<<P as EuclideanSpace>::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 as EuclideanSpace>::Diff, R>>
fn inverse_transform( &self, ) -> Option<Decomposed<<P as EuclideanSpace>::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, R> Transform2 for Decomposed<Vector2<S>, R>
impl<S, R> Transform2 for Decomposed<Vector2<S>, R>
Source§impl<S, R> Transform3 for Decomposed<Vector3<S>, R>
impl<S, R> Transform3 for Decomposed<Vector3<S>, R>
Source§impl<S, R, E> UlpsEq for Decomposed<S, R>where
S: VectorSpace + UlpsEq<Epsilon = E>,
E: BaseFloat,
<S as VectorSpace>::Scalar: UlpsEq<Epsilon = E>,
R: UlpsEq<Epsilon = E>,
impl<S, R, E> UlpsEq for Decomposed<S, R>where
S: VectorSpace + UlpsEq<Epsilon = E>,
E: BaseFloat,
<S as VectorSpace>::Scalar: UlpsEq<Epsilon = E>,
R: UlpsEq<Epsilon = E>,
impl<V, R> Copy for Decomposed<V, R>
impl<V, R> StructuralPartialEq for Decomposed<V, R>where
V: VectorSpace,
Auto Trait Implementations§
impl<V, R> Freeze for Decomposed<V, R>
impl<V, R> RefUnwindSafe for Decomposed<V, R>
impl<V, R> Send for Decomposed<V, R>
impl<V, R> Sync for Decomposed<V, R>
impl<V, R> Unpin for Decomposed<V, R>
impl<V, R> UnwindSafe for Decomposed<V, R>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more