[][src]Struct tray_rust::linalg::matrix4::Matrix4

pub struct Matrix4 { /* fields omitted */ }

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]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Interpolate for T where
    T: Add<T, Output = T> + Mul<f32, Output = T> + Copy
[src]

impl<T> SetParameter for T[src]