pub struct Transformation { /* private fields */ }
Expand description
Proper rigid transformation in matrix form
Implementations§
Source§impl Transformation
impl Transformation
pub const fn empty() -> Self
pub fn from_translation((tx, ty): (fsize, fsize)) -> Self
pub fn from_rotation(angle: fsize) -> Self
pub fn from_dt(dt: &DTransformation) -> Self
pub fn rotate(self, angle: fsize) -> Self
pub fn translate(self, (tx, ty): (fsize, fsize)) -> Self
pub fn rotate_translate(self, angle: fsize, (tx, ty): (fsize, fsize)) -> Self
pub fn translate_rotate(self, (tx, ty): (fsize, fsize), angle: fsize) -> Self
pub fn transform(self, other: &Self) -> Self
pub fn transform_from_decomposed(self, other: &DTransformation) -> Self
pub fn inverse(self) -> Self
pub fn is_empty(&self) -> bool
pub fn matrix(&self) -> &[[NotNan<fsize>; 3]; 3]
pub fn decompose(&self) -> DTransformation
Trait Implementations§
Source§impl Clone for Transformation
impl Clone for Transformation
Source§fn clone(&self) -> Transformation
fn clone(&self) -> Transformation
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Transformation
impl Debug for Transformation
Source§impl<T> From<T> for Transformationwhere
T: Borrow<DTransformation>,
impl<T> From<T> for Transformationwhere
T: Borrow<DTransformation>,
Auto Trait Implementations§
impl Freeze for Transformation
impl RefUnwindSafe for Transformation
impl Send for Transformation
impl Sync for Transformation
impl Unpin for Transformation
impl UnwindSafe for Transformation
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more