Struct ultraviolet::transform::DIsometry3x4
source · #[repr(C)]pub struct DIsometry3x4 {
pub translation: DVec3x4,
pub rotation: DRotor3x4,
}
Expand description
An Isometry, aka a “rigid body transformation”.
Defined as the combination of a rotation and then a translation.
You may want to us this type over the corresponding type of homogeneous transformation matrix because it will be faster in most operations, especially composition and inverse.
Fields§
§translation: DVec3x4
§rotation: DRotor3x4
Implementations§
source§impl DIsometry3x4
impl DIsometry3x4
pub const fn new(translation: DVec3x4, rotation: DRotor3x4) -> Self
pub fn identity() -> Self
sourcepub fn prepend_rotation(&mut self, rotor: DRotor3x4)
pub fn prepend_rotation(&mut self, rotor: DRotor3x4)
Add a rotation before this isometry.
This means the rotation will only affect the rotational part of this isometry, not the translational part.
sourcepub fn append_rotation(&mut self, rotor: DRotor3x4)
pub fn append_rotation(&mut self, rotor: DRotor3x4)
Add a rotation after this isometry.
This means the rotation will affect both the rotational and translational parts of this isometry, since it is being applied ‘after’ this isometry’s translational part.
sourcepub fn prepend_translation(&mut self, translation: DVec3x4)
pub fn prepend_translation(&mut self, translation: DVec3x4)
Add a translation before this isometry.
Doing so will mean that the translation being added will get transformed by this isometry’s rotational part.
sourcepub fn append_translation(&mut self, translation: DVec3x4)
pub fn append_translation(&mut self, translation: DVec3x4)
Add a translation after this isometry.
Doing so will mean that the translation being added will not transformed by this isometry’s rotational part.
sourcepub fn prepend_isometry(&mut self, other: Self)
pub fn prepend_isometry(&mut self, other: Self)
Prepend transformation by another isometry.
This means that the transformation being applied will take place before this isometry, i.e. both its translation and rotation will be rotated by this isometry’s rotational part.
sourcepub fn append_isometry(&mut self, other: Self)
pub fn append_isometry(&mut self, other: Self)
Append transformation by another isometry.
This means that the transformation being applied will take place after this isometry, i.e. this isometry’s translation and rotation will be rotated by the other isometry’s rotational part.
pub fn inverse(&mut self)
pub fn inversed(self) -> Self
pub fn transform_vec(&self, vec: DVec3x4) -> DVec3x4
pub fn into_homogeneous_matrix(self) -> DMat4x4
Trait Implementations§
source§impl Add<DIsometry3x4> for DIsometry3x4
impl Add<DIsometry3x4> for DIsometry3x4
§type Output = DIsometry3x4
type Output = DIsometry3x4
+
operator.source§fn add(self, other: DIsometry3x4) -> DIsometry3x4
fn add(self, other: DIsometry3x4) -> DIsometry3x4
+
operation. Read moresource§impl Clone for DIsometry3x4
impl Clone for DIsometry3x4
source§fn clone(&self) -> DIsometry3x4
fn clone(&self) -> DIsometry3x4
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for DIsometry3x4
impl Debug for DIsometry3x4
source§impl Default for DIsometry3x4
impl Default for DIsometry3x4
source§impl Mul<DIsometry3x4> for DIsometry3x4
impl Mul<DIsometry3x4> for DIsometry3x4
§type Output = DIsometry3x4
type Output = DIsometry3x4
*
operator.source§fn mul(self, base: DIsometry3x4) -> DIsometry3x4
fn mul(self, base: DIsometry3x4) -> DIsometry3x4
*
operation. Read moresource§impl Mul<DIsometry3x4> for DRotor3x4
impl Mul<DIsometry3x4> for DRotor3x4
§type Output = DIsometry3x4
type Output = DIsometry3x4
*
operator.source§fn mul(self, iso: DIsometry3x4) -> DIsometry3x4
fn mul(self, iso: DIsometry3x4) -> DIsometry3x4
*
operation. Read moresource§impl Mul<DRotor3x4> for DIsometry3x4
impl Mul<DRotor3x4> for DIsometry3x4
§type Output = DIsometry3x4
type Output = DIsometry3x4
*
operator.source§impl Mul<DVec3x4> for DIsometry3x4
impl Mul<DVec3x4> for DIsometry3x4
source§impl Mul<f64x4> for DIsometry3x4
impl Mul<f64x4> for DIsometry3x4
§type Output = DIsometry3x4
type Output = DIsometry3x4
*
operator.source§impl PartialEq<DIsometry3x4> for DIsometry3x4
impl PartialEq<DIsometry3x4> for DIsometry3x4
source§fn eq(&self, other: &DIsometry3x4) -> bool
fn eq(&self, other: &DIsometry3x4) -> bool
self
and other
values to be equal, and is used
by ==
.