#[repr(C)]pub struct LinearTransformation {
pub x: Vector,
pub y: Vector,
}Fields§
§x: Vector§y: VectorImplementations§
§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§
§impl Clone for LinearTransformation
impl Clone for LinearTransformation
§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 more§impl Debug for LinearTransformation
impl Debug for LinearTransformation
§impl PartialEq<LinearTransformation> for LinearTransformation
impl PartialEq<LinearTransformation> for LinearTransformation
§fn eq(&self, other: &LinearTransformation) -> bool
fn eq(&self, other: &LinearTransformation) -> bool
This method tests for
self and other values to be equal, and is used
by ==.§impl Transformation for LinearTransformation
impl Transformation for LinearTransformation
§fn transform_point(&self, p: Point) -> Point
fn transform_point(&self, p: Point) -> Point
Applies
self to the given point.§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 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