Struct radiant_utils::Mat4 [] [src]

pub struct Mat4<T = f32>(pub [[T; 4]; 4]);

A 4x4 matrix.

Methods

impl<T> Mat4<T> where
    T: Float
[src]

[src]

Creates a zero matrix.

[src]

Creates an identity matrix.

[src]

Creates viewport matrix mapping viewport top left to (0.0, 0.0) and bottom right to (width, height)

[src]

Creates a look-at matrix with the given eye position, target position, and up-vector.

[src]

Creates an orthogonal projection matrix with the given rectangular bounds at the near and far clipping plane.

[src]

Creates a frustum projection matrix with the given rectangular bounds at the near clipping plane and rectangle * (far / near) at the far clipping plane.

[src]

Creates a perspective projection matrix with the given field of view, aspect and near/far clipping planes.

Trait Implementations

impl<T: Copy> Copy for Mat4<T>
[src]

impl<T: Clone> Clone for Mat4<T>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<T> Matrix<T> for Mat4<T> where
    T: Float
[src]

4x4 Matrices.

Important traits for &'a mut W
[src]

Sets the matrix value from another matrix.

Important traits for &'a mut W
[src]

Translate matrix by given vector.

Important traits for &'a mut W
[src]

Scale matrix by given vector.

Important traits for &'a mut W
[src]

Scales at given position.

Important traits for &'a mut W
[src]

Rotates the origin around z.

Important traits for &'a mut W
[src]

Rotates around z at given position.

Important traits for &'a mut W
[src]

Rotates around axis.

Important traits for &'a mut W
[src]

Rotates around axis at given position.

[src]

Returns a pure rotation matrix for given matrix

[src]

Returns the matrix's translation vector.

[src]

Returns the matrix's scaling vector.

[src]

Get rotation matrix euler angles.

impl<T> From<[[T; 4]; 4]> for Mat4<T> where
    T: Copy
[src]

[src]

Performs the conversion.

impl<T> Default for Mat4<T> where
    T: Float
[src]

[src]

Returns the "default value" for a type. Read more

impl<T> Mul<T> for Mat4<T> where
    T: Float
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<T> Mul<Vec2<T>> for Mat4<T> where
    T: Float
[src]

The resulting type after applying the * operator.

[src]

Multiplies the matrix with given vector operand, using 0 as z-component and 1 as w-component of the vector.

impl<T> Mul<Vec3<T>> for Mat4<T> where
    T: Float
[src]

The resulting type after applying the * operator.

[src]

Multiplies the matrix with given vector operand using 1 as w-component of the vector.

impl<T> Mul<Mat4<T>> for Mat4<T> where
    T: Float
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl AsUniform for Mat4<f32>
[src]

[src]

impl AsUniform for Mat4<f64>
[src]

[src]

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

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

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

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