Struct euclid::matrix4d::Matrix4D
[−]
[src]
pub struct Matrix4D<T> { pub m11: T, pub m12: T, pub m13: T, pub m14: T, pub m21: T, pub m22: T, pub m23: T, pub m24: T, pub m31: T, pub m32: T, pub m33: T, pub m34: T, pub m41: T, pub m42: T, pub m43: T, pub m44: T, }
Fields
m11: T
m12: T
m13: T
m14: T
m21: T
m22: T
m23: T
m24: T
m31: T
m32: T
m33: T
m34: T
m41: T
m42: T
m43: T
m44: T
Methods
impl<T: Add<T, Output=T> + ApproxEq<T> + Copy + Clone + Div<T, Output=T> + Mul<T, Output=T> + Neg<Output=T> + One + PartialOrd + Sub<T, Output=T> + Trig + Zero> Matrix4D<T>
[src]
fn new(m11: T, m12: T, m13: T, m14: T, m21: T, m22: T, m23: T, m24: T, m31: T, m32: T, m33: T, m34: T, m41: T, m42: T, m43: T, m44: T) -> Matrix4D<T>
fn new_2d(m11: T, m12: T, m21: T, m22: T, m41: T, m42: T) -> Matrix4D<T>
fn ortho(left: T, right: T, bottom: T, top: T, near: T, far: T) -> Matrix4D<T>
fn identity() -> Matrix4D<T>
fn is_2d(&self) -> bool
fn approx_eq(&self, other: &Matrix4D<T>) -> bool
fn mul(&self, m: &Matrix4D<T>) -> Matrix4D<T>
fn invert(&self) -> Matrix4D<T>
fn determinant(&self) -> T
fn mul_s(&self, x: T) -> Matrix4D<T>
fn scale(&self, x: T, y: T, z: T) -> Matrix4D<T>
fn transform_point(&self, p: &Point2D<T>) -> Point2D<T>
Returns the given point transformed by this matrix.
fn transform_point4d(&self, p: &Point4D<T>) -> Point4D<T>
fn to_array(&self) -> [T; 16]
fn translate(&self, x: T, y: T, z: T) -> Matrix4D<T>
fn create_translation(x: T, y: T, z: T) -> Matrix4D<T>
Create a 3d translation matrix
fn create_scale(x: T, y: T, z: T) -> Matrix4D<T>
Create a 3d scale matrix
fn create_rotation(x: T, y: T, z: T, theta: T) -> Matrix4D<T>
Create a 3d rotation matrix from an angle / axis. The supplied axis must be normalized.
fn create_skew(alpha: T, beta: T) -> Matrix4D<T>
Create a 2d skew matrix. https://drafts.csswg.org/css-transforms/#funcdef-skew
fn create_perspective(d: T) -> Matrix4D<T>
Create a simple perspective projection matrix
Trait Implementations
impl<T: Debug> Debug for Matrix4D<T>
[src]
impl<T: PartialEq> PartialEq for Matrix4D<T>
[src]
fn eq(&self, __arg_0: &Matrix4D<T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Matrix4D<T>) -> bool
This method tests for !=
.
impl<T: Hash> Hash for Matrix4D<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 Matrix4D<T>
[src]
impl<T: Copy> Copy for Matrix4D<T>
[src]
impl<T: Clone> Clone for Matrix4D<T>
[src]
fn clone(&self) -> Matrix4D<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 Matrix4D<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::
impl<T: Deserialize> Deserialize for Matrix4D<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 Matrix4D<T>
[src]
fn serialize<S>(&self, serializer: &mut S) -> Result<(), S::Error> where S: Serializer
Serializes this value into this serializer.