Decomposed

Struct Decomposed 

Source
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: V

Trait 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>,

Source§

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: &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

The inverse of AbsDiffEq::abs_diff_eq.
Source§

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

Source§

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

Returns a duplicate of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

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

Source§

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

Formats the value using the given formatter. Read more
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>,

Source§

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<S, R> From<Decomposed<Vector2<S>, R>> for Matrix3<S>
where S: BaseFloat, R: Rotation2<Scalar = S>,

Source§

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

Converts to this type from the input type.
Source§

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

Source§

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

Converts to this type from the input type.
Source§

impl<P, R> Mul for Decomposed<<P as EuclideanSpace>::Diff, R>

Source§

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>

The resulting type after applying the * operator.
Source§

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

Source§

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

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§

fn is_one(&self) -> bool
where Self: PartialEq,

Returns true if self is equal to the multiplicative identity. Read more
Source§

impl<V, R> PartialEq for Decomposed<V, R>

Source§

fn eq(&self, other: &Decomposed<V, R>) -> bool

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

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<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

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

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<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,

Serialize this value into the given Serde serializer. Read more
Source§

impl<P, R> Transform<P> for Decomposed<<P as EuclideanSpace>::Diff, R>

Source§

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>

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>

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

Transform a vector using this transform.
Source§

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

Transform a point using this transform.
Source§

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>>

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

Source§

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

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>,

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: &Decomposed<S, R>, 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, R> Copy for Decomposed<V, R>
where V: Copy + VectorSpace, R: Copy, <V as VectorSpace>::Scalar: Copy,

Source§

impl<V, R> StructuralPartialEq for Decomposed<V, R>
where V: VectorSpace,

Auto Trait Implementations§

§

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

§

impl<V, R> RefUnwindSafe for Decomposed<V, R>

§

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

§

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

§

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

§

impl<V, R> UnwindSafe for Decomposed<V, R>

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

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> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> Downcast for T
where T: Any,

Source§

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>

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)

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)

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
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
§

impl<T, U> Into<U> for T
where U: From<T>,

§

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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> Tolerance for T
where T: AbsDiffEq<Epsilon = f64> + Debug,

Source§

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

The “distance” is less than TOLERANCE.
Source§

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

The “distance” is less than TOLERANCR2.
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

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

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

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

Source§

impl<T> WasmNotSendSync for T

Source§

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