Vector3 class it allows the chaining of methods by returning a reference to itself. For example:
Matrix4 mat = new Matrix4().trn(position).mul(camera.combined);
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final Vector3 | |
| pack-priv static final Vector3 | |
| pack-priv static final Vector3 | |
| public static final int | M00
XX: Typically the unrotated X component for scaling, also the cosine of the angle when rotated on the Y and/or Z axis. |
| public static final int | M01
XY: Typically the negative sine of the angle when rotated on the Z axis. |
| public static final int | M02
XZ: Typically the sine of the angle when rotated on the Y axis. |
| public static final int | M03
XW: Typically the translation of the X component. |
| public static final int | M10
YX: Typically the sine of the angle when rotated on the Z axis. |
| public static final int | M11
YY: Typically the unrotated Y component for scaling, also the cosine of the angle when rotated on the X and/or Z axis. |
| public static final int | M12
YZ: Typically the negative sine of the angle when rotated on the X axis. |
| public static final int | M13
YW: Typically the translation of the Y component. |
| public static final int | M20
ZX: Typically the negative sine of the angle when rotated on the Y axis. |
| public static final int | M21
ZY: Typical the sine of the angle when rotated on the X axis. |
| public static final int | M22
ZZ: Typically the unrotated Z component for scaling, also the cosine of the angle when rotated on the X and/or Y axis. |
| public static final int | M23
ZW: Typically the translation of the Z component. |
| public static final int | M30
WX: Typically the value zero. |
| public static final int | M31
WY: Typically the value zero. |
| public static final int | M32
WZ: Typically the value zero. |
| public static final int | M33
WW: Typically the value one. |
| pack-priv static final Quaternion | |
| pack-priv static final Quaternion | |
| pack-priv static final Vector3 | |
| private static final long | |
| pack-priv static final Vector3 | |
| pack-priv static final Matrix4 | |
| pack-priv static final Vector3 | |
| pack-priv static final Vector3 | |
| public final float[] |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | Matrix4(float[]
The float array to copy. Remember that this matrix is in
column major order. (The float array is not
modified) values)Constructs a matrix from the given float array. |
| public | Matrix4(Quaternion
The quaternion to be copied. (The quaternion is not modified) quaternion)Constructs a rotation matrix from the given |
| public | Matrix4(Vector3
The translation position, Quaternion The rotation, must be normalized rotation, Vector3 The scale scale)Construct a matrix from the given translation, rotation and scale. |
| Modifier and Type | Method and Description |
|---|---|
| public Matrix4 | |
| public Matrix4 | |
| public Matrix4 | |
| public Matrix4 | |
| public float | |
| public static float | Returns: the determinante.the matrix values. values)Computes the determinante of the given matrix. |
| public float | |
| public void | extract4x3Matrix(float[]
the destination matrix dst)Copies the 4x3 upper-left sub-matrix into float array. |
| public Quaternion | Returns: The providedQuaternion for chaining.The rotation, boolean Quaternion to receive the rotationTrue to normalize the axes, necessary when the matrix might also include scaling. normalizeAxes)Gets the rotation of this matrix. |
| public Quaternion | Returns: The providedQuaternion for chaining.The rotation)Quaternion to receive the rotationGets the rotation of this matrix. |
| public Vector3 | |
| public float | |
| public float | |
| public float | |
| public float | |
| public float | |
| public float | |
| public Vector3 | |
| public float[] | |
| public boolean | |
| public Matrix4 | Returns: This matrix for the purpose of chaining methods together.Sets the matrix to an identity matrix. |
| public Matrix4 | |
| public static boolean | Returns: false in case the inverse could not be calculated, true otherwise.the matrix values. values)Computes the inverse of the given matrix. |
| public Matrix4 | |
| public Matrix4 | |
| public static void | mul(float[]
the first matrix. mata, float[] the second matrix. matb)Multiplies the matrix mata with matrix matb, storing the result in mata. |
| public Matrix4 | |
| public static native void | mulVec(float[]
the matrix mat, float[] the vectors vecs, int the offset into the vectors array offset, int the number of vectors numVecs, int the stride between vectors in floats stride)Multiplies the vectors with the given matrix. |
| public static void | |
| public static native void | prj(float[]
the matrix mat, float[] the vectors vecs, int the offset into the vectors array offset, int the number of vectors numVecs, int the stride between vectors in floats stride)Multiplies the vectors with the given matrix, , performing a division by w. |
| public static void | prj(float[]
the matrix mat, float[] the vector. vec)Multiplies the vector with the given matrix, performing a division by w. |
| public static native void | rot(float[]
the matrix mat, float[] the vectors vecs, int the offset into the vectors array offset, int the number of vectors numVecs, int the stride between vectors in floats stride)Multiplies the vectors with the top most 3x3 sub-matrix of the given matrix. |
| public static void | rot(float[]
the matrix mat, float[] the vector. vec)Multiplies the vector with the top most 3x3 sub-matrix of the given matrix. |
| public Matrix4 | |
| public Matrix4 | Returns: This matrix for the purpose of chaining methods together.The x-axis component of the vector to rotate around. axisX, float The y-axis component of the vector to rotate around. axisY, float The z-axis component of the vector to rotate around. axisZ, float The angle in degrees degrees)Postmultiplies this matrix with a (counter-clockwise) rotation matrix. |
| public Matrix4 | Returns: This matrix for the purpose of chaining methods together.Postmultiplies this matrix with a (counter-clockwise) rotation matrix. |
| public Matrix4 | |
| public Matrix4 | |
| public Matrix4 | Returns: This matrix for the purpose of chaining methods together.The x-axis component of the vector to rotate around. axisX, float The y-axis component of the vector to rotate around. axisY, float The z-axis component of the vector to rotate around. axisZ, float The angle in radians radians)Postmultiplies this matrix with a (counter-clockwise) rotation matrix. |
| public Matrix4 | Returns: This matrix for chainingdirection to rotate toward direction, final Vector3 up vector up)Post-multiplies this matrix by a rotation toward a direction. |
| public Matrix4 | Returns: This matrix for chainingthe target to rotate to target, final Vector3 the up vector up)Post-multiplies this matrix by a rotation toward a target. |
| public Matrix4 | Returns: This matrix for the purpose of chaining methods together.The scale in the x-axis. scaleX, float The scale in the y-axis. scaleY, float The scale in the z-axis. scaleZ)Postmultiplies this matrix with a scale matrix. |
| public Matrix4 | |
| public Matrix4 | |
| public Matrix4 | |
| public Matrix4 | |
| public Matrix4 | Returns: This matrix for the purpose of chaining methods together.The matrix, in float form, that is to be copied. Remember that this matrix is in
column major order. values)Sets the matrix to the given matrix as a float array. |
| public Matrix4 | Returns: This matrix for the purpose of chaining methods together.The quaternion that is to be used to set this matrix. quaternion)Sets the matrix to a rotation matrix representing the quaternion. |
| public Matrix4 | Returns: This matrix for the purpose of chaining methods together.The X component of the quaternion that is to be used to set this matrix. quaternionX, float The Y component of the quaternion that is to be used to set this matrix. quaternionY, float The Z component of the quaternion that is to be used to set this matrix. quaternionZ, float The W component of the quaternion that is to be used to set this matrix. quaternionW)Sets the matrix to a rotation matrix representing the quaternion. |
| public Matrix4 | Returns: This matrix for chainingThe translation position, Quaternion The rotation, must be normalized orientation)Set this matrix to the specified translation and rotation. |
| public Matrix4 | Returns: This matrix for the purpose of chaining methods together.The X component of the translation that is to be used to set this matrix. translationX, float The Y component of the translation that is to be used to set this matrix. translationY, float The Z component of the translation that is to be used to set this matrix. translationZ, float The X component of the quaternion that is to be used to set this matrix. quaternionX, float The Y component of the quaternion that is to be used to set this matrix. quaternionY, float The Z component of the quaternion that is to be used to set this matrix. quaternionZ, float The W component of the quaternion that is to be used to set this matrix. quaternionW)Sets the matrix to a rotation matrix representing the translation and quaternion. |
| public Matrix4 | Returns: This matrix for chainingThe translation position, Quaternion The rotation, must be normalized orientation, Vector3 The scale scale)Set this matrix to the specified translation, rotation and scale. |
| public Matrix4 | Returns: This matrix for the purpose of chaining methods together.The X component of the translation that is to be used to set this matrix. translationX, float The Y component of the translation that is to be used to set this matrix. translationY, float The Z component of the translation that is to be used to set this matrix. translationZ, float The X component of the quaternion that is to be used to set this matrix. quaternionX, float The Y component of the quaternion that is to be used to set this matrix. quaternionY, float The Z component of the quaternion that is to be used to set this matrix. quaternionZ, float The W component of the quaternion that is to be used to set this matrix. quaternionW, float The X component of the scaling that is to be used to set this matrix. scaleX, float The Y component of the scaling that is to be used to set this matrix. scaleY, float The Z component of the scaling that is to be used to set this matrix. scaleZ)Sets the matrix to a rotation matrix representing the translation and quaternion. |
| public Matrix4 | set(Vector3
The x-axis. xAxis, Vector3 The y-axis. yAxis, Vector3 The z-axis. zAxis, Vector3 The translation vector. 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. |
| public Matrix4 | |
| public Matrix4 | |
| public Matrix4 | Returns: This matrix for chainingthe source matrix affine)Assumes that this matrix is a 2D affine transformation, copying only the relevant components. |
| public Matrix4 | Returns: This matrix for chainingthe source matrix mat)Assumes that both matrices are 2D affine transformations, copying only the relevant components. |
| public Matrix4 | Returns: This matrixthe yaw in degrees yaw, float the pitch in degrees pitch, float the roll in degrees roll)Sets this matrix to a rotation matrix from the given euler angles. |
| public Matrix4 | Returns: This matrixthe yaw in radians yaw, float the pitch in radians pitch, float the roll in radians roll)Sets this matrix to a rotation matrix from the given euler angles. |
| public Matrix4 | Returns: This matrix for the purpose of chaining methods together.The direction vector direction, Vector3 The up vector up)Sets the matrix to a look at matrix with a direction and an up vector. |
| public Matrix4 | Returns: This matrixthe position position, Vector3 the target target, Vector3 the up vector up)Sets this matrix to a look at matrix with the given position, target and up vector. |
| public Matrix4 | Returns: This matrix for the purpose of chaining methods together.The left clipping plane left, float The right clipping plane right, float The bottom clipping plane bottom, float The top clipping plane top, float The near clipping plane near, float The far clipping plane far)Sets the matrix to an orthographic projection like glOrtho (http://www.opengl.org/sdk/docs/man/xhtml/glOrtho.xml) following the OpenGL equivalent |
| public Matrix4 | Returns: This matrix for the purpose of chaining methods together.The x-coordinate of the origin x, float The y-coordinate of the origin y, float The width width, float The height height)Sets this matrix to an orthographic projection matrix with the origin at (x,y) extending by width and height. |
| public Matrix4 | Returns: This matrix for the purpose of chaining methods together.The x-coordinate of the origin x, float The y-coordinate of the origin y, float The width width, float The height height, float The near plane near, float The far plane far)Sets this matrix to an orthographic projection matrix with the origin at (x,y) extending by width and height, having a near and far plane. |
| public Matrix4 | Returns: This matrix for the purpose of chaining methods together.The near plane near, float The far plane far, float The field of view of the height in degrees fovy, float The "width over height" aspect ratio aspectRatio)Sets the matrix to a projection matrix with a near- and far plane, a field of view in degrees and an aspect ratio. |
| public Matrix4 | Returns: This matrix for the purpose of chaining methods together.The near plane near, float The far plane far)Sets the matrix to a projection matrix with a near/far plane, and left, bottom, right and top specifying the points on the near plane that are mapped to the lower left and upper right corners of the viewport. |
| public Matrix4 | Returns: This matrix for the purpose of chaining methods together.The axis axis, float The angle in degrees degrees)Sets the matrix to a rotation matrix around the given axis. |
| public Matrix4 | Returns: This matrix for the purpose of chaining methods together.The x-component of the axis axisX, float The y-component of the axis axisY, float The z-component of the axis axisZ, float The angle in degrees degrees)Sets the matrix to a rotation matrix around the given axis. |
| public Matrix4 | Returns: This matrix for the purpose of chaining methods togetherThe base vector v1, final Vector3 The target vector v2)Set the matrix to a rotation matrix between two vectors. |
| public Matrix4 | Returns: This matrix for the purpose of chaining methods togetherThe base vectors x value x1, final float The base vectors y value y1, final float The base vectors z value z1, final float The target vector x value x2, final float The target vector y value y2, final float The target vector z value z2)Set the matrix to a rotation matrix between two vectors. |
| public Matrix4 | Returns: This matrix for the purpose of chaining methods together.The axis axis, float The angle in radians radians)Sets the matrix to a rotation matrix around the given axis. |
| public Matrix4 | Returns: This matrix for the purpose of chaining methods together.The x-component of the axis axisX, float The y-component of the axis axisY, float The z-component of the axis axisZ, float The angle in radians radians)Sets the matrix to a rotation matrix around the given axis. |
| public Matrix4 | Returns: This matrix for chaining.The scaling vector vector)Sets this matrix to a scaling matrix |
| public Matrix4 | Returns: This matrix for chaining.The x-component of the scaling vector x, float The y-component of the scaling vector y, float The z-component of the scaling vector z)Sets this matrix to a scaling matrix |
| public Matrix4 | Returns: This matrix for the purpose of chaining methods together.The translation vector vector)Sets this matrix to a translation matrix, overwriting it first by an identity matrix and then setting the 4th column to the translation vector. |
| public Matrix4 | Returns: This matrix for the purpose of chaining methods together.The x-component of the translation vector. x, float The y-component of the translation vector. y, float The z-component of the translation vector. z)Sets this matrix to a translation matrix, overwriting it first by an identity matrix and then setting the 4th column to the translation vector. |
| public Matrix4 | Returns: This matrix for the purpose of chaining methods together.The translation vector translation, Vector3 The scaling vector scaling)Sets this matrix to a translation and scaling matrix by first overwriting it with an identity and then setting the translation vector in the 4th column and the scaling vector in the diagonal. |
| public Matrix4 | Returns: This matrix for the purpose of chaining methods together.The x-component of the translation vector translationX, float The y-component of the translation vector translationY, float The z-component of the translation vector translationZ, float The x-component of the scaling vector scalingX, float The x-component of the scaling vector scalingY, float The x-component of the scaling vector scalingZ)Sets this matrix to a translation and scaling matrix by first overwriting it with an identity and then setting the translation vector in the 4th column and the scaling vector in the diagonal. |
| public Matrix4 | |
| public Matrix4 | Returns: This matrix for the purpose of chaining methods together.The translation vector vector)Sets the 4th column to the translation vector. |
| public Matrix4 | Returns: This matrix for the purpose of chaining methods together.The X coordinate of the translation vector x, float The Y coordinate of the translation vector y, float The Z coordinate of the translation vector z)Sets the 4th column to the translation vector. |
| public Matrix4 | |
| public String | |
| public Matrix4 | |
| public Matrix4 | |
| public Matrix4 | Returns: This matrix for the purpose of chaining methods together.Translation in the x-axis. x, float Translation in the y-axis. y, float Translation in the z-axis. z)Postmultiplies this matrix by a translation matrix. |
| public Matrix4 | |
| public Matrix4 | Returns: This matrix for the purpose of chaining methods together.The x-component of the translation vector. x, float The y-component of the translation vector. y, float The z-component of the translation vector. z)Adds a translational component to the matrix in the 4th column. |