Struct ultraviolet::transform::DIsometry2x2
source · [−]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: DVec2x2
rotation: DRotor2x2
Implementations
sourceimpl DIsometry2x2
impl DIsometry2x2
pub const fn new(translation: DVec2x2, rotation: DRotor2x2) -> Self
pub fn identity() -> Self
sourcepub fn prepend_rotation(&mut self, rotor: DRotor2x2)
pub fn prepend_rotation(&mut self, rotor: DRotor2x2)
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: DRotor2x2)
pub fn append_rotation(&mut self, rotor: DRotor2x2)
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: DVec2x2)
pub fn prepend_translation(&mut self, translation: DVec2x2)
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: DVec2x2)
pub fn append_translation(&mut self, translation: DVec2x2)
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: DVec2x2) -> DVec2x2
pub fn into_homogeneous_matrix(self) -> DMat3x2
Trait Implementations
sourceimpl Add<DIsometry2x2> for DIsometry2x2
impl Add<DIsometry2x2> for DIsometry2x2
type Output = Self
type Output = Self
The resulting type after applying the +
operator.
sourcefn add(self, other: DIsometry2x2) -> DIsometry2x2
fn add(self, other: DIsometry2x2) -> DIsometry2x2
Performs the +
operation. Read more
sourceimpl Clone for DIsometry2x2
impl Clone for DIsometry2x2
sourcefn clone(&self) -> DIsometry2x2
fn clone(&self) -> DIsometry2x2
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for DIsometry2x2
impl Debug for DIsometry2x2
sourceimpl Default for DIsometry2x2
impl Default for DIsometry2x2
sourceimpl Mul<DIsometry2x2> for DRotor2x2
impl Mul<DIsometry2x2> for DRotor2x2
type Output = DIsometry2x2
type Output = DIsometry2x2
The resulting type after applying the *
operator.
sourcefn mul(self, iso: DIsometry2x2) -> DIsometry2x2
fn mul(self, iso: DIsometry2x2) -> DIsometry2x2
Performs the *
operation. Read more
sourceimpl Mul<DIsometry2x2> for DIsometry2x2
impl Mul<DIsometry2x2> for DIsometry2x2
type Output = Self
type Output = Self
The resulting type after applying the *
operator.
sourcefn mul(self, base: DIsometry2x2) -> DIsometry2x2
fn mul(self, base: DIsometry2x2) -> DIsometry2x2
Performs the *
operation. Read more
sourceimpl Mul<DRotor2x2> for DIsometry2x2
impl Mul<DRotor2x2> for DIsometry2x2
type Output = DIsometry2x2
type Output = DIsometry2x2
The resulting type after applying the *
operator.
sourcefn mul(self, rotor: DRotor2x2) -> DIsometry2x2
fn mul(self, rotor: DRotor2x2) -> DIsometry2x2
Performs the *
operation. Read more
sourceimpl Mul<DVec2x2> for DIsometry2x2
impl Mul<DVec2x2> for DIsometry2x2
sourceimpl Mul<f64x2> for DIsometry2x2
impl Mul<f64x2> for DIsometry2x2
sourceimpl PartialEq<DIsometry2x2> for DIsometry2x2
impl PartialEq<DIsometry2x2> for DIsometry2x2
sourcefn eq(&self, other: &DIsometry2x2) -> bool
fn eq(&self, other: &DIsometry2x2) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &DIsometry2x2) -> bool
fn ne(&self, other: &DIsometry2x2) -> bool
This method tests for !=
.
impl Copy for DIsometry2x2
impl StructuralPartialEq for DIsometry2x2
Auto Trait Implementations
impl RefUnwindSafe for DIsometry2x2
impl Send for DIsometry2x2
impl Sync for DIsometry2x2
impl Unpin for DIsometry2x2
impl UnwindSafe for DIsometry2x2
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more