Matrix3

Category: Built-In Types

Brief Description

3x3 matrix datatype.

Member Functions

Matrix3 Matrix3 ( Quat from )
Matrix3 Matrix3 ( Vector3 axis, float phi )
Matrix3 Matrix3 ( Vector3 x_axis, Vector3 y_axis, Vector3 z_axis )
float determinant ( )
Vector3 get_euler ( )
int get_orthogonal_index ( )
Vector3 get_scale ( )
Matrix3 inverse ( )
Matrix3 orthonormalized ( )
Matrix3 rotated ( Vector3 axis, float phi )
Matrix3 scaled ( Vector3 scale )
float tdotx ( Vector3 with )
float tdoty ( Vector3 with )
float tdotz ( Vector3 with )
Matrix3 transposed ( )
Vector3 xform ( Vector3 v )
Vector3 xform_inv ( Vector3 v )

Member Variables

Description

3x3 matrix used for 3D rotation and scale. Contains 3 vector fields x,y and z. Can also be accessed as array of 3D vectors. Almost always used as orthogonal basis for a Transform.

Member Function Description

Matrix3 Matrix3 ( Quat from )

Create a matrix from a quaternion.

Matrix3 Matrix3 ( Vector3 axis, float phi )

Create a matrix from an axis vector and an angle.

Matrix3 Matrix3 ( Vector3 x_axis, Vector3 y_axis, Vector3 z_axis )

Create a matrix from 3 axis vectors.

float determinant ( )

Return the determinant of the matrix.

Vector3 get_euler ( )

Return euler angles from the matrix.

int get_orthogonal_index ( )

Vector3 get_scale ( )

Matrix3 inverse ( )

Return the affine inverse of the matrix.

Matrix3 orthonormalized ( )

Return the orthonormalized version of the matrix (useful to call from time to time to avoid rounding error).

Matrix3 rotated ( Vector3 axis, float phi )

Return the rotated version of the matrix, by a given axis and angle.

Matrix3 scaled ( Vector3 scale )

Return the scaled version of the matrix, by a 3D scale.

float tdotx ( Vector3 with )

Transposed dot product with the x axis of the matrix.

float tdoty ( Vector3 with )

Transposed dot product with the y axis of the matrix.

float tdotz ( Vector3 with )

Transposed dot product with the z axis of the matrix.

Matrix3 transposed ( )

Return the transposed version of the matrix.

Vector3 xform ( Vector3 v )

Return a vector transformed by the matrix and return it.

Vector3 xform_inv ( Vector3 v )

Return a vector transformed by the transposed matrix and return it.

© 2014–2020 Juan Linietsky, Ariel Manzur, Godot Engine contributors
Licensed under the MIT License.
https://docs.godotengine.org/en/2.1/classes/class_matrix3.html