Struct euclid::RigidTransform3D [−][src]
#[repr(C)]pub struct RigidTransform3D<T, Src, Dst> { pub rotation: Rotation3D<T, Src, Dst>, pub translation: Vector3D<T, Dst>, }
Expand description
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>
Implementations
impl<T, Src, Dst> RigidTransform3D<T, Src, Dst>
[src]
impl<T, Src, Dst> RigidTransform3D<T, Src, Dst>
[src]pub const fn new(
rotation: Rotation3D<T, Src, Dst>,
translation: Vector3D<T, Dst>
) -> Self
[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: Copy, Src, Dst> RigidTransform3D<T, Src, Dst>
[src]
impl<T: Copy, Src, Dst> RigidTransform3D<T, Src, Dst>
[src]pub fn cast_unit<Src2, Dst2>(&self) -> RigidTransform3D<T, Src2, Dst2>
[src]
impl<T: Float + ApproxEq<T>, Src, Dst> RigidTransform3D<T, Src, Dst>
[src]
impl<T: Float + ApproxEq<T>, Src, Dst> RigidTransform3D<T, Src, Dst>
[src]pub fn new_from_reversed(
translation: Vector3D<T, Src>,
rotation: Rotation3D<T, Src, Dst>
) -> Self
[src]
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]
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 then<Dst2>(
&self,
other: &RigidTransform3D<T, Dst, Dst2>
) -> RigidTransform3D<T, Src, Dst2>
[src]
pub fn then<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 inverse(&self) -> RigidTransform3D<T, Dst, Src>
[src]
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]
T: Trig,
pub fn to_untyped(&self) -> RigidTransform3D<T, UnknownUnit, UnknownUnit>
[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]
pub fn from_untyped(
transform: &RigidTransform3D<T, UnknownUnit, UnknownUnit>
) -> Self
[src]Tag a unitless value with units.
Trait Implementations
impl<T: Clone, Src: Clone, Dst: Clone> Clone for RigidTransform3D<T, Src, Dst>
[src]
impl<T: Clone, Src: Clone, Dst: Clone> Clone for RigidTransform3D<T, Src, Dst>
[src]fn clone(&self) -> RigidTransform3D<T, Src, Dst>
[src]
fn clone(&self) -> RigidTransform3D<T, Src, Dst>
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
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<Rotation3D<T, Src, Dst>> for RigidTransform3D<T, Src, Dst>
[src]fn from(rot: Rotation3D<T, Src, Dst>) -> Self
[src]
fn from(rot: Rotation3D<T, Src, Dst>) -> Self
[src]Performs the conversion.
impl<T: Float + ApproxEq<T>, Src, Dst> From<Vector3D<T, 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: PartialEq, Src: PartialEq, Dst: PartialEq> PartialEq<RigidTransform3D<T, Src, Dst>> for RigidTransform3D<T, Src, Dst>
[src]
impl<T: PartialEq, Src: PartialEq, Dst: PartialEq> PartialEq<RigidTransform3D<T, Src, Dst>> for RigidTransform3D<T, Src, Dst>
[src]fn eq(&self, other: &RigidTransform3D<T, Src, Dst>) -> bool
[src]
fn eq(&self, other: &RigidTransform3D<T, Src, Dst>) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &RigidTransform3D<T, Src, Dst>) -> bool
[src]
fn ne(&self, other: &RigidTransform3D<T, Src, Dst>) -> bool
[src]This method tests for !=
.
impl<T: Copy, Src: Copy, Dst: Copy> Copy for RigidTransform3D<T, Src, Dst>
[src]
impl<T: Eq, Src: Eq, Dst: Eq> Eq for RigidTransform3D<T, Src, Dst>
[src]
impl<T, Src, Dst> StructuralEq for RigidTransform3D<T, Src, Dst>
[src]
impl<T, Src, Dst> StructuralPartialEq for RigidTransform3D<T, Src, Dst>
[src]
Auto Trait Implementations
impl<T, Src, Dst> RefUnwindSafe for RigidTransform3D<T, Src, Dst> where
Dst: RefUnwindSafe,
Src: RefUnwindSafe,
T: RefUnwindSafe,
Dst: RefUnwindSafe,
Src: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, Src, Dst> Send for RigidTransform3D<T, Src, Dst> where
Dst: Send,
Src: Send,
T: Send,
Dst: Send,
Src: Send,
T: Send,
impl<T, Src, Dst> Sync for RigidTransform3D<T, Src, Dst> where
Dst: Sync,
Src: Sync,
T: Sync,
Dst: Sync,
Src: Sync,
T: Sync,
impl<T, Src, Dst> Unpin for RigidTransform3D<T, Src, Dst> where
Dst: Unpin,
Src: Unpin,
T: Unpin,
Dst: Unpin,
Src: Unpin,
T: Unpin,
impl<T, Src, Dst> UnwindSafe for RigidTransform3D<T, Src, Dst> where
Dst: UnwindSafe,
Src: UnwindSafe,
T: UnwindSafe,
Dst: UnwindSafe,
Src: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more