[−][src]Struct tray_rust::linalg::matrix4::Matrix4
Matrix4 is a 4x4 matrix stored in row-major format
Methods
impl Matrix4
[src]
pub fn zero() -> Matrix4
[src]
Return the zero matrix
pub fn identity() -> Matrix4
[src]
Return the identity matrix
pub fn new(mat: [f32; 16]) -> Matrix4
[src]
Create the matrix using the values passed
pub fn at(&self, i: usize, j: usize) -> &f32
[src]
Access the element at row i
column j
pub fn at_mut(&mut self, i: usize, j: usize) -> &mut f32
[src]
Mutably access the element at row i
column j
pub fn transpose(&self) -> Matrix4
[src]
Compute and return the transpose of this matrix
pub fn inverse(&self) -> Matrix4
[src]
Compute and return the inverse of this matrix
pub fn iter(&self) -> Iter<f32>
[src]
Return an iterator over the matrix's elements. The iterator goes row by row through the matrix.
pub fn has_nans(&self) -> bool
[src]
Trait Implementations
impl Clone for Matrix4
[src]
impl Copy for Matrix4
[src]
impl PartialEq<Matrix4> for Matrix4
[src]
impl Debug for Matrix4
[src]
impl Sub<Matrix4> for Matrix4
[src]
type Output = Matrix4
The resulting type after applying the -
operator.
fn sub(self, rhs: Matrix4) -> Matrix4
[src]
Subtract two matrices
impl Add<Matrix4> for Matrix4
[src]
type Output = Matrix4
The resulting type after applying the +
operator.
fn add(self, rhs: Matrix4) -> Matrix4
[src]
Add two matrices together
impl Mul<Matrix4> for Matrix4
[src]
type Output = Matrix4
The resulting type after applying the *
operator.
fn mul(self, rhs: Matrix4) -> Matrix4
[src]
Multiply two matrices
impl Mul<f32> for Matrix4
[src]
type Output = Matrix4
The resulting type after applying the *
operator.
fn mul(self, rhs: f32) -> Matrix4
[src]
Multiply the matrix by a scalar
impl Mul<Matrix4> for f32
[src]
type Output = Matrix4
The resulting type after applying the *
operator.
fn mul(self, rhs: Matrix4) -> Matrix4
[src]
Multiply the matrix by a scalar
impl StructuralPartialEq for Matrix4
[src]
impl FromIterator<f32> for Matrix4
[src]
fn from_iter<T: IntoIterator<Item = f32>>(it: T) -> Matrix4
[src]
Create the matrix using the values from the iterator. The iterator should return the rows of the matrix one after another. The first 16 values returned will be used to set the matrix elements. If fewer than 16 values are returned the remaining entries will be 0
impl<'a> FromIterator<&'a f32> for Matrix4
[src]
fn from_iter<T: IntoIterator<Item = &'a f32>>(it: T) -> Matrix4
[src]
Create the matrix using the values from the iterator. The iterator should return the rows of the matrix one after another. The first 16 values returned will be used to set the matrix elements. If fewer than 16 values are returned the remaining entries will be 0
Auto Trait Implementations
impl Send for Matrix4
impl Sync for Matrix4
impl Unpin for Matrix4
impl UnwindSafe for Matrix4
impl RefUnwindSafe for Matrix4
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Interpolate for T where
T: Add<T, Output = T> + Mul<f32, Output = T> + Copy,
[src]
T: Add<T, Output = T> + Mul<f32, Output = T> + Copy,