Struct raylib::core::math::Matrix[][src]

#[repr(C)]
pub struct Matrix {
Show 16 fields pub m0: f32, pub m4: f32, pub m8: f32, pub m12: f32, pub m1: f32, pub m5: f32, pub m9: f32, pub m13: f32, pub m2: f32, pub m6: f32, pub m10: f32, pub m14: f32, pub m3: f32, pub m7: f32, pub m11: f32, pub m15: f32,
}

Fields

m0: f32m4: f32m8: f32m12: f32m1: f32m5: f32m9: f32m13: f32m2: f32m6: f32m10: f32m14: f32m3: f32m7: f32m11: f32m15: f32

Implementations

Returns the identity matrix.

Returns the zero matriz.

Returns a translation matrix.

Returns a rotation matrix.

Returns a translation matrix around the X axis.

Returns a translation matrix around the Y axis.

Returns a translation matrix around the Z axis.

Returns xyz-rotation matrix (angles in radians)

Returns a scaling matrix.

Returns perspective projection matrix based on frustum parameters.

Returns perspective projection matrix.

Returns orthographic projection matrix.

Returns camera look-at matrix (view matrix).

Calculates the determinant of the current matrix.

Calculates the trace of the matrix (sum of the values along the diagonal).

Returns a new Matrix transposed from the current one.

Returns a new Matrix inverted from the current one.

Returns a new Matrix normalized from the current one.

Returns a 16-length f32 array containing the current matrix data.

Trait Implementations

The resulting type after applying the + operator.

Performs the + operation. Read more

Performs the += operation. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

The resulting type after applying the * operator.

Performs the * operation. Read more

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 !=.

The resulting type after applying the - operator.

Performs the - operation. Read more

Performs the -= operation. Read more

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

Performs the conversion.

Performs the conversion.

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.