Mat3

Mat3

  • x_axis : glam::Vec3
  • y_axis : glam::Vec3
  • z_axis : glam::Vec3

Description

No Documentation 🚧

Functions

FunctionSummary
abs(_self) Takes the absolute value of each element in `self`
abs_diff_eq(_self, rhs, max_abs_diff) Returns true if the absolute difference of all elements between `self` and `rhs` is less than or e
add(_self, rhs)No Documentation 🚧
add_mat3(_self, rhs) Adds two 3x3 matrices.
as_dmat3(_self)No Documentation 🚧
clone(_self)No Documentation 🚧
col(_self, index) Returns the matrix column for the given `index`. # Panics Panics if `index` is greater than 2.
determinant(_self) Returns the determinant of `self`.
div(_self, rhs)No Documentation 🚧
div_scalar(_self, rhs) Divides a 3x3 matrix by a scalar.
eq(_self, rhs)No Documentation 🚧
from_angle(angle) Creates an affine transformation matrix from the given 2D rotation `angle` (in radians). The resu
from_axis_angle(axis, angle) Creates a 3D rotation matrix from a normalized rotation `axis` and `angle` (in radians). # Panics
from_cols(x_axis, y_axis, z_axis) Creates a 3x3 matrix from three column vectors.
from_diagonal(diagonal) Creates a 3x3 matrix with its diagonal set to `diagonal` and all other entries set to 0.
from_euler(order, a, b, c) Creates a 3D rotation matrix from the given euler rotation sequence and the angles (in radians).
from_mat2(m) Creates an affine transformation matrix from the given 2x2 matrix. The resulting matrix can be use
from_mat4(m) Creates a 3x3 matrix from a 4x4 matrix, discarding the 4th row and column.
from_mat4_minor(m, i, j) Creates a 3x3 matrix from the minor of the given 4x4 matrix, discarding the `i`th column and `j`th
from_quat(rotation) Creates a 3D rotation matrix from the given quaternion. # Panics Will panic if `rotation` is not
from_rotation_x(angle) Creates a 3D rotation matrix from `angle` (in radians) around the x axis.
from_rotation_y(angle) Creates a 3D rotation matrix from `angle` (in radians) around the y axis.
from_rotation_z(angle) Creates a 3D rotation matrix from `angle` (in radians) around the z axis.
from_scale(scale) Creates an affine transformation matrix from the given non-uniform 2D `scale`. The resulting matri
from_scale_angle_translation(scale, angle, translation) Creates an affine transformation matrix from the given 2D `scale`, rotation `angle` (in radians) a
from_translation(translation) Creates an affine transformation matrix from the given 2D `translation`. The resulting matrix can
inverse(_self) Returns the inverse of `self`. If the matrix is not invertible the returned matrix will be invalid
is_finite(_self) Returns `true` if, and only if, all elements are finite. If any element is either `NaN`, positive
is_nan(_self) Returns `true` if any elements are `NaN`.
mul(_self, rhs)No Documentation 🚧
mul-1(arg0, arg1)No Documentation 🚧
mul-2(arg0, arg1)No Documentation 🚧
mul-3(arg0, arg1)No Documentation 🚧
mul-4(arg0, arg1)No Documentation 🚧
mul_mat3(_self, rhs) Multiplies two 3x3 matrices.
mul_scalar(_self, rhs) Multiplies a 3x3 matrix by a scalar.
mul_vec3(_self, rhs) Transforms a 3D vector.
mul_vec3a(_self, rhs) Transforms a [`Vec3A`].
neg(_self)No Documentation 🚧
row(_self, index) Returns the matrix row for the given `index`. # Panics Panics if `index` is greater than 2.
sub(_self, rhs)No Documentation 🚧
sub_mat3(_self, rhs) Subtracts two 3x3 matrices.
to_cols_array(_self) Creates a `[f32; 9]` array storing data in column major order. If you require data in row major order `transpose` the matrix first.
to_cols_array_2d(_self) Creates a `[[f32; 3]; 3]` 3D array storing data in column major order. If you require data in row
to_euler(_self, order) Extract Euler angles with the given Euler rotation order. Note if the input matrix contains scales
transform_point2(_self, rhs) Transforms the given 2D vector as a point. This is the equivalent of multiplying `rhs` as a 3D vec
transform_vector2(_self, rhs) Rotates the given 2D vector. This is the equivalent of multiplying `rhs` as a 3D vector where `z`
transpose(_self) Returns the transpose of `self`.