#[repr(C)]
pub struct Matrix4(pub [Vector4; 4]);
Expand description

A 4x4 matrix, suitable for 3D transformations.

Tuple Fields

0: [Vector4; 4]

Implementations

A new matrix from a 1D array.

A new matrix from a 2D array.

The identity matrix.

A matrix composed entirely of zeroes.

A look-at matrix suitable for positioning a camera.

A perspective matrix suitable for use as a camera projection.

An orthographic matrix suitable for rendering user interfaces.

A matrix that translates by the given vector.

A matrix that rotates around the x-axis.

A matrix that rotates around the y-axis.

A matrix that rotates around the z-axis.

A matrix that rotates around an arbitrary axis.

A matrix that rotates from a given vector to another.

A matrix that scales uniformly in all dimensions.

Obtain the specified row vector of this matrix.

Obtain the specified column vector of this matrix.

The transpose of this matrix (i.e. this matrix flipped along the diagonal)

The inverse of this matrix.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.