pub struct Matrix3d<T> {
Show 16 fields pub m11: T, pub m12: T, pub m13: T, pub m14: T, pub m21: T, pub m22: T, pub m23: T, pub m24: T, pub m31: T, pub m32: T, pub m33: T, pub m34: T, pub m41: T, pub m42: T, pub m43: T, pub m44: T,
}
Expand description

A 3D matrix.

Fields

m11: Tm12: Tm13: Tm14: Tm21: Tm22: Tm23: Tm24: Tm31: Tm32: Tm33: Tm34: Tm41: Tm42: Tm43: Tm44: T

Implementations

Creates an identity matrix.

Creates a translation matrix.

Creates a scale matrix.

Creates a rotation matrix.

Creates a skew matrix.

Creates a perspective matrix.

Multiplies this matrix by another, returning a new matrix.

Returns whether this matrix could be converted to a 2D matrix.

Attempts to convert the matrix to 2D. Returns None if the conversion is not possible.

Scales the matrix by the given factor.

Returns the determinant of the matrix.

Returns the inverse of the matrix if possible.

Transposes the matrix.

Multiplies a vector by the matrix.

Decomposes the matrix into a list of transform functions if possible.

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

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

The archived version of the pointer metadata for this type.

Converts some archived metadata to the pointer metadata for itself.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Deserializes using the given deserializer

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 alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type for metadata in pointers and references to Self.

The resulting type after obtaining ownership.

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

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.