pub struct TransformUniform { /* private fields */ }
Implementations§
Source§impl TransformUniform
impl TransformUniform
pub fn new() -> Self
pub fn uniform(&self) -> Uniform<[[f32; 4]; 4]>
Sourcepub fn scale(&mut self, scale_factor: f32, scale_center: (f32, f32))
pub fn scale(&mut self, scale_factor: f32, scale_center: (f32, f32))
Multiply the current scale, in such a way that the given point remains stationary.
i.e. if v * self.uniform.value = scale_center
is true before the
scale is applied, it should also be true after.
pub fn pan(&mut self, vector: (f32, f32))
pub fn shear(&mut self, vector: (f32, f32))
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TransformUniform
impl !RefUnwindSafe for TransformUniform
impl !Send for TransformUniform
impl !Sync for TransformUniform
impl Unpin for TransformUniform
impl !UnwindSafe for TransformUniform
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