zng_layout::unit::euclid::default

Type Alias RigidTransform3D

pub type RigidTransform3D<T> = RigidTransform3D<T, UnknownUnit, UnknownUnit>;

Aliased Type§

struct RigidTransform3D<T> {
    pub rotation: Rotation3D<T, UnknownUnit, UnknownUnit>,
    pub translation: Vector3D<T, UnknownUnit>,
}

Fields§

§rotation: Rotation3D<T, UnknownUnit, UnknownUnit>§translation: Vector3D<T, UnknownUnit>

Implementations

§

impl<T, Src, Dst> RigidTransform3D<T, Src, Dst>

pub const fn new( rotation: Rotation3D<T, Src, Dst>, translation: Vector3D<T, Dst>, ) -> RigidTransform3D<T, Src, Dst>

Construct a new rigid transformation, where the rotation applies first

§

impl<T, Src, Dst> RigidTransform3D<T, Src, Dst>
where T: Copy,

pub fn cast_unit<Src2, Dst2>(&self) -> RigidTransform3D<T, Src2, Dst2>

§

impl<T, Src, Dst> RigidTransform3D<T, Src, Dst>
where T: Real + ApproxEq<T>,

pub fn identity() -> RigidTransform3D<T, Src, Dst>

Construct an identity transform

pub fn new_from_reversed( translation: Vector3D<T, Src>, rotation: Rotation3D<T, Src, Dst>, ) -> RigidTransform3D<T, Src, Dst>

Construct a new rigid transformation, where the translation applies first

pub fn from_rotation( rotation: Rotation3D<T, Src, Dst>, ) -> RigidTransform3D<T, Src, Dst>

pub fn from_translation( translation: Vector3D<T, Dst>, ) -> RigidTransform3D<T, Src, Dst>

pub fn decompose_reversed(&self) -> (Vector3D<T, Src>, Rotation3D<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

pub fn then<Dst2>( &self, other: &RigidTransform3D<T, Dst, Dst2>, ) -> RigidTransform3D<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

pub fn inverse(&self) -> RigidTransform3D<T, Dst, Src>

Inverts the transformation

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

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

Drop the units, preserving only the numeric value.

pub fn from_untyped( transform: &RigidTransform3D<T, UnknownUnit, UnknownUnit>, ) -> RigidTransform3D<T, Src, Dst>

Tag a unitless value with units.

Trait Implementations

§

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

§

fn clone(&self) -> RigidTransform3D<T, Src, Dst>

Returns a copy of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
§

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

§

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

Formats the value using the given formatter. Read more
§

impl<'de, T, Src, Dst> Deserialize<'de> for RigidTransform3D<T, Src, Dst>
where T: Deserialize<'de>, Src: Deserialize<'de>, Dst: Deserialize<'de>,

§

fn deserialize<__D>( __deserializer: __D, ) -> Result<RigidTransform3D<T, Src, Dst>, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl<T, Src, Dst> From<Rotation3D<T, Src, Dst>> for RigidTransform3D<T, Src, Dst>
where T: Real + ApproxEq<T>,

§

fn from(rot: Rotation3D<T, Src, Dst>) -> RigidTransform3D<T, Src, Dst>

Converts to this type from the input type.
§

impl<T, Src, Dst> From<Vector3D<T, Dst>> for RigidTransform3D<T, Src, Dst>
where T: Real + ApproxEq<T>,

§

fn from(t: Vector3D<T, Dst>) -> RigidTransform3D<T, Src, Dst>

Converts to this type from the input type.
§

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

§

fn hash<H>(&self, state: &mut H)
where H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

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

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

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

§

fn eq(&self, other: &RigidTransform3D<T, Src, Dst>) -> bool

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

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

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

§

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
§

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

§

fn zeroed() -> Self

§

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

§

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

§

impl<T, Src, Dst> Pod for RigidTransform3D<T, Src, Dst>
where T: Pod, Src: 'static, Dst: 'static,