Struct euclid::matrix2d::TypedMatrix2D
[−]
[src]
pub struct TypedMatrix2D<T, Src, Dst> { pub m11: T, pub m12: T, pub m21: T, pub m22: T, pub m31: T, pub m32: T, // some fields omitted }
Fields
m11: T
m12: T
m21: T
m22: T
m31: T
m32: T
Methods
impl<T, Src, Dst> TypedMatrix2D<T, Src, Dst>
[src]
fn new(m11: T, m12: T, m21: T, m22: T, m31: T, m32: T) -> TypedMatrix2D<T, Src, Dst>
impl<T: Copy, Src, Dst> TypedMatrix2D<T, Src, Dst>
[src]
impl<T, Src, Dst> TypedMatrix2D<T, Src, Dst> where T: Copy + Clone + Add<T, Output=T> + Mul<T, Output=T> + Sub<T, Output=T> + PartialOrd + One + Zero
[src]
fn mul<NewSrc>(&self, m: &TypedMatrix2D<T, NewSrc, Src>) -> TypedMatrix2D<T, NewSrc, Dst>
fn translate(&self, x: T, y: T) -> TypedMatrix2D<T, Src, Dst>
fn scale(&self, x: T, y: T) -> TypedMatrix2D<T, Src, Dst>
fn identity() -> TypedMatrix2D<T, Src, Dst>
fn transform_point(&self, point: &TypedPoint2D<T, Src>) -> TypedPoint2D<T, Dst>
Returns the given point transformed by this matrix.
fn transform_rect(&self, rect: &TypedRect<T, Src>) -> TypedRect<T, Dst>
Returns a rectangle that encompasses the result of transforming the given rectangle by this matrix.
impl<T: Copy, Src, Dst> TypedMatrix2D<T, Src, Dst>
[src]
fn to_untyped(&self) -> Matrix2D<T>
Drop the units, preserving only the numeric value.
fn from_untyped(p: &Matrix2D<T>) -> TypedMatrix2D<T, Src, Dst>
Tag a unitless value with units.
Trait Implementations
impl<T: PartialEq, Src: PartialEq, Dst: PartialEq> PartialEq for TypedMatrix2D<T, Src, Dst>
[src]
fn eq(&self, __arg_0: &TypedMatrix2D<T, Src, Dst>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &TypedMatrix2D<T, Src, Dst>) -> bool
This method tests for !=
.
impl<T: Hash, Src: Hash, Dst: Hash> Hash for TypedMatrix2D<T, Src, Dst>
[src]
fn hash<__HTSrcDst: Hasher>(&self, __arg_0: &mut __HTSrcDst)
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, Src: Eq, Dst: Eq> Eq for TypedMatrix2D<T, Src, Dst>
[src]
impl<T: Copy, Src: Copy, Dst: Copy> Copy for TypedMatrix2D<T, Src, Dst>
[src]
impl<T: Clone, Src: Clone, Dst: Clone> Clone for TypedMatrix2D<T, Src, Dst>
[src]
fn clone(&self) -> TypedMatrix2D<T, Src, Dst>
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, Src, Dst> HeapSizeOf for TypedMatrix2D<T, Src, Dst>
[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::
impl<T: Clone + Deserialize, Src, Dst> Deserialize for TypedMatrix2D<T, Src, Dst>
[src]
fn deserialize<D>(deserializer: &mut D) -> Result<Self, D::Error> where D: Deserializer
Deserialize this value given this Deserializer
.
impl<T: Serialize, Src, Dst> Serialize for TypedMatrix2D<T, Src, Dst>
[src]
fn serialize<S>(&self, serializer: &mut S) -> Result<(), S::Error> where S: Serializer
Serializes this value into this serializer.