[][src]Struct euclid::RigidTransform3D

#[repr(C)]
pub struct RigidTransform3D<T, Src, Dst> {
    pub rotation: Rotation3D<T, Src, Dst>,
    pub translation: Vector3D<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: Rotation3D<T, Src, Dst>translation: Vector3D<T, Dst>

Methods

impl<T, Src, Dst> RigidTransform3D<T, Src, Dst>[src]

pub const fn new(
    rotation: Rotation3D<T, Src, Dst>,
    translation: Vector3D<T, Dst>
) -> Self
[src]

Construct a new rigid transformation, where the rotation applies first

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

pub fn identity() -> Self[src]

Construct an identity transform

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

Construct a new rigid transformation, where the translation applies first

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

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

pub fn decompose_reversed(&self) -> (Vector3D<T, Src>, Rotation3D<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_transform<Dst2>(
    &self,
    other: &RigidTransform3D<T, Dst, Dst2>
) -> RigidTransform3D<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_transform<Src2>(
    &self,
    other: &RigidTransform3D<T, Src2, Src>
) -> RigidTransform3D<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) -> RigidTransform3D<T, Dst, Src>[src]

Inverts the transformation

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

pub fn to_untyped(&self) -> RigidTransform3D<T, UnknownUnit, UnknownUnit>[src]

Drop the units, preserving only the numeric value.

pub fn from_untyped(
    transform: &RigidTransform3D<T, UnknownUnit, UnknownUnit>
) -> Self
[src]

Tag a unitless value with units.

Trait Implementations

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

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

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

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

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

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

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

impl<T, Src, Dst> StructuralPartialEq for RigidTransform3D<T, Src, Dst>[src]

impl<T, Src, Dst> StructuralEq for RigidTransform3D<T, Src, Dst>[src]

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

Auto Trait Implementations

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

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

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

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

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

Blanket Implementations

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

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