Java com.badlogic.gdx.math Matrix4 fields, constructors, methods, implement or subclass

Example usage for Java com.badlogic.gdx.math Matrix4 fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for com.badlogic.gdx.math Matrix4.

The text is from its open source code.

Field

intM00
XX: Typically the unrotated X component for scaling, also the cosine of the angle when rotated on the Y and/or Z axis.
intM01
XY: Typically the negative sine of the angle when rotated on the Z axis.
intM02
XZ: Typically the sine of the angle when rotated on the Y axis.
intM03
XW: Typically the translation of the X component.
intM10
YX: Typically the sine of the angle when rotated on the Z axis.
intM11
YY: Typically the unrotated Y component for scaling, also the cosine of the angle when rotated on the X and/or Z axis.
intM12
YZ: Typically the negative sine of the angle when rotated on the X axis.
intM13
YW: Typically the translation of the Y component.
intM20
ZX: Typically the negative sine of the angle when rotated on the Y axis.
intM21
ZY: Typical the sine of the angle when rotated on the X axis.
intM22
ZZ: Typically the unrotated Z component for scaling, also the cosine of the angle when rotated on the X and/or Y axis.
intM23
ZW: Typically the translation of the Z component.
intM30
WX: Typically the value zero.
intM31
WY: Typically the value zero.
intM32
WZ: Typically the value zero.
intM33
WW: Typically the value one.

Constructor

Matrix4(Matrix4 matrix)
Constructs a matrix from the given matrix.
Matrix4(float[] values)
Constructs a matrix from the given float array.
Matrix4(Quaternion quaternion)
Constructs a rotation matrix from the given Quaternion .
Matrix4()
Constructs an identity matrix
Matrix4(Vector3 position, Quaternion rotation, Vector3 scale)
Construct a matrix from the given translation, rotation and scale.

Method

Matrix4cpy()
QuaterniongetRotation(Quaternion rotation)
Gets the rotation of this matrix.
Vector3getTranslation(Vector3 position)
float[]getValues()
Matrix4idt()
Sets the matrix to an identity matrix.
Matrix4inv()
Inverts the matrix.
Matrix4mul(Matrix4 matrix)
Postmultiplies this matrix with the given matrix, storing the result in this matrix.
Matrix4rotate(float axisX, float axisY, float axisZ, float degrees)
Postmultiplies this matrix with a (counter-clockwise) rotation matrix.
Matrix4rotate(Quaternion rotation)
Postmultiplies this matrix with a (counter-clockwise) rotation matrix.
Matrix4rotateRad(Vector3 axis, float radians)
Postmultiplies this matrix with a (counter-clockwise) rotation matrix.
Matrix4scale(float scaleX, float scaleY, float scaleZ)
Postmultiplies this matrix with a scale matrix.
Matrix4scl(Vector3 scale)
Matrix4scl(float scale)
Matrix4set(Matrix4 matrix)
Sets the matrix to the given matrix.
Matrix4set(float[] values)
Sets the matrix to the given matrix as a float array.
Matrix4set(Quaternion quaternion)
Sets the matrix to a rotation matrix representing the quaternion.
Matrix4set(Matrix3 mat)
Sets this matrix to the given 3x3 matrix.
Matrix4set(Affine2 affine)
Sets this matrix to the given affine matrix.
Matrix4set(float quaternionX, float quaternionY, float quaternionZ, float quaternionW)
Sets the matrix to a rotation matrix representing the quaternion.
Matrix4set(Vector3 xAxis, Vector3 yAxis, Vector3 zAxis, Vector3 pos)
Sets the four columns of the matrix which correspond to the x-, y- and z-axis of the vector space this matrix creates as well as the 4th column representing the translation of any point that is multiplied by this matrix.
Matrix4setToLookAt(Vector3 direction, Vector3 up)
Sets the matrix to a look at matrix with a direction and an up vector.
Matrix4setToOrtho2D(float x, float y, float width, float height)
Sets this matrix to an orthographic projection matrix with the origin at (x,y) extending by width and height.
Matrix4setToRotation(Vector3 axis, float degrees)
Sets the matrix to a rotation matrix around the given axis.
Matrix4setToRotation(final Vector3 v1, final Vector3 v2)
Set the matrix to a rotation matrix between two vectors.
Matrix4setTranslation(Vector3 vector)
Sets the 4th column to the translation vector.
Matrix4setTranslation(float x, float y, float z)
Sets the 4th column to the translation vector.
Matrix4tra()
Transposes the matrix.
Matrix4translate(float x, float y, float z)
Postmultiplies this matrix by a translation matrix.
Matrix4translate(Vector3 translation)
Postmultiplies this matrix by a translation matrix.
Matrix4trn(float x, float y, float z)
Adds a translational component to the matrix in the 4th column.