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