pub type Mat3 = [f32; 9];
Trait Implementations§
Source§impl Matrix for Mat3
impl Matrix for Mat3
Source§fn rotate(&mut self, angle: f32, _: &[f32]) -> &mut Self
fn rotate(&mut self, angle: f32, _: &[f32]) -> &mut Self
Rotate the matrix around the Z-axis.
The axis
argument is ignored.
type MatrixType = [f32; 9]
type VectorType = [f32; 3]
Source§fn mul(&mut self, rhs: &Self) -> &mut Self
fn mul(&mut self, rhs: &Self) -> &mut Self
Perform matrix-multiplication with the given right-hand-side operand
Source§fn mul_vector(&self, rhs: &[f32]) -> [f32; 3]
fn mul_vector(&self, rhs: &[f32]) -> [f32; 3]
Multiplies this matrix with the given right-hand-side vector, i.e.
Matrix * rhs
Read moreSource§fn mul_vector_left(&self, lhs: &[f32]) -> [f32; 3]
fn mul_vector_left(&self, lhs: &[f32]) -> [f32; 3]
Multiplies the given row vector with this matrix, i.e.
lhs * Matrix
Read moreSource§fn add(&mut self, rhs: &Self) -> &mut Self
fn add(&mut self, rhs: &Self) -> &mut Self
Perform element-wise addition with the given right-hand-side operand
Source§fn sub(&mut self, rhs: &Self) -> &mut Self
fn sub(&mut self, rhs: &Self) -> &mut Self
Perform element-wise substraction with the given right-hand-side operand
Source§fn scale(&mut self, factor: f32) -> &mut Self
fn scale(&mut self, factor: f32) -> &mut Self
Scale the matrix elment-wise by the given constant