[][src]Struct gee::Transform

#[repr(C)]
pub struct Transform<T> { pub m11: T, pub m12: T, pub m21: T, pub m22: T, pub m31: T, pub m32: T, }

Fields

m11: Tm12: Tm21: Tm22: Tm31: Tm32: T

Methods

impl<T> Transform<T>
[src]

pub fn row_major(m11: T, m12: T, m21: T, m22: T, m31: T, m32: T) -> Self
[src]

impl<T: Zero> Transform<T>
[src]

pub fn create_scale(x: T, y: T) -> Self
[src]

impl<T: Float> Transform<T>
[src]

pub fn create_rotation(theta: T) -> Self
[src]

impl<T: One + Zero> Transform<T>
[src]

pub fn identity() -> Self
[src]

pub fn create_translation(x: T, y: T) -> Self
[src]

impl<T: Copy> Transform<T>
[src]

pub fn transform_point<U>(
    &self,
    point: &Point<U>
) -> Point<<<U::Output as Add>::Output as Add<T>>::Output> where
    U: Mul<T> + Copy,
    U::Output: Add,
    <U::Output as Add>::Output: Add<T>, 
[src]

pub fn transform_vector<U>(
    &self,
    vector: &Vector<U>
) -> Vector<<U::Output as Add>::Output> where
    U: Mul<T> + Copy,
    U::Output: Add
[src]

pub fn transform_rect<U>(
    &self,
    rect: &Rect<U>
) -> Rect<<<U::Output as Add>::Output as Add<T>>::Output> where
    U: Mul<T> + Copy,
    U::Output: Add,
    <U::Output as Add>::Output: Add<T>,
    <<U::Output as Add>::Output as Add<T>>::Output: Copy + PartialOrd + Zero
[src]

pub fn post_mul<U>(
    &self,
    mat: &Transform<U>
) -> Transform<<T::Output as Add>::Output> where
    U: Copy,
    T: Mul<U>,
    T::Output: Add,
    <T::Output as Add>::Output: Add<U, Output = <T::Output as Add>::Output>, 
[src]

pub fn post_translate<U>(
    &self,
    vec: Vector<U>
) -> Transform<<T::Output as Add>::Output> where
    U: Copy + Zero + One,
    T: Mul<U>,
    T::Output: Add,
    <T::Output as Add>::Output: Add<U, Output = <T::Output as Add>::Output>, 
[src]

pub fn post_scale<U>(&self, x: U, y: U) -> Transform<<T::Output as Add>::Output> where
    U: Copy + Zero,
    T: Mul<U>,
    T::Output: Add,
    <T::Output as Add>::Output: Add<U, Output = <T::Output as Add>::Output>, 
[src]

pub fn post_rotate<U: Float>(
    &self,
    theta: U
) -> Transform<<T::Output as Add>::Output> where
    T: Mul<U>,
    T::Output: Add,
    <T::Output as Add>::Output: Add<U, Output = <T::Output as Add>::Output>, 
[src]

Trait Implementations

impl<T: PartialEq> PartialEq<Transform<T>> for Transform<T>
[src]

impl<T: Eq> Eq for Transform<T>
[src]

impl<T: PartialOrd> PartialOrd<Transform<T>> for Transform<T>
[src]

impl<T: Ord> Ord for Transform<T>
[src]

fn max(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl<T: Clone> Clone for Transform<T>
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<T: One + Zero> Default for Transform<T>
[src]

impl<T: Copy> Copy for Transform<T>
[src]

impl<T: Debug> Debug for Transform<T>
[src]

impl<T: Hash> Hash for Transform<T>
[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl<T> Send for Transform<T> where
    T: Send

impl<T> Sync for Transform<T> where
    T: Sync

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]