Struct euclid::matrix2d::Matrix2D [] [src]

pub struct Matrix2D<T> {
    pub m11: T,
    pub m12: T,
    pub m21: T,
    pub m22: T,
    pub m31: T,
    pub m32: T,
}

Fields

m11: T m12: T m21: T m22: T m31: T m32: T

Methods

impl<T: Add<T, Output=T> + Copy + Clone + Mul<T, Output=T> + One + PartialOrd + Sub<T, Output=T> + Zero> Matrix2D<T>
[src]

fn new(m11: T, m12: T, m21: T, m22: T, m31: T, m32: T) -> Matrix2D<T>

fn mul(&self, m: &Matrix2D<T>) -> Matrix2D<T>

fn translate(&self, x: T, y: T) -> Matrix2D<T>

fn scale(&self, x: T, y: T) -> Matrix2D<T>

fn identity() -> Matrix2D<T>

fn to_array(&self) -> [T; 6]

fn transform_point(&self, point: &Point2D<T>) -> Point2D<T>

Returns the given point transformed by this matrix.

fn transform_rect(&self, rect: &Rect<T>) -> Rect<T>

Returns a rectangle that encompasses the result of transforming the given rectangle by this matrix.

Trait Implementations

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

fn eq(&self, __arg_0: &Matrix2D<T>) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &Matrix2D<T>) -> bool

This method tests for !=.

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

fn hash<__HT: Hasher>(&self, __arg_0: &mut __HT)

Feeds this value into the state given, updating the hasher as necessary.

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

Feeds a slice of this type into the state provided.

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

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

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

fn clone(&self) -> Matrix2D<T>

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

impl<T: HeapSizeOf> HeapSizeOf for Matrix2D<T>
[src]

fn heap_size_of_children(&self) -> usize

Measure the size of any heap-allocated structures that hang off this value, but not the space taken up by the value itself (i.e. what size_of:: measures, more or less); that space is handled by the implementation of HeapSizeOf for Box below. Read more

impl<T: Deserialize> Deserialize for Matrix2D<T>
[src]

fn deserialize<D>(deserializer: &mut D) -> Result<Self, D::Error> where D: Deserializer

Deserialize this value given this Deserializer.

impl<T: Serialize> Serialize for Matrix2D<T>
[src]

fn serialize<S>(&self, serializer: &mut S) -> Result<(), S::Error> where S: Serializer

Serializes this value into this serializer.