#[repr(C)]pub struct TypedRigidTransform3D<T, Src, Dst> {
pub rotation: TypedRotation3D<T, Src, Dst>,
pub translation: TypedVector3D<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: TypedRotation3D<T, Src, Dst>§translation: TypedVector3D<T, Dst>Implementations§
Source§impl<T: Float + ApproxEq<T>, Src, Dst> TypedRigidTransform3D<T, Src, Dst>
impl<T: Float + ApproxEq<T>, Src, Dst> TypedRigidTransform3D<T, Src, Dst>
Sourcepub fn new(
rotation: TypedRotation3D<T, Src, Dst>,
translation: TypedVector3D<T, Dst>,
) -> Self
pub fn new( rotation: TypedRotation3D<T, Src, Dst>, translation: TypedVector3D<T, Dst>, ) -> Self
Construct a new rigid transformation, where the rotation applies first
Sourcepub fn new_from_reversed(
translation: TypedVector3D<T, Src>,
rotation: TypedRotation3D<T, Src, Dst>,
) -> Self
pub fn new_from_reversed( translation: TypedVector3D<T, Src>, rotation: TypedRotation3D<T, Src, Dst>, ) -> Self
Construct a new rigid transformation, where the translation applies first
pub fn from_rotation(rotation: TypedRotation3D<T, Src, Dst>) -> Self
pub fn from_translation(translation: TypedVector3D<T, Dst>) -> Self
Sourcepub fn decompose_reversed(
&self,
) -> (TypedVector3D<T, Src>, TypedRotation3D<T, Src, Dst>)
pub fn decompose_reversed( &self, ) -> (TypedVector3D<T, Src>, TypedRotation3D<T, Src, Dst>)
Decompose this into a translation and an rotation to be applied in the opposite order
i.e., the translation is applied first
Sourcepub fn post_mul<Dst2>(
&self,
other: &TypedRigidTransform3D<T, Dst, Dst2>,
) -> TypedRigidTransform3D<T, Src, Dst2>
pub fn post_mul<Dst2>( &self, other: &TypedRigidTransform3D<T, Dst, Dst2>, ) -> TypedRigidTransform3D<T, Src, Dst2>
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
Sourcepub fn pre_mul<Src2>(
&self,
other: &TypedRigidTransform3D<T, Src2, Src>,
) -> TypedRigidTransform3D<T, Src2, Dst>
pub fn pre_mul<Src2>( &self, other: &TypedRigidTransform3D<T, Src2, Src>, ) -> TypedRigidTransform3D<T, Src2, Dst>
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
Sourcepub fn inverse(&self) -> TypedRigidTransform3D<T, Dst, Src>
pub fn inverse(&self) -> TypedRigidTransform3D<T, Dst, Src>
Inverts the transformation
pub fn to_transform(&self) -> TypedTransform3D<T, Src, Dst>where
T: Trig,
Trait Implementations§
Source§impl<T: Clone, Src: Clone, Dst: Clone> Clone for TypedRigidTransform3D<T, Src, Dst>
impl<T: Clone, Src: Clone, Dst: Clone> Clone for TypedRigidTransform3D<T, Src, Dst>
Source§fn clone(&self) -> TypedRigidTransform3D<T, Src, Dst>
fn clone(&self) -> TypedRigidTransform3D<T, Src, Dst>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'de, T, Src, Dst> Deserialize<'de> for TypedRigidTransform3D<T, Src, Dst>
impl<'de, T, Src, Dst> Deserialize<'de> for TypedRigidTransform3D<T, Src, Dst>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl<T: Float + ApproxEq<T>, Src, Dst> From<TypedRotation3D<T, Src, Dst>> for TypedRigidTransform3D<T, Src, Dst>
impl<T: Float + ApproxEq<T>, Src, Dst> From<TypedRotation3D<T, Src, Dst>> for TypedRigidTransform3D<T, Src, Dst>
Source§fn from(rot: TypedRotation3D<T, Src, Dst>) -> Self
fn from(rot: TypedRotation3D<T, Src, Dst>) -> Self
Source§impl<T: Float + ApproxEq<T>, Src, Dst> From<TypedVector3D<T, Dst>> for TypedRigidTransform3D<T, Src, Dst>
impl<T: Float + ApproxEq<T>, Src, Dst> From<TypedVector3D<T, Dst>> for TypedRigidTransform3D<T, Src, Dst>
Source§fn from(t: TypedVector3D<T, Dst>) -> Self
fn from(t: TypedVector3D<T, Dst>) -> Self
Source§impl<T: PartialEq, Src: PartialEq, Dst: PartialEq> PartialEq for TypedRigidTransform3D<T, Src, Dst>
impl<T: PartialEq, Src: PartialEq, Dst: PartialEq> PartialEq for TypedRigidTransform3D<T, Src, Dst>
Source§fn eq(&self, other: &TypedRigidTransform3D<T, Src, Dst>) -> bool
fn eq(&self, other: &TypedRigidTransform3D<T, Src, Dst>) -> bool
self and other values to be equal, and is used by ==.