[][src]Struct euclid::TypedRigidTransform3D

#[repr(C)]
pub struct TypedRigidTransform3D<T, Src, Dst> {
    pub rotation: TypedRotation3D<T, Src, Dst>,
    pub translation: TypedVector3D<T, Dst>,
}

A rigid transformation. All lengths are preserved under such a transformation.

Internally, this is a rotation and a translation, with the rotation applied first (i.e. Rotation * Translation, in row-vector notation)

This can be more efficient to use over full matrices, especially if you have to deal with the decomposed quantities often.

Fields

rotation: TypedRotation3D<T, Src, Dst>translation: TypedVector3D<T, Dst>

Methods

impl<T: Float + ApproxEq<T>, Src, Dst> TypedRigidTransform3D<T, Src, Dst>[src]

pub fn new(
    rotation: TypedRotation3D<T, Src, Dst>,
    translation: TypedVector3D<T, Dst>
) -> Self
[src]

Construct a new rigid transformation, where the rotation applies first

pub fn identity() -> Self[src]

Construct an identity transform

pub fn new_from_reversed(
    translation: TypedVector3D<T, Src>,
    rotation: TypedRotation3D<T, Src, Dst>
) -> Self
[src]

Construct a new rigid transformation, where the translation applies first

pub fn from_rotation(rotation: TypedRotation3D<T, Src, Dst>) -> Self[src]

pub fn from_translation(translation: TypedVector3D<T, Dst>) -> Self[src]

pub fn decompose_reversed(
    &self
) -> (TypedVector3D<T, Src>, TypedRotation3D<T, Src, Dst>)
[src]

Decompose this into a translation and an rotation to be applied in the opposite order

i.e., the translation is applied first

pub fn post_mul<Dst2>(
    &self,
    other: &TypedRigidTransform3D<T, Dst, Dst2>
) -> TypedRigidTransform3D<T, Src, Dst2>
[src]

Returns the multiplication of the two transforms such that other's transformation applies after self's transformation.

i.e., this produces self * other in row-vector notation

pub fn pre_mul<Src2>(
    &self,
    other: &TypedRigidTransform3D<T, Src2, Src>
) -> TypedRigidTransform3D<T, Src2, Dst>
[src]

Returns the multiplication of the two transforms such that self's transformation applies after other's transformation.

i.e., this produces other * self in row-vector notation

pub fn inverse(&self) -> TypedRigidTransform3D<T, Dst, Src>[src]

Inverts the transformation

pub fn to_transform(&self) -> TypedTransform3D<T, Src, Dst> where
    T: Trig
[src]

Trait Implementations

impl<T: PartialEq, Src: PartialEq, Dst: PartialEq> PartialEq<TypedRigidTransform3D<T, Src, Dst>> for TypedRigidTransform3D<T, Src, Dst>[src]

impl<T: Eq, Src: Eq, Dst: Eq> Eq for TypedRigidTransform3D<T, Src, Dst>[src]

impl<T: Hash, Src: Hash, Dst: Hash> Hash for TypedRigidTransform3D<T, Src, Dst>[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl<T: Debug, Src: Debug, Dst: Debug> Debug for TypedRigidTransform3D<T, Src, Dst>[src]

impl<T: Copy, Src: Copy, Dst: Copy> Copy for TypedRigidTransform3D<T, Src, Dst>[src]

impl<T: Float + ApproxEq<T>, Src, Dst> From<TypedRotation3D<T, Src, Dst>> for TypedRigidTransform3D<T, Src, Dst>[src]

impl<T: Float + ApproxEq<T>, Src, Dst> From<TypedVector3D<T, Dst>> for TypedRigidTransform3D<T, Src, Dst>[src]

impl<T: Clone, Src: Clone, Dst: Clone> Clone for TypedRigidTransform3D<T, Src, Dst>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<T, Src, Dst> Unpin for TypedRigidTransform3D<T, Src, Dst> where
    Dst: Unpin,
    Src: Unpin,
    T: Unpin

impl<T, Src, Dst> Send for TypedRigidTransform3D<T, Src, Dst> where
    Dst: Send,
    Src: Send,
    T: Send

impl<T, Src, Dst> Sync for TypedRigidTransform3D<T, Src, Dst> where
    Dst: Sync,
    Src: Sync,
    T: Sync

impl<T, Src, Dst> UnwindSafe for TypedRigidTransform3D<T, Src, Dst> where
    Dst: UnwindSafe,
    Src: UnwindSafe,
    T: UnwindSafe

impl<T, Src, Dst> RefUnwindSafe for TypedRigidTransform3D<T, Src, Dst> where
    Dst: RefUnwindSafe,
    Src: RefUnwindSafe,
    T: RefUnwindSafe

Blanket Implementations

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.