Struct ultraviolet::transform::Isometry2x4
source · #[repr(C)]pub struct Isometry2x4 {
pub translation: Vec2x4,
pub rotation: Rotor2x4,
}
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: Vec2x4
§rotation: Rotor2x4
Implementations§
source§impl Isometry2x4
impl Isometry2x4
pub const fn new(translation: Vec2x4, rotation: Rotor2x4) -> Self
pub fn identity() -> Self
sourcepub fn prepend_rotation(&mut self, rotor: Rotor2x4)
pub fn prepend_rotation(&mut self, rotor: Rotor2x4)
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: Rotor2x4)
pub fn append_rotation(&mut self, rotor: Rotor2x4)
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: Vec2x4)
pub fn prepend_translation(&mut self, translation: Vec2x4)
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: Vec2x4)
pub fn append_translation(&mut self, translation: Vec2x4)
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: Vec2x4) -> Vec2x4
pub fn into_homogeneous_matrix(self) -> Mat3x4
Trait Implementations§
source§impl Add<Isometry2x4> for Isometry2x4
impl Add<Isometry2x4> for Isometry2x4
§type Output = Isometry2x4
type Output = Isometry2x4
+
operator.source§fn add(self, other: Isometry2x4) -> Isometry2x4
fn add(self, other: Isometry2x4) -> Isometry2x4
+
operation. Read moresource§impl Clone for Isometry2x4
impl Clone for Isometry2x4
source§fn clone(&self) -> Isometry2x4
fn clone(&self) -> Isometry2x4
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for Isometry2x4
impl Debug for Isometry2x4
source§impl Default for Isometry2x4
impl Default for Isometry2x4
source§impl Mul<Isometry2x4> for Isometry2x4
impl Mul<Isometry2x4> for Isometry2x4
§type Output = Isometry2x4
type Output = Isometry2x4
*
operator.source§fn mul(self, base: Isometry2x4) -> Isometry2x4
fn mul(self, base: Isometry2x4) -> Isometry2x4
*
operation. Read moresource§impl Mul<Isometry2x4> for Rotor2x4
impl Mul<Isometry2x4> for Rotor2x4
§type Output = Isometry2x4
type Output = Isometry2x4
*
operator.source§fn mul(self, iso: Isometry2x4) -> Isometry2x4
fn mul(self, iso: Isometry2x4) -> Isometry2x4
*
operation. Read moresource§impl Mul<Rotor2x4> for Isometry2x4
impl Mul<Rotor2x4> for Isometry2x4
§type Output = Isometry2x4
type Output = Isometry2x4
*
operator.source§impl Mul<Vec2x4> for Isometry2x4
impl Mul<Vec2x4> for Isometry2x4
source§impl Mul<f32x4> for Isometry2x4
impl Mul<f32x4> for Isometry2x4
§type Output = Isometry2x4
type Output = Isometry2x4
*
operator.source§impl PartialEq<Isometry2x4> for Isometry2x4
impl PartialEq<Isometry2x4> for Isometry2x4
source§fn eq(&self, other: &Isometry2x4) -> bool
fn eq(&self, other: &Isometry2x4) -> bool
self
and other
values to be equal, and is used
by ==
.