[][src]Struct rask_engine::math::Mat3

pub struct Mat3 { /* fields omitted */ }

A 3x3 matrix with f32 elements.

Implementations

impl Mat3[src]

pub const fn new(
    a: f32,
    b: f32,
    c: f32,
    d: f32,
    e: f32,
    f: f32,
    g: f32,
    h: f32,
    i: f32
) -> Self
[src]

Creates a new Mat3 of the form: (a b c) (d e f) (g h i)

pub const fn from_vec3(v1: Vec3, v2: Vec3, v3: Vec3) -> Self[src]

Creates a new Mat3 from three column Vec3s.

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

Returns the zero matrix.

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

Returns the identity matrix.

pub fn rotation(angle: f32) -> Self[src]

Returns a matrix that rotates by angle.

pub const fn scaling(scale_x: f32, scale_y: f32) -> Self[src]

Returns a matrix that scales by scale_x and scale_y.

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

Returns a matrix that translates by (x, y).

pub const fn transpose(self) -> Self[src]

Returns the transposed matrix.

Trait Implementations

impl Add<Mat3> for Mat3[src]

type Output = Self

The resulting type after applying the + operator.

impl AddAssign<Mat3> for Mat3[src]

impl AsRef<[f32; 9]> for Mat3[src]

impl Clone for Mat3[src]

impl Copy for Mat3[src]

impl Debug for Mat3[src]

impl Default for Mat3[src]

impl Div<f32> for Mat3[src]

type Output = Self

The resulting type after applying the / operator.

impl DivAssign<f32> for Mat3[src]

impl Eq for Mat3[src]

impl From<SRT> for Mat3[src]

impl Mul<Mat3> for f32[src]

type Output = Mat3

The resulting type after applying the * operator.

impl Mul<Mat3> for Mat3[src]

type Output = Self

The resulting type after applying the * operator.

fn mul(self, b: Self) -> Self::Output[src]

Laderman Algorithm, see: http://www.ams.org/journals/bull/1976-82-01/S0002-9904-1976-13988-2/S0002-9904-1976-13988-2.pdf

impl Mul<Vec3> for Mat3[src]

type Output = Vec3

The resulting type after applying the * operator.

impl Mul<f32> for Mat3[src]

type Output = Self

The resulting type after applying the * operator.

impl MulAssign<Mat3> for Mat3[src]

impl MulAssign<f32> for Mat3[src]

impl Neg for Mat3[src]

type Output = Self

The resulting type after applying the - operator.

impl PartialEq<Mat3> for Mat3[src]

impl Sub<Mat3> for Mat3[src]

type Output = Self

The resulting type after applying the - operator.

impl SubAssign<Mat3> for Mat3[src]

Auto Trait Implementations

impl RefUnwindSafe for Mat3

impl Send for Mat3

impl Sync for Mat3

impl Unpin for Mat3

impl UnwindSafe for Mat3

Blanket Implementations

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

impl<T> Any for T where
    T: Any

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

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

impl<S, T> Collide<[T]> for S where
    T: Collide<S>, 
[src]

impl<T> Event for T where
    T: Send + Sync + 'static, 

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

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

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Resource for T where
    T: Any + Send + Sync

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryDefault for T where
    T: Default

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.