Struct batbox_lapp::Transformed2d
source · pub struct Transformed2d<'a, F: Float, T: Transform2d<F> + ?Sized> {
pub inner: &'a T,
pub transform: mat3<F>,
}
Expand description
A reference to a 2d object with additional transformation applied
Fields§
§inner: &'a T
Reference to the actual object
transform: mat3<F>
Additional transformation
Implementations§
source§impl<'a, F: Float, T: Transform2d<F> + ?Sized> Transformed2d<'a, F, T>
impl<'a, F: Float, T: Transform2d<F> + ?Sized> Transformed2d<'a, F, T>
Trait Implementations§
source§impl<'a, F: Float, T: Transform2d<F> + ?Sized> Transform2d<F> for Transformed2d<'a, F, T>
impl<'a, F: Float, T: Transform2d<F> + ?Sized> Transform2d<F> for Transformed2d<'a, F, T>
source§fn bounding_quad(&self) -> Quad<F>
fn bounding_quad(&self) -> Quad<F>
Object’s bounding Quad
source§fn apply_transform(&mut self, transform: mat3<F>)
fn apply_transform(&mut self, transform: mat3<F>)
Apply transformation matrix to this object
Auto Trait Implementations§
impl<'a, F, T: ?Sized> RefUnwindSafe for Transformed2d<'a, F, T>where
F: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, F, T: ?Sized> Send for Transformed2d<'a, F, T>
impl<'a, F, T: ?Sized> Sync for Transformed2d<'a, F, T>
impl<'a, F, T: ?Sized> Unpin for Transformed2d<'a, F, T>where
F: Unpin,
impl<'a, F, T: ?Sized> UnwindSafe for Transformed2d<'a, F, T>where
F: UnwindSafe,
T: RefUnwindSafe,
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<F, T> Transform2dExt<F> for T
impl<F, T> Transform2dExt<F> for T
source§fn transform(self, transform: mat3<F>) -> Selfwhere
Self: Sized,
fn transform(self, transform: mat3<F>) -> Selfwhere
Self: Sized,
Apply transformation to the object, returning a modified value to allow chaining methods
source§fn align_bounding_box(self, alignment: vec2<F>) -> Selfwhere
Self: Sized,
fn align_bounding_box(self, alignment: vec2<F>) -> Selfwhere
Self: Sized,
Align bounding box of this object, making its origin located at (0, 0) Read more
source§fn rotate(self, angle: Angle<F>) -> Selfwhere
Self: Sized,
fn rotate(self, angle: Angle<F>) -> Selfwhere
Self: Sized,
Rotate object around (0, 0) by given angle
source§fn scale(self, factor: vec2<F>) -> Selfwhere
Self: Sized,
fn scale(self, factor: vec2<F>) -> Selfwhere
Self: Sized,
Scale object around (0, 0) by given factor
source§fn scale_uniform(self, factor: F) -> Selfwhere
Self: Sized,
fn scale_uniform(self, factor: F) -> Selfwhere
Self: Sized,
Scale object around (0, 0) by given factor uniformly along both axis
source§fn transformed(&self) -> Transformed2d<'_, F, Self>
fn transformed(&self) -> Transformed2d<'_, F, Self>
Create a reference to this object with additional transformation applied