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 | |
m12 | |
m13 | |
m14 | |
m21 | |
m22 | |
m23 | |
m24 | |
m31 | |
m32 | |
m33 | |
m34 | |
m41 | |
m42 | |
m43 | |
m44 |
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>
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