pub struct CoordTransform { /* private fields */ }Expand description
A 2D affine transformation stored as a 2×3 matrix.
The transformation is applied as:
x' = a*x + b*y + c
y' = d*x + e*y + fwhere matrix = [a, b, c, d, e, f].
Implementations§
Source§impl CoordTransform
impl CoordTransform
Sourcepub fn compose(self, other: &CoordTransform) -> Self
pub fn compose(self, other: &CoordTransform) -> Self
Composes self followed by other into a single transform.
The result applies self first, then other.
Mathematically this is other_matrix × self_matrix because affine
transforms are applied right-to-left in column-vector notation.
Trait Implementations§
Source§impl Clone for CoordTransform
impl Clone for CoordTransform
Source§fn clone(&self) -> CoordTransform
fn clone(&self) -> CoordTransform
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CoordTransform
Source§impl Debug for CoordTransform
impl Debug for CoordTransform
Source§impl PartialEq for CoordTransform
impl PartialEq for CoordTransform
impl StructuralPartialEq for CoordTransform
Auto Trait Implementations§
impl Freeze for CoordTransform
impl RefUnwindSafe for CoordTransform
impl Send for CoordTransform
impl Sync for CoordTransform
impl Unpin for CoordTransform
impl UnsafeUnpin for CoordTransform
impl UnwindSafe for CoordTransform
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more