Struct matriarch::Mat3 [−][src]
pub struct Mat3 { 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, }
A 3x3 Matrix with elements arranged in row-major order.
A Mat3 is laid out as follows:
[ a b c ]
A = [ d e f ]
[ g h i ]
Fields
a: f32
b: f32
c: f32
d: f32
e: f32
f: f32
g: f32
h: f32
i: f32
Methods
impl Mat3
[src]
impl Mat3
pub fn new() -> Mat3
[src]
pub fn new() -> Mat3
pub fn identity() -> Mat3
[src]
pub fn identity() -> Mat3
pub fn new_from_array(input: &[f32; 9]) -> Mat3
[src]
pub fn new_from_array(input: &[f32; 9]) -> Mat3
pub fn new_from_col_array(input: &[f32; 9]) -> Mat3
[src]
pub fn new_from_col_array(input: &[f32; 9]) -> Mat3
pub fn to_array(&self) -> [f32; 9]
[src]
pub fn to_array(&self) -> [f32; 9]
pub fn to_col_array(&self) -> [f32; 9]
[src]
pub fn to_col_array(&self) -> [f32; 9]
pub fn to_vec3_array(&self) -> [Vec3; 3]
[src]
pub fn to_vec3_array(&self) -> [Vec3; 3]
pub fn determinant(&self) -> f32
[src]
pub fn determinant(&self) -> f32
pub fn transpose(&self) -> Mat3
[src]
pub fn transpose(&self) -> Mat3
Trait Implementations
impl Clone for Mat3
[src]
impl Clone for Mat3
fn clone(&self) -> Mat3
[src]
fn clone(&self) -> Mat3
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 Mat3
[src]
impl Copy for Mat3
impl Debug for Mat3
[src]
impl Debug for Mat3
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 Mat3
[src]
impl Default for Mat3
impl PartialEq for Mat3
[src]
impl PartialEq for Mat3
fn eq(&self, other: &Mat3) -> bool
[src]
fn eq(&self, other: &Mat3) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Mat3) -> bool
[src]
fn ne(&self, other: &Mat3) -> bool
This method tests for !=
.
impl Mul<Mat3> for Mat3
[src]
impl Mul<Mat3> for Mat3
type Output = Mat3
The resulting type after applying the *
operator.
fn mul(self, other_mat3: Mat3) -> Mat3
[src]
fn mul(self, other_mat3: Mat3) -> Mat3
Multiplies two Mat3s together, returning a new Mat3.
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_mat3 = mat3 * some_other_mat3;
impl Mul<Vec3> for Mat3
[src]
impl Mul<Vec3> for Mat3
type Output = Vec3
The resulting type after applying the *
operator.
fn mul(self, vec3: Vec3) -> Vec3
[src]
fn mul(self, vec3: Vec3) -> Vec3
Performs the *
operation.
impl Mul<Mat3> for f32
[src]
impl Mul<Mat3> for f32