pub struct Transformation { /* private fields */ }
Expand description
The matrix form of DTransformation
.
read more
Implementations§
Source§impl Transformation
impl Transformation
pub fn from_translation((tx, ty): (f32, f32)) -> Self
pub fn from_rotation(angle: f32) -> Self
Sourcepub fn rotate_translate(self, angle: f32, (tx, ty): (f32, f32)) -> Self
pub fn rotate_translate(self, angle: f32, (tx, ty): (f32, f32)) -> Self
Applies a translation followed by a rotation to self
.
Sourcepub fn translate_rotate(self, (tx, ty): (f32, f32), angle: f32) -> Self
pub fn translate_rotate(self, (tx, ty): (f32, f32), angle: f32) -> Self
Applies a rotation followed by a translation to self
.
pub fn transform_from_decomposed(self, other: &DTransformation) -> Self
pub fn is_empty(&self) -> bool
pub fn matrix(&self) -> &[[NotNan<f32>; 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 Default for Transformation
impl Default 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