#[repr(C)]pub struct LinearTransformation {
pub x: Vector,
pub y: Vector,
}
Fields§
§x: Vector
§y: Vector
Implementations§
Source§impl LinearTransformation
impl LinearTransformation
pub fn new(x: Vector, y: Vector) -> LinearTransformation
pub fn identity() -> LinearTransformation
pub fn scaling(v: Vector) -> LinearTransformation
pub fn uniform_scaling(k: f64) -> LinearTransformation
pub fn scale(self, v: Vector) -> LinearTransformation
pub fn uniform_scale(self, k: f64) -> LinearTransformation
pub fn compose(self, other: LinearTransformation) -> LinearTransformation
Trait Implementations§
Source§impl Clone for LinearTransformation
impl Clone for LinearTransformation
Source§fn clone(&self) -> LinearTransformation
fn clone(&self) -> LinearTransformation
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 LinearTransformation
impl Debug for LinearTransformation
Source§impl PartialEq for LinearTransformation
impl PartialEq for LinearTransformation
Source§impl Transformation for LinearTransformation
impl Transformation for LinearTransformation
Source§fn transform_point(&self, p: Point) -> Point
fn transform_point(&self, p: Point) -> Point
Applies
self
to the given point
.Source§fn transform_vector(&self, v: Vector) -> Vector
fn transform_vector(&self, v: Vector) -> Vector
Applies
self
to the given vector
.impl Copy for LinearTransformation
impl StructuralPartialEq for LinearTransformation
Auto Trait Implementations§
impl Freeze for LinearTransformation
impl RefUnwindSafe for LinearTransformation
impl Send for LinearTransformation
impl Sync for LinearTransformation
impl Unpin for LinearTransformation
impl UnwindSafe for LinearTransformation
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