Struct suzy::platform::opengl::Mat4[][src]

pub struct Mat4 { /* fields omitted */ }

A 4x4 matrix used for vertex transformations.

Components are stored in column-major order.

Implementations

impl Mat4[src]

pub const fn identity() -> Self[src]

The identity matrix.

pub const fn translate(x: f32, y: f32) -> Self[src]

Create a translation matrix with the given offsets.

pub const fn scale(x: f32, y: f32) -> Self[src]

Create a scaling matrix with the given multipliers.

pub fn rotate(radians: f32) -> Self[src]

Create a rotation matrix that rotates a 2D element around the given angle (in radians).

Trait Implementations

impl AsRef<[f32; 16]> for Mat4[src]

impl Clone for Mat4[src]

impl Copy for Mat4[src]

impl Debug for Mat4[src]

impl Default for Mat4[src]

impl From<[f32; 16]> for Mat4[src]

impl<I, J> Index<(I, J)> for Mat4 where
    I: Into<usize>,
    J: Into<usize>, 
[src]

type Output = f32

The returned type after indexing.

impl<I, J> IndexMut<(I, J)> for Mat4 where
    I: Into<usize>,
    J: Into<usize>, 
[src]

impl Mul<&'_ (f32, f32, f32, f32)> for &Mat4[src]

type Output = (f32, f32, f32, f32)

The resulting type after applying the * operator.

impl Mul<&'_ (f32, f32, f32, f32)> for Mat4[src]

type Output = (f32, f32, f32, f32)

The resulting type after applying the * operator.

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

type Output = Mat4

The resulting type after applying the * operator.

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

type Output = Mat4

The resulting type after applying the * operator.

impl Mul<(f32, f32, f32, f32)> for &Mat4[src]

type Output = (f32, f32, f32, f32)

The resulting type after applying the * operator.

impl Mul<(f32, f32, f32, f32)> for Mat4[src]

type Output = (f32, f32, f32, f32)

The resulting type after applying the * operator.

impl Mul<Mat4> for Mat4[src]

type Output = Mat4

The resulting type after applying the * operator.

impl Mul<Mat4> for &Mat4[src]

type Output = Mat4

The resulting type after applying the * operator.

impl MulAssign<&'_ Mat4> for Mat4[src]

impl MulAssign<Mat4> for Mat4[src]

impl PartialEq<Mat4> for Mat4[src]

impl StructuralPartialEq for Mat4[src]

Auto Trait Implementations

impl RefUnwindSafe for Mat4

impl Send for Mat4

impl Sync for Mat4

impl Unpin for Mat4

impl UnwindSafe for Mat4

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.