[][src]Struct rust_3d::Matrix4

pub struct Matrix4 {
    pub data: [[f64; 4]; 4],
}

Matrix4, a matrix with 4 rows and columns

Fields

data: [[f64; 4]; 4]

Implementations

impl Matrix4[src]

pub fn identity() -> Matrix4[src]

Creates a new identity matrix

pub fn zeroes() -> Matrix4[src]

Creates a new matrix which contains only zeroes

pub fn translation(x: f64, y: f64, z: f64) -> Matrix4[src]

Creates a new matrix which applies translation

pub fn scale(x: f64, y: f64, z: f64) -> Matrix4[src]

Creates a new matrix which applies scaling

pub fn rotation(x: Rad, y: Rad, z: Rad) -> Matrix4[src]

Creates a new matrix which applies rotation

pub fn rotation_axis<N>(axis: &N, r: Rad) -> Matrix4 where
    N: IsNormalized3D
[src]

Creates a new matrix which applies rotation around an axis

pub fn perspective(close: f64, away: f64, fov: Rad) -> Matrix4[src]

Creates a new matrix which applies perspective transformation

pub fn look_at<P, N>(target: &P, up: &N) -> Result<Matrix4> where
    P: IsBuildable3D,
    N: IsNormalized3D
[src]

Creates a new matrix which applies a look at transformation

Trait Implementations

impl Clone for Matrix4[src]

impl Debug for Matrix4[src]

impl Default for Matrix4[src]

impl<'_> Mul<&'_ Matrix4> for Matrix4[src]

type Output = Self

The resulting type after applying the * operator.

impl<'_> Mul<&'_ Matrix4> for &'_ Matrix4[src]

type Output = Matrix4

The resulting type after applying the * operator.

impl Mul<Matrix4> for Matrix4[src]

type Output = Self

The resulting type after applying the * operator.

impl Mul<f64> for Matrix4[src]

type Output = Self

The resulting type after applying the * operator.

impl<'_> Mul<f64> for &'_ Matrix4[src]

type Output = Matrix4

The resulting type after applying the * operator.

impl PartialEq<Matrix4> for Matrix4[src]

impl PartialOrd<Matrix4> for Matrix4[src]

impl StructuralPartialEq for Matrix4[src]

Auto Trait Implementations

impl RefUnwindSafe for Matrix4

impl Send for Matrix4

impl Sync for Matrix4

impl Unpin for Matrix4

impl UnwindSafe for Matrix4

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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.