[][src]Struct mazth::mat::Mat4

pub struct Mat4<T> where
    T: Copy + Clone
{ pub _val: [T; 16], pub _is_row_major: bool, }

Fields

_val: [T; 16]_is_row_major: bool

Methods

impl Mat4<f32>[src]

pub fn init(arr: [f32; 16], row_major: bool) -> Mat4<f32>[src]

pub fn iden() -> Mat4<f32>[src]

pub fn trace(&self) -> f32[src]

pub fn index(&self, m: u64, n: u64) -> f32[src]

pub fn index_mut(&mut self, m: u64, n: u64) -> &mut f32[src]

pub fn size(&self) -> Option<usize>[src]

pub fn mul_elem(&self, other: &Mat4<f32>) -> Option<Mat4<f32>>[src]

pub fn mul(&self, other: &Mat4<f32>) -> Option<Mat4<f32>>[src]

pub fn mul_mat4x1(&self, other: &Mat4x1<f32>) -> Option<Mat4x1<f32>>[src]

pub fn div(&self, other: &Mat4<f32>) -> Option<Mat4<f32>>[src]

pub fn plus(&self, other: &Mat4<f32>) -> Option<Mat4<f32>>[src]

pub fn minus(&self, other: &Mat4<f32>) -> Option<Mat4<f32>>[src]

pub fn dot(&self, other: &Mat4<f32>) -> Option<f32>[src]

pub fn cross(&self, other: &Self) -> Option<Self>[src]

pub fn magnitude(&self) -> Option<f32>[src]

pub fn normalize(self) -> Option<Self>[src]

pub fn scale(&self, s: f32) -> Option<Self>[src]

pub fn transpose_self(&mut self)[src]

pub fn transpose(self) -> Mat4<f32>[src]

pub fn submat_mat3(&self) -> Mat3<f32>[src]

Returns upper left corner 3x3 matrix

Arguments

  • self - instance of Mat4x4

Remarks

This is a convenience function to extract the upper left 3x3 matrix.

pub fn inverse(&self) -> Option<Mat4<f32>>[src]

impl Mat4<f64>[src]

pub fn init(arr: [f64; 16], row_major: bool) -> Mat4<f64>[src]

pub fn iden() -> Mat4<f64>[src]

pub fn trace(&self) -> f64[src]

pub fn index(&self, m: u64, n: u64) -> f64[src]

pub fn index_mut(&mut self, m: u64, n: u64) -> &mut f64[src]

pub fn size(&self) -> Option<usize>[src]

pub fn mul_elem(&self, other: &Mat4<f64>) -> Option<Mat4<f64>>[src]

pub fn mul(&self, other: &Mat4<f64>) -> Option<Mat4<f64>>[src]

pub fn mul_mat4x1(&self, other: &Mat4x1<f64>) -> Option<Mat4x1<f64>>[src]

pub fn div(&self, other: &Mat4<f64>) -> Option<Mat4<f64>>[src]

pub fn plus(&self, other: &Mat4<f64>) -> Option<Mat4<f64>>[src]

pub fn minus(&self, other: &Mat4<f64>) -> Option<Mat4<f64>>[src]

pub fn dot(&self, other: &Mat4<f64>) -> Option<f64>[src]

pub fn cross(&self, other: &Self) -> Option<Self>[src]

pub fn magnitude(&self) -> Option<f64>[src]

pub fn normalize(self) -> Option<Self>[src]

pub fn scale(&self, s: f64) -> Option<Self>[src]

pub fn transpose_self(&mut self)[src]

pub fn transpose(self) -> Mat4<f64>[src]

pub fn submat_mat3(&self) -> Mat3<f64>[src]

Returns upper left corner 3x3 matrix

Arguments

  • self - instance of Mat4x4

Remarks

This is a convenience function to extract the upper left 3x3 matrix.

pub fn inverse(&self) -> Option<Mat4<f64>>[src]

Trait Implementations

impl IComparableError<f32> for Mat4<f32>[src]

impl IComparableError<f64> for Mat4<f64>[src]

impl<T: Clone> Clone for Mat4<T> where
    T: Copy + Clone
[src]

impl<T: Copy> Copy for Mat4<T> where
    T: Copy + Clone
[src]

impl Default for Mat4<f32>[src]

impl Default for Mat4<f64>[src]

impl<T: Debug> Debug for Mat4<T> where
    T: Copy + Clone
[src]

Auto Trait Implementations

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

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

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

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

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

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]