#[repr(C)]
pub struct Mat4 {
pub values: [f32; 16],
}
Expand description
A struct representing a 4x4 matrix.
It’s values are stored in column-major order by default,
as expected by OpenGL and accepted by all other APIs.
To change this, use feature mat-row-major
Creates the identity matrix.
Creates a 3D translation matrix.
Creates a 3D rotation matrix.
Creates a 3D scale matrix.
Creates a 3D local-to-world/object-to-world matrix.
When multiplying this matrix by a vector, it will be
- scaled by
s
- rotated by
r
- translated by
t
in this order.
Creates a 3D world-to-local/world-to-object matrix.
This matrix does the opposite of local_to_world()
Creates an orthographic projection matrix
with z mapped to [0; 1], as expected by Vulkan.
Creates a perspective projection matrix
with z mapped to [0; 1], as expected by Vulkan.
Returns a value indexed by column and row
Sets the value indexed by column and row to val
Returns a transposed copy of self.
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Creates the identity matrix.
The resulting type after applying the * operator.
The resulting type after applying the * operator.
The resulting type after applying the * operator.
The resulting type after applying the * operator.
The resulting type after applying the * operator.
The resulting type after applying the * operator.
The resulting type after applying the * operator.
The resulting type after applying the * operator.
The resulting type after applying the * operator.
The resulting type after applying the * operator.
The resulting type after applying the * operator.
The resulting type after applying the * operator.
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
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)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.