Struct radiant_rs::Mat4 [] [src]

pub struct Mat4<T: Debug + Float + NumCast = f32>(pub [[T; 4]; 4]);

A 4x4 matrix.

Methods

impl<T> Mat4<T> where T: Debug + Float + NumCast
[src]

Creates a zero matrix.

Creates an identity matrix.

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

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

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

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

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

Translate matrix by given vector.

Scale matrix by given vector.

Scales at given position.

Rotates the origin around z.

Rotates around z at given position.

Rotates around axis.

Rotates around axis at given position.

Sets the matrix value from another matrix.

Returns a pure rotation matrix for given matrix

Returns the matrix's translation vector.

Returns the matrix's scaling vector.

Get rotation matrix euler angles

Trait Implementations

impl<T: Copy + Debug + Float + NumCast> Copy for Mat4<T>
[src]

impl<T: Clone + Debug + Float + NumCast> Clone for Mat4<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T> From<[[T; 4]; 4]> for Mat4<T> where T: Debug + Float
[src]

Performs the conversion.

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

The resulting type after applying the * operator

The method for the * operator

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

The resulting type after applying the * operator

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: Debug + Float
[src]

The resulting type after applying the * operator

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

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

The resulting type after applying the * operator

The method for the * operator

impl AsUniform for Mat4<f32>
[src]

impl AsUniform for Mat4<f64>
[src]

impl<T: Debug + Float> Debug for Mat4<T>
[src]

Formats the value using the given formatter.