pub struct Transform {
pub m: [f32; 6],
}Fields§
§m: [f32; 6]Implementations§
Source§impl Transform
impl Transform
pub const IDENTITY: Self
pub const fn translate(x: f32, y: f32) -> Self
pub const fn scale(sx: f32, sy: f32) -> Self
pub const fn uniform(s: f32) -> Self
pub fn rotate(radians: f32) -> Self
pub fn rotate_degrees(degrees: f32) -> Self
pub fn rotate_around(radians: f32, pivot: Point) -> Self
pub fn rotate_around_degrees(degrees: f32, pivot: Point) -> Self
pub fn then(self, next: Self) -> Self
pub fn apply(self, p: Point) -> Point
pub fn apply_vec(self, v: Vec2) -> Vec2
pub fn apply_rect_aabb(self, r: Rect) -> Rect
pub fn is_identity(self) -> bool
pub fn determinant(self) -> f32
pub fn max_scale(self) -> f32
pub fn similarity_scale(self) -> Option<f32>
pub fn inverse(self) -> Option<Self>
Trait Implementations§
impl Copy for Transform
impl StructuralPartialEq for Transform
Auto Trait Implementations§
impl Freeze for Transform
impl RefUnwindSafe for Transform
impl Send for Transform
impl Sync for Transform
impl Unpin for Transform
impl UnsafeUnpin for Transform
impl UnwindSafe for Transform
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