[][src]Struct nova_math::matrix::TMat4x4

#[repr(C)]
pub struct TMat4x4<T: Real> { /* fields omitted */ }

A column major 4x4 floating point matrix

Methods

impl<T: Real> TMat4x4<T>[src]

pub fn new(input: [T; 16]) -> TMat4x4<T>[src]

Construct a new 4x4 matrix from a flat array of 16 elements

pub fn zero() -> TMat4x4<T>[src]

Construct a new 4x4 matrix of entirely zeroes

pub fn identity() -> TMat4x4<T>[src]

Construct a new 4x4 identity matrix

pub fn perspective(aspect: T, fov: T, near: T, far: T) -> TMat4x4<T>[src]

Construct a new Vulkan compatible perspective transform matrix

pub fn translation(translation: TVec3<T>) -> TMat4x4<T>[src]

Construct a new translation matrix with the given translation

pub fn translate(&mut self, translation: TVec3<T>)[src]

Apply a translation to this matrix

pub fn rotation(angle: T, axis: TVec3<T>) -> TMat4x4<T>[src]

Get an angle axis rotation matrix

pub fn rotate(&mut self, angle: T, in_axis: TVec3<T>)[src]

Apply an angle axis rotation to this matrix

pub fn scaling(scale: TVec3<T>) -> TMat4x4<T>[src]

Get a scaling matrix

pub fn scale(&mut self, scale: TVec3<T>)[src]

Apply scaling to the matrix

pub fn from_columns(
    col0: [T; 4],
    col1: [T; 4],
    col2: [T; 4],
    col3: [T; 4]
) -> Self
[src]

Construct a new matrix from the four columns passed into the function

pub fn apply(&self, vec: TVec4<T>) -> TVec4<T>[src]

Apply this matrix to a vector, creating a new one in the process

pub fn apply_to(&self, rhs: &mut TVec4<T>)[src]

Apply a matrix to the given vector

Trait Implementations

impl<T: Real> Transpose for TMat4x4<T>[src]

impl<T: Real> TransposeAssign for TMat4x4<T>[src]

impl<T: Real> Inverse for TMat4x4<T>[src]

impl<T: Real> InverseAssign for TMat4x4<T>[src]

impl<T: Real> IntoSTD140 for TMat4x4<T>[src]

type Output = TMat4x4P<T>

impl<T: Real> Column for TMat4x4<T>[src]

type Output = TVec4<T>

impl<T: Real> ColumnRef for TMat4x4<T>[src]

impl<T: Real> ColumnRefMut for TMat4x4<T>[src]

impl<T: Real> Row for TMat4x4<T>[src]

type Output = TVec4<T>

impl<'_, T: Real> From<&'_ [T; 16]> for TMat4x4<T>[src]

impl<T: Real> From<TMat4x4<T>> for TMat4x4P<T>[src]

impl<T: Real> Display for TMat4x4<T>[src]

impl<T: Debug + Real> Debug for TMat4x4<T>[src]

impl<T: Real> Div<TMat4x4<T>> for TMat4x4<T>[src]

type Output = Self

The resulting type after applying the / operator.

impl<T: Real> Sub<TMat4x4<T>> for TMat4x4<T>[src]

type Output = Self

The resulting type after applying the - operator.

impl<T: Real> PartialEq<TMat4x4<T>> for TMat4x4<T>[src]

impl<T: Real> Add<TMat4x4<T>> for TMat4x4<T>[src]

type Output = Self

The resulting type after applying the + operator.

impl<T: Real> Mul<TMat4x4<T>> for TMat4x4<T>[src]

type Output = Self

The resulting type after applying the * operator.

impl<T: Real> Mul<TVec4<T>> for TMat4x4<T>[src]

type Output = TVec4<T>

The resulting type after applying the * operator.

impl<T: Real> Mul<T> for TMat4x4<T>[src]

type Output = TMat4x4<T>

The resulting type after applying the * operator.

impl<T: Real> AddAssign<TMat4x4<T>> for TMat4x4<T>[src]

impl<T: Real> SubAssign<TMat4x4<T>> for TMat4x4<T>[src]

impl<T: Real> MulAssign<TMat4x4<T>> for TMat4x4<T>[src]

impl<T: Real> MulAssign<T> for TMat4x4<T>[src]

impl<T: Real> DivAssign<TMat4x4<T>> for TMat4x4<T>[src]

impl<T: Real> Index<usize> for TMat4x4<T>[src]

type Output = T

The returned type after indexing.

fn index(&self, index: usize) -> &Self::Output[src]

Index the matrix linearly

impl<T: Real> Index<(usize, usize)> for TMat4x4<T>[src]

type Output = T

The returned type after indexing.

fn index(&self, index: (usize, usize)) -> &Self::Output[src]

Index the matrix. (row, column)

impl<T: Real> IndexMut<usize> for TMat4x4<T>[src]

fn index_mut(&mut self, index: usize) -> &mut Self::Output[src]

Index the matrix linearly

impl<T: Real> IndexMut<(usize, usize)> for TMat4x4<T>[src]

fn index_mut(&mut self, index: (usize, usize)) -> &mut Self::Output[src]

Index the matrix. (row, column)

impl<T: Real> Into<[T; 16]> for TMat4x4<T>[src]

impl<T: Real> Into<TMat4x4<T>> for TQuat<T>[src]

impl<T: Clone + Real> Clone for TMat4x4<T>[src]

Auto Trait Implementations

impl<T> Unpin for TMat4x4<T> where
    T: Unpin

impl<T> Send for TMat4x4<T> where
    T: Send

impl<T> Sync for TMat4x4<T> where
    T: Sync

impl<T> UnwindSafe for TMat4x4<T> where
    T: UnwindSafe

impl<T> RefUnwindSafe for TMat4x4<T> where
    T: RefUnwindSafe

Blanket Implementations

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

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> Into<U> for T where
    U: From<T>, 
[src]

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]