Struct matriarch::Mat4 [−][src]
pub struct Mat4 { pub a: f32, pub b: f32, pub c: f32, pub d: f32, pub e: f32, pub f: f32, pub g: f32, pub h: f32, pub i: f32, pub j: f32, pub k: f32, pub l: f32, pub m: f32, pub n: f32, pub o: f32, pub p: f32, }
A 4x4 Matrix with elements arraged in row-major order.
A Mat4 is laid out as follows:
[ a b c d ]
A = [ e f g h ]
[ i j k l ]
[ m n o p ]
Fields
a: f32
b: f32
c: f32
d: f32
e: f32
f: f32
g: f32
h: f32
i: f32
j: f32
k: f32
l: f32
m: f32
n: f32
o: f32
p: f32
Methods
impl Mat4
[src]
impl Mat4
pub fn new() -> Mat4
[src]
pub fn new() -> Mat4
pub fn identity() -> Mat4
[src]
pub fn identity() -> Mat4
pub fn new_from_array(input: &[f32; 16]) -> Mat4
[src]
pub fn new_from_array(input: &[f32; 16]) -> Mat4
pub fn new_from_col_array(input: &[f32; 16]) -> Mat4
[src]
pub fn new_from_col_array(input: &[f32; 16]) -> Mat4
pub fn to_array(&self) -> [f32; 16]
[src]
pub fn to_array(&self) -> [f32; 16]
pub fn to_col_array(&self) -> [f32; 16]
[src]
pub fn to_col_array(&self) -> [f32; 16]
pub fn to_vec4_array(&self) -> [Vec4; 4]
[src]
pub fn to_vec4_array(&self) -> [Vec4; 4]
pub fn determinant(&self) -> f32
[src]
pub fn determinant(&self) -> f32
pub fn transpose(&self) -> Mat4
[src]
pub fn transpose(&self) -> Mat4
Trait Implementations
impl Clone for Mat4
[src]
impl Clone for Mat4
fn clone(&self) -> Mat4
[src]
fn clone(&self) -> Mat4
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Copy for Mat4
[src]
impl Copy for Mat4
impl Debug for Mat4
[src]
impl Debug for Mat4
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Default for Mat4
[src]
impl Default for Mat4
impl PartialEq for Mat4
[src]
impl PartialEq for Mat4
fn eq(&self, other: &Mat4) -> bool
[src]
fn eq(&self, other: &Mat4) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Mat4) -> bool
[src]
fn ne(&self, other: &Mat4) -> bool
This method tests for !=
.
impl Mul<Mat4> for Mat4
[src]
impl Mul<Mat4> for Mat4
type Output = Mat4
The resulting type after applying the *
operator.
fn mul(self, mat4: Mat4) -> Mat4
[src]
fn mul(self, mat4: Mat4) -> Mat4
Multiplies two Mat4s together, returning a new Mat4.
Keep in mind that matrix multiplication is not commutative, such that
A*B != B*A
for most matrices (the main exception being the Identity
matrix)
Example:
let some_mat4 = mat4 * some_other_mat4;
impl Mul<Vec4> for Mat4
[src]
impl Mul<Vec4> for Mat4
type Output = Vec4
The resulting type after applying the *
operator.
fn mul(self, vec4: Vec4) -> Vec4
[src]
fn mul(self, vec4: Vec4) -> Vec4
Performs the *
operation.
impl Mul<Mat4> for f32
[src]
impl Mul<Mat4> for f32