Class Matrix3f
- java.lang.Object
-
- org.joml.Matrix3f
-
- All Implemented Interfaces:
java.io.Externalizable,java.io.Serializable,java.lang.Cloneable,Matrix3fc
- Direct Known Subclasses:
Matrix3fStack
public class Matrix3f extends java.lang.Object implements java.io.Externalizable, java.lang.Cloneable, Matrix3fc
Contains the definition of a 3x3 matrix of floats, and associated functions to transform it. The matrix is column-major to match OpenGL's interpretation, and it looks like this:m00 m10 m20
m01 m11 m21
m02 m12 m22- Author:
- Richard Greenlees, Kai Burjack
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Matrix3f()Matrix3f(float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22)Create a new 3x3 matrix using the supplied float values.Matrix3f(java.nio.FloatBuffer buffer)Create a newMatrix3fby reading its 9 float components from the givenFloatBufferat the buffer's current position.Matrix3f(Matrix2fc mat)Matrix3f(Matrix3fc mat)Create a newMatrix3fand make it a copy of the given matrix.Matrix3f(Matrix4fc mat)Matrix3f(Vector3fc col0, Vector3fc col1, Vector3fc col2)Create a newMatrix3fand initialize its three columns using the supplied vectors.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Matrix3fadd(Matrix3fc other)Component-wise addthisandother.Matrix3fadd(Matrix3fc other, Matrix3f dest)Component-wise addthisandotherand store the result indest.java.lang.Objectclone()Matrix3fcofactor()Compute the cofactor matrix ofthis.Matrix3fcofactor(Matrix3f dest)Compute the cofactor matrix ofthisand store it intodest.floatdeterminant()Return the determinant of this matrix.booleanequals(java.lang.Object obj)booleanequals(Matrix3fc m, float delta)Compare the matrix elements ofthismatrix with the given matrix using the givendeltaand return whether all of them are equal within a maximum difference ofdelta.float[]get(float[] arr)Store this matrix into the supplied float array in column-major order.float[]get(float[] arr, int offset)Store this matrix into the supplied float array in column-major order at the given offset.floatget(int column, int row)Get the matrix element value at the given column and row.java.nio.ByteBufferget(int index, java.nio.ByteBuffer buffer)Store this matrix in column-major order into the suppliedByteBufferstarting at the specified absolute buffer position/index.java.nio.FloatBufferget(int index, java.nio.FloatBuffer buffer)Store this matrix in column-major order into the suppliedFloatBufferstarting at the specified absolute buffer position/index.java.nio.ByteBufferget(java.nio.ByteBuffer buffer)Store this matrix in column-major order into the suppliedByteBufferat the current bufferposition.java.nio.FloatBufferget(java.nio.FloatBuffer buffer)Store this matrix in column-major order into the suppliedFloatBufferat the current bufferposition.Matrix3fget(Matrix3f dest)Get the current values ofthismatrix and store them intodest.Matrix4fget(Matrix4f dest)Get the current values ofthismatrix and store them as the rotational component ofdest.java.nio.ByteBufferget3x4(int index, java.nio.ByteBuffer buffer)Store this matrix as 3x4 matrix in column-major order into the suppliedByteBufferstarting at the specified absolute buffer position/index, with the m03, m13 and m23 components being zero.java.nio.FloatBufferget3x4(int index, java.nio.FloatBuffer buffer)Store this matrix as 3x4 matrix in column-major order into the suppliedFloatBufferstarting at the specified absolute buffer position/index, with the m03, m13 and m23 components being zero.java.nio.ByteBufferget3x4(java.nio.ByteBuffer buffer)Store this matrix as 3x4 matrix in column-major order into the suppliedByteBufferat the current bufferposition, with the m03, m13 and m23 components being zero.java.nio.FloatBufferget3x4(java.nio.FloatBuffer buffer)Store this matrix as 3x4 matrix in column-major order into the suppliedFloatBufferat the current bufferposition, with the m03, m13 and m23 components being zero.Vector3fgetColumn(int column, Vector3f dest)Get the column at the givencolumnindex, starting with0.Vector3fgetEulerAnglesXYZ(Vector3f dest)Extract the Euler angles from the rotation represented bythismatrix and store the extracted Euler angles indest.Vector3fgetEulerAnglesZYX(Vector3f dest)Extract the Euler angles from the rotation represented bythismatrix and store the extracted Euler angles indest.QuaterniondgetNormalizedRotation(Quaterniond dest)Get the current values ofthismatrix and store the represented rotation into the givenQuaterniond.QuaternionfgetNormalizedRotation(Quaternionf dest)Get the current values ofthismatrix and store the represented rotation into the givenQuaternionf.AxisAngle4fgetRotation(AxisAngle4f dest)Get the current values ofthismatrix and store the represented rotation into the givenAxisAngle4f.Vector3fgetRow(int row, Vector3f dest)Get the row at the givenrowindex, starting with0.floatgetRowColumn(int row, int column)Get the matrix element value at the given row and column.Vector3fgetScale(Vector3f dest)Get the scaling factors ofthismatrix for the three base axes.Matrix3fcgetToAddress(long address)Store this matrix in column-major order at the given off-heap address.java.nio.ByteBuffergetTransposed(int index, java.nio.ByteBuffer buffer)Store the transpose of this matrix in column-major order into the suppliedByteBufferstarting at the specified absolute buffer position/index.java.nio.FloatBuffergetTransposed(int index, java.nio.FloatBuffer buffer)Store the transpose of this matrix in column-major order into the suppliedFloatBufferstarting at the specified absolute buffer position/index.java.nio.ByteBuffergetTransposed(java.nio.ByteBuffer buffer)Store the transpose of this matrix in column-major order into the suppliedByteBufferat the current bufferposition.java.nio.FloatBuffergetTransposed(java.nio.FloatBuffer buffer)Store the transpose of this matrix in column-major order into the suppliedFloatBufferat the current bufferposition.QuaterniondgetUnnormalizedRotation(Quaterniond dest)Get the current values ofthismatrix and store the represented rotation into the givenQuaterniond.QuaternionfgetUnnormalizedRotation(Quaternionf dest)Get the current values ofthismatrix and store the represented rotation into the givenQuaternionf.inthashCode()Matrix3fidentity()Set this matrix to the identity.Matrix3finvert()Invert this matrix.Matrix3finvert(Matrix3f dest)Invert thethismatrix and store the result indest.booleanisFinite()Determine whether all matrix elements are finite floating-point values, that is, they are notNaNand notinfinity.Matrix3flerp(Matrix3fc other, float t)Linearly interpolatethisandotherusing the given interpolation factortand store the result inthis.Matrix3flerp(Matrix3fc other, float t, Matrix3f dest)Linearly interpolatethisandotherusing the given interpolation factortand store the result indest.Matrix3flookAlong(float dirX, float dirY, float dirZ, float upX, float upY, float upZ)Apply a rotation transformation to this matrix to make-zpoint alongdir.Matrix3flookAlong(float dirX, float dirY, float dirZ, float upX, float upY, float upZ, Matrix3f dest)Apply a rotation transformation to this matrix to make-zpoint alongdirand store the result indest.Matrix3flookAlong(Vector3fc dir, Vector3fc up)Apply a rotation transformation to this matrix to make-zpoint alongdir.Matrix3flookAlong(Vector3fc dir, Vector3fc up, Matrix3f dest)Apply a rotation transformation to this matrix to make-zpoint alongdirand store the result indest.floatm00()Return the value of the matrix element at column 0 and row 0.Matrix3fm00(float m00)Set the value of the matrix element at column 0 and row 0.floatm01()Return the value of the matrix element at column 0 and row 1.Matrix3fm01(float m01)Set the value of the matrix element at column 0 and row 1.floatm02()Return the value of the matrix element at column 0 and row 2.Matrix3fm02(float m02)Set the value of the matrix element at column 0 and row 2.floatm10()Return the value of the matrix element at column 1 and row 0.Matrix3fm10(float m10)Set the value of the matrix element at column 1 and row 0.floatm11()Return the value of the matrix element at column 1 and row 1.Matrix3fm11(float m11)Set the value of the matrix element at column 1 and row 1.floatm12()Return the value of the matrix element at column 1 and row 2.Matrix3fm12(float m12)Set the value of the matrix element at column 1 and row 2.floatm20()Return the value of the matrix element at column 2 and row 0.Matrix3fm20(float m20)Set the value of the matrix element at column 2 and row 0.floatm21()Return the value of the matrix element at column 2 and row 1.Matrix3fm21(float m21)Set the value of the matrix element at column 2 and row 1.floatm22()Return the value of the matrix element at column 2 and row 2.Matrix3fm22(float m22)Set the value of the matrix element at column 2 and row 2.Matrix3fmapnXnYnZ()Multiplythisby the matrixMatrix3fmapnXnYnZ(Matrix3f dest)Multiplythisby the matrixMatrix3fmapnXnYZ()Multiplythisby the matrixMatrix3fmapnXnYZ(Matrix3f dest)Multiplythisby the matrixMatrix3fmapnXnZnY()Multiplythisby the matrixMatrix3fmapnXnZnY(Matrix3f dest)Multiplythisby the matrixMatrix3fmapnXnZY()Multiplythisby the matrixMatrix3fmapnXnZY(Matrix3f dest)Multiplythisby the matrixMatrix3fmapnXYnZ()Multiplythisby the matrixMatrix3fmapnXYnZ(Matrix3f dest)Multiplythisby the matrixMatrix3fmapnXZnY()Multiplythisby the matrixMatrix3fmapnXZnY(Matrix3f dest)Multiplythisby the matrixMatrix3fmapnXZY()Multiplythisby the matrixMatrix3fmapnXZY(Matrix3f dest)Multiplythisby the matrixMatrix3fmapnYnXnZ()Multiplythisby the matrixMatrix3fmapnYnXnZ(Matrix3f dest)Multiplythisby the matrixMatrix3fmapnYnXZ()Multiplythisby the matrixMatrix3fmapnYnXZ(Matrix3f dest)Multiplythisby the matrixMatrix3fmapnYnZnX()Multiplythisby the matrixMatrix3fmapnYnZnX(Matrix3f dest)Multiplythisby the matrixMatrix3fmapnYnZX()Multiplythisby the matrixMatrix3fmapnYnZX(Matrix3f dest)Multiplythisby the matrixMatrix3fmapnYXnZ()Multiplythisby the matrixMatrix3fmapnYXnZ(Matrix3f dest)Multiplythisby the matrixMatrix3fmapnYXZ()Multiplythisby the matrixMatrix3fmapnYXZ(Matrix3f dest)Multiplythisby the matrixMatrix3fmapnYZnX()Multiplythisby the matrixMatrix3fmapnYZnX(Matrix3f dest)Multiplythisby the matrixMatrix3fmapnYZX()Multiplythisby the matrixMatrix3fmapnYZX(Matrix3f dest)Multiplythisby the matrixMatrix3fmapnZnXnY()Multiplythisby the matrixMatrix3fmapnZnXnY(Matrix3f dest)Multiplythisby the matrixMatrix3fmapnZnXY()Multiplythisby the matrixMatrix3fmapnZnXY(Matrix3f dest)Multiplythisby the matrixMatrix3fmapnZnYnX()Multiplythisby the matrixMatrix3fmapnZnYnX(Matrix3f dest)Multiplythisby the matrixMatrix3fmapnZnYX()Multiplythisby the matrixMatrix3fmapnZnYX(Matrix3f dest)Multiplythisby the matrixMatrix3fmapnZXnY()Multiplythisby the matrixMatrix3fmapnZXnY(Matrix3f dest)Multiplythisby the matrixMatrix3fmapnZXY()Multiplythisby the matrixMatrix3fmapnZXY(Matrix3f dest)Multiplythisby the matrixMatrix3fmapnZYnX()Multiplythisby the matrixMatrix3fmapnZYnX(Matrix3f dest)Multiplythisby the matrixMatrix3fmapnZYX()Multiplythisby the matrixMatrix3fmapnZYX(Matrix3f dest)Multiplythisby the matrixMatrix3fmapXnYnZ()Multiplythisby the matrixMatrix3fmapXnYnZ(Matrix3f dest)Multiplythisby the matrixMatrix3fmapXnZnY()Multiplythisby the matrixMatrix3fmapXnZnY(Matrix3f dest)Multiplythisby the matrixMatrix3fmapXnZY()Multiplythisby the matrixMatrix3fmapXnZY(Matrix3f dest)Multiplythisby the matrixMatrix3fmapXZnY()Multiplythisby the matrixMatrix3fmapXZnY(Matrix3f dest)Multiplythisby the matrixMatrix3fmapXZY()Multiplythisby the matrixMatrix3fmapXZY(Matrix3f dest)Multiplythisby the matrixMatrix3fmapYnXnZ()Multiplythisby the matrixMatrix3fmapYnXnZ(Matrix3f dest)Multiplythisby the matrixMatrix3fmapYnXZ()Multiplythisby the matrixMatrix3fmapYnXZ(Matrix3f dest)Multiplythisby the matrixMatrix3fmapYnZnX()Multiplythisby the matrixMatrix3fmapYnZnX(Matrix3f dest)Multiplythisby the matrixMatrix3fmapYnZX()Multiplythisby the matrixMatrix3fmapYnZX(Matrix3f dest)Multiplythisby the matrixMatrix3fmapYXnZ()Multiplythisby the matrixMatrix3fmapYXnZ(Matrix3f dest)Multiplythisby the matrixMatrix3fmapYXZ()Multiplythisby the matrixMatrix3fmapYXZ(Matrix3f dest)Multiplythisby the matrixMatrix3fmapYZnX()Multiplythisby the matrixMatrix3fmapYZnX(Matrix3f dest)Multiplythisby the matrixMatrix3fmapYZX()Multiplythisby the matrixMatrix3fmapYZX(Matrix3f dest)Multiplythisby the matrixMatrix3fmapZnXnY()Multiplythisby the matrixMatrix3fmapZnXnY(Matrix3f dest)Multiplythisby the matrixMatrix3fmapZnXY()Multiplythisby the matrixMatrix3fmapZnXY(Matrix3f dest)Multiplythisby the matrixMatrix3fmapZnYnX()Multiplythisby the matrixMatrix3fmapZnYnX(Matrix3f dest)Multiplythisby the matrixMatrix3fmapZnYX()Multiplythisby the matrixMatrix3fmapZnYX(Matrix3f dest)Multiplythisby the matrixMatrix3fmapZXnY()Multiplythisby the matrixMatrix3fmapZXnY(Matrix3f dest)Multiplythisby the matrixMatrix3fmapZXY()Multiplythisby the matrixMatrix3fmapZXY(Matrix3f dest)Multiplythisby the matrixMatrix3fmapZYnX()Multiplythisby the matrixMatrix3fmapZYnX(Matrix3f dest)Multiplythisby the matrixMatrix3fmapZYX()Multiplythisby the matrixMatrix3fmapZYX(Matrix3f dest)Multiplythisby the matrixMatrix3fmul(Matrix3fc right)Multiply this matrix by the suppliedrightmatrix.Matrix3fmul(Matrix3fc right, Matrix3f dest)Multiply this matrix by the suppliedrightmatrix and store the result indest.Matrix3fmulComponentWise(Matrix3fc other)Component-wise multiplythisbyother.Matrix3fmulComponentWise(Matrix3fc other, Matrix3f dest)Component-wise multiplythisbyotherand store the result indest.Matrix3fmulLocal(Matrix3fc left)Pre-multiply this matrix by the suppliedleftmatrix and store the result inthis.Matrix3fmulLocal(Matrix3fc left, Matrix3f dest)Pre-multiply this matrix by the suppliedleftmatrix and store the result indest.Matrix3fnegateX()Multiplythisby the matrixMatrix3fnegateX(Matrix3f dest)Multiplythisby the matrixMatrix3fnegateY()Multiplythisby the matrixMatrix3fnegateY(Matrix3f dest)Multiplythisby the matrixMatrix3fnegateZ()Multiplythisby the matrixMatrix3fnegateZ(Matrix3f dest)Multiplythisby the matrixMatrix3fnormal()Setthismatrix to its own normal matrix.Matrix3fnormal(Matrix3f dest)Compute a normal matrix fromthismatrix and store it intodest.Vector3fnormalizedPositiveX(Vector3f dir)Obtain the direction of+Xbefore the transformation represented bythisorthogonal matrix is applied.Vector3fnormalizedPositiveY(Vector3f dir)Obtain the direction of+Ybefore the transformation represented bythisorthogonal matrix is applied.Vector3fnormalizedPositiveZ(Vector3f dir)Obtain the direction of+Zbefore the transformation represented bythisorthogonal matrix is applied.Matrix3fobliqueZ(float a, float b)Apply an oblique projection transformation to this matrix with the given values foraandb.Matrix3fobliqueZ(float a, float b, Matrix3f dest)Apply an oblique projection transformation to this matrix with the given values foraandband store the result indest.Vector3fpositiveX(Vector3f dir)Obtain the direction of+Xbefore the transformation represented bythismatrix is applied.Vector3fpositiveY(Vector3f dir)Obtain the direction of+Ybefore the transformation represented bythismatrix is applied.Vector3fpositiveZ(Vector3f dir)Obtain the direction of+Zbefore the transformation represented bythismatrix is applied.floatquadraticFormProduct(float x, float y, float z)Compute(x, y, z)^T * this * (x, y, z).floatquadraticFormProduct(Vector3fc v)Computev^T * this * v.voidreadExternal(java.io.ObjectInput in)Matrix3freflect(float nx, float ny, float nz)Apply a mirror/reflection transformation to this matrix that reflects through the given plane specified via the plane normal.Matrix3freflect(float nx, float ny, float nz, Matrix3f dest)Apply a mirror/reflection transformation to this matrix that reflects through the given plane specified via the plane normal(nx, ny, nz), and store the result indest.Matrix3freflect(Quaternionfc orientation)Apply a mirror/reflection transformation to this matrix that reflects about a plane specified via the plane orientation.Matrix3freflect(Quaternionfc orientation, Matrix3f dest)Apply a mirror/reflection transformation to this matrix that reflects through a plane specified via the plane orientation, and store the result indest.Matrix3freflect(Vector3fc normal)Apply a mirror/reflection transformation to this matrix that reflects through the given plane specified via the plane normal.Matrix3freflect(Vector3fc normal, Matrix3f dest)Apply a mirror/reflection transformation to this matrix that reflects through the given plane specified via the plane normal, and store the result indest.Matrix3freflection(float nx, float ny, float nz)Set this matrix to a mirror/reflection transformation that reflects through the given plane specified via the plane normal.Matrix3freflection(Quaternionfc orientation)Set this matrix to a mirror/reflection transformation that reflects through a plane specified via the plane orientation.Matrix3freflection(Vector3fc normal)Set this matrix to a mirror/reflection transformation that reflects through the given plane specified via the plane normal.Matrix3frotate(float ang, float x, float y, float z)Apply rotation to this matrix by rotating the given amount of radians about the given axis specified as x, y and z components.Matrix3frotate(float ang, float x, float y, float z, Matrix3f dest)Apply rotation to this matrix by rotating the given amount of radians about the given axis specified as x, y and z components, and store the result indest.Matrix3frotate(float angle, Vector3fc axis)Apply a rotation transformation, rotating the given radians about the specified axis, to this matrix.Matrix3frotate(float angle, Vector3fc axis, Matrix3f dest)Apply a rotation transformation, rotating the given radians about the specified axis and store the result indest.Matrix3frotate(AxisAngle4f axisAngle)Apply a rotation transformation, rotating about the givenAxisAngle4f, to this matrix.Matrix3frotate(AxisAngle4f axisAngle, Matrix3f dest)Apply a rotation transformation, rotating about the givenAxisAngle4fand store the result indest.Matrix3frotate(Quaternionfc quat)Apply the rotation - and possibly scaling - transformation of the givenQuaternionfcto this matrix.Matrix3frotate(Quaternionfc quat, Matrix3f dest)Apply the rotation - and possibly scaling - transformation of the givenQuaternionfcto this matrix and store the result indest.Matrix3frotateLocal(float ang, float x, float y, float z)Pre-multiply a rotation to this matrix by rotating the given amount of radians about the specified(x, y, z)axis.Matrix3frotateLocal(float ang, float x, float y, float z, Matrix3f dest)Pre-multiply a rotation to this matrix by rotating the given amount of radians about the specified(x, y, z)axis and store the result indest.Matrix3frotateLocal(Quaternionfc quat)Pre-multiply the rotation - and possibly scaling - transformation of the givenQuaternionfcto this matrix.Matrix3frotateLocal(Quaternionfc quat, Matrix3f dest)Pre-multiply the rotation - and possibly scaling - transformation of the givenQuaternionfcto this matrix and store the result indest.Matrix3frotateLocalX(float ang)Pre-multiply a rotation to this matrix by rotating the given amount of radians about the X axis.Matrix3frotateLocalX(float ang, Matrix3f dest)Pre-multiply a rotation around the X axis to this matrix by rotating the given amount of radians about the X axis and store the result indest.Matrix3frotateLocalY(float ang)Pre-multiply a rotation to this matrix by rotating the given amount of radians about the Y axis.Matrix3frotateLocalY(float ang, Matrix3f dest)Pre-multiply a rotation around the Y axis to this matrix by rotating the given amount of radians about the Y axis and store the result indest.Matrix3frotateLocalZ(float ang)Pre-multiply a rotation to this matrix by rotating the given amount of radians about the Z axis.Matrix3frotateLocalZ(float ang, Matrix3f dest)Pre-multiply a rotation around the Z axis to this matrix by rotating the given amount of radians about the Z axis and store the result indest.Matrix3frotateTowards(float dirX, float dirY, float dirZ, float upX, float upY, float upZ)Apply a model transformation to this matrix for a right-handed coordinate system, that aligns the local+Zaxis withdirection.Matrix3frotateTowards(float dirX, float dirY, float dirZ, float upX, float upY, float upZ, Matrix3f dest)Apply a model transformation to this matrix for a right-handed coordinate system, that aligns the local+Zaxis withdirand store the result indest.Matrix3frotateTowards(Vector3fc direction, Vector3fc up)Apply a model transformation to this matrix for a right-handed coordinate system, that aligns the local+Zaxis withdirection.Matrix3frotateTowards(Vector3fc direction, Vector3fc up, Matrix3f dest)Apply a model transformation to this matrix for a right-handed coordinate system, that aligns the local+Zaxis withdirectionand store the result indest.Matrix3frotateX(float ang)Apply rotation about the X axis to this matrix by rotating the given amount of radians.Matrix3frotateX(float ang, Matrix3f dest)Apply rotation about the X axis to this matrix by rotating the given amount of radians and store the result indest.Matrix3frotateXYZ(float angleX, float angleY, float angleZ)Apply rotation ofangleXradians about the X axis, followed by a rotation ofangleYradians about the Y axis and followed by a rotation ofangleZradians about the Z axis.Matrix3frotateXYZ(float angleX, float angleY, float angleZ, Matrix3f dest)Apply rotation ofangleXradians about the X axis, followed by a rotation ofangleYradians about the Y axis and followed by a rotation ofangleZradians about the Z axis and store the result indest.Matrix3frotateXYZ(Vector3f angles)Apply rotation ofangles.xradians about the X axis, followed by a rotation ofangles.yradians about the Y axis and followed by a rotation ofangles.zradians about the Z axis.Matrix3frotateY(float ang)Apply rotation about the Y axis to this matrix by rotating the given amount of radians.Matrix3frotateY(float ang, Matrix3f dest)Apply rotation about the Y axis to this matrix by rotating the given amount of radians and store the result indest.Matrix3frotateYXZ(float angleY, float angleX, float angleZ)Apply rotation ofangleYradians about the Y axis, followed by a rotation ofangleXradians about the X axis and followed by a rotation ofangleZradians about the Z axis.Matrix3frotateYXZ(float angleY, float angleX, float angleZ, Matrix3f dest)Apply rotation ofangleYradians about the Y axis, followed by a rotation ofangleXradians about the X axis and followed by a rotation ofangleZradians about the Z axis and store the result indest.Matrix3frotateYXZ(Vector3f angles)Apply rotation ofangles.yradians about the Y axis, followed by a rotation ofangles.xradians about the X axis and followed by a rotation ofangles.zradians about the Z axis.Matrix3frotateZ(float ang)Apply rotation about the Z axis to this matrix by rotating the given amount of radians.Matrix3frotateZ(float ang, Matrix3f dest)Apply rotation about the Z axis to this matrix by rotating the given amount of radians and store the result indest.Matrix3frotateZYX(float angleZ, float angleY, float angleX)Apply rotation ofangleZradians about the Z axis, followed by a rotation ofangleYradians about the Y axis and followed by a rotation ofangleXradians about the X axis.Matrix3frotateZYX(float angleZ, float angleY, float angleX, Matrix3f dest)Apply rotation ofangleZradians about the Z axis, followed by a rotation ofangleYradians about the Y axis and followed by a rotation ofangleXradians about the X axis and store the result indest.Matrix3frotateZYX(Vector3f angles)Apply rotation ofangles.zradians about the Z axis, followed by a rotation ofangles.yradians about the Y axis and followed by a rotation ofangles.xradians about the X axis.Matrix3frotation(float angle, float x, float y, float z)Set this matrix to a rotation matrix which rotates the given radians about a given axis.Matrix3frotation(float angle, Vector3fc axis)Set this matrix to a rotation matrix which rotates the given radians about a given axis.Matrix3frotation(AxisAngle4f axisAngle)Set this matrix to a rotation transformation using the givenAxisAngle4f.Matrix3frotation(Quaternionfc quat)Set this matrix to the rotation - and possibly scaling - transformation of the givenQuaternionfc.Matrix3frotationTowards(float dirX, float dirY, float dirZ, float upX, float upY, float upZ)Set this matrix to a model transformation for a right-handed coordinate system, that aligns the local-zaxis withcenter - eye.Matrix3frotationTowards(Vector3fc dir, Vector3fc up)Set this matrix to a model transformation for a right-handed coordinate system, that aligns the local-zaxis withcenter - eye.Matrix3frotationX(float ang)Set this matrix to a rotation transformation about the X axis.Matrix3frotationXYZ(float angleX, float angleY, float angleZ)Set this matrix to a rotation ofangleXradians about the X axis, followed by a rotation ofangleYradians about the Y axis and followed by a rotation ofangleZradians about the Z axis.Matrix3frotationY(float ang)Set this matrix to a rotation transformation about the Y axis.Matrix3frotationYXZ(float angleY, float angleX, float angleZ)Set this matrix to a rotation ofangleYradians about the Y axis, followed by a rotation ofangleXradians about the X axis and followed by a rotation ofangleZradians about the Z axis.Matrix3frotationZ(float ang)Set this matrix to a rotation transformation about the Z axis.Matrix3frotationZYX(float angleZ, float angleY, float angleX)Set this matrix to a rotation ofangleZradians about the Z axis, followed by a rotation ofangleYradians about the Y axis and followed by a rotation ofangleXradians about the X axis.Matrix3fscale(float xyz)Apply scaling to this matrix by uniformly scaling all base axes by the givenxyzfactor.Matrix3fscale(float x, float y, float z)Apply scaling to this matrix by scaling the base axes by the given x, y and z factors.Matrix3fscale(float x, float y, float z, Matrix3f dest)Apply scaling to this matrix by scaling the base axes by the given x, y and z factors and store the result indest.Matrix3fscale(float xyz, Matrix3f dest)Apply scaling to this matrix by uniformly scaling all base axes by the givenxyzfactor and store the result indest.Matrix3fscale(Vector3fc xyz)Apply scaling to this matrix by scaling the base axes by the givenxyz.x,xyz.yandxyz.zfactors, respectively.Matrix3fscale(Vector3fc xyz, Matrix3f dest)Apply scaling tothismatrix by scaling the base axes by the givenxyz.x,xyz.yandxyz.zfactors, respectively and store the result indest.Matrix3fscaleLocal(float x, float y, float z)Pre-multiply scaling to this matrix by scaling the base axes by the given x, y and z factors.Matrix3fscaleLocal(float x, float y, float z, Matrix3f dest)Pre-multiply scaling tothismatrix by scaling the base axes by the given x, y and z factors and store the result indest.Matrix3fscaling(float factor)Set this matrix to be a simple scale matrix, which scales all axes uniformly by the given factor.Matrix3fscaling(float x, float y, float z)Set this matrix to be a simple scale matrix.Matrix3fscaling(Vector3fc xyz)Set this matrix to be a simple scale matrix which scales the base axes byxyz.x,xyz.yandxyz.zrespectively.Matrix3fset(float[] m)Set the values in this matrix based on the supplied float array.Matrix3fset(float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22)Set the values within this matrix to the supplied float values.Matrix3fset(int column, int row, float value)Set the matrix element at the given column and row to the specified value.Matrix3fset(int index, java.nio.ByteBuffer buffer)Set the values of this matrix by reading 9 float values from the givenByteBufferin column-major order, starting at the specified absolute buffer position/index.Matrix3fset(int index, java.nio.FloatBuffer buffer)Set the values of this matrix by reading 9 float values from the givenFloatBufferin column-major order, starting at the specified absolute buffer position/index.Matrix3fset(java.nio.ByteBuffer buffer)Set the values of this matrix by reading 9 float values from the givenByteBufferin column-major order, starting at its current position.Matrix3fset(java.nio.FloatBuffer buffer)Set the values of this matrix by reading 9 float values from the givenFloatBufferin column-major order, starting at its current position.Matrix3fset(AxisAngle4d axisAngle)Set this matrix to be equivalent to the rotation specified by the givenAxisAngle4d.Matrix3fset(AxisAngle4f axisAngle)Set this matrix to be equivalent to the rotation specified by the givenAxisAngle4f.Matrix3fset(Matrix2fc mat)Matrix3fset(Matrix3fc m)Set the elements of this matrix to the ones inm.Matrix3fset(Matrix4fc mat)Set the elements of this matrix to the upper left 3x3 of the givenMatrix4fc.Matrix3fset(Matrix4x3fc m)Set the elements of this matrix to the left 3x3 submatrix ofm.Matrix3fset(Quaterniondc q)Set this matrix to a rotation - and possibly scaling - equivalent to the given quaternion.Matrix3fset(Quaternionfc q)Set this matrix to be equivalent to the rotation - and possibly scaling - specified by the givenQuaternionfc.Matrix3fset(Vector3fc col0, Vector3fc col1, Vector3fc col2)Set the three columns of this matrix to the supplied vectors, respectively.Matrix3fsetColumn(int column, float x, float y, float z)Set the column at the givencolumnindex, starting with0.Matrix3fsetColumn(int column, Vector3fc src)Set the column at the givencolumnindex, starting with0.Matrix3fsetFromAddress(long address)Set the values of this matrix by reading 9 float values from off-heap memory in column-major order, starting at the given address.Matrix3fsetLookAlong(float dirX, float dirY, float dirZ, float upX, float upY, float upZ)Set this matrix to a rotation transformation to make-zpoint alongdir.Matrix3fsetLookAlong(Vector3fc dir, Vector3fc up)Set this matrix to a rotation transformation to make-zpoint alongdir.Matrix3fsetRow(int row, float x, float y, float z)Set the row at the givenrowindex, starting with0.Matrix3fsetRow(int row, Vector3fc src)Set the row at the givenrowindex, starting with0.Matrix3fsetRowColumn(int row, int column, float value)Set the matrix element at the given row and column to the specified value.Matrix3fsetSkewSymmetric(float a, float b, float c)Set this matrix to a skew-symmetric matrix using the following layout:Matrix3fsetTransposed(Matrix3fc m)Store the values of the transpose of the given matrixmintothismatrix.Matrix3fsub(Matrix3fc subtrahend)Component-wise subtractsubtrahendfromthis.Matrix3fsub(Matrix3fc subtrahend, Matrix3f dest)Component-wise subtractsubtrahendfromthisand store the result indest.Matrix3fswap(Matrix3f other)Exchange the values ofthismatrix with the givenothermatrix.java.lang.StringtoString()Return a string representation of this matrix.java.lang.StringtoString(java.text.NumberFormat formatter)Return a string representation of this matrix by formatting the matrix elements with the givenNumberFormat.Vector3ftransform(float x, float y, float z, Vector3f dest)Transform the vector(x, y, z)by this matrix and store the result indest.Vector3ftransform(Vector3f v)Transform the given vector by this matrix.Vector3ftransform(Vector3fc v, Vector3f dest)Transform the given vector by this matrix and store the result indest.Vector3ftransformTranspose(float x, float y, float z, Vector3f dest)Transform the vector(x, y, z)by the transpose of this matrix and store the result indest.Vector3ftransformTranspose(Vector3f v)Transform the given vector by the transpose of this matrix.Vector3ftransformTranspose(Vector3fc v, Vector3f dest)Transform the given vector by the transpose of this matrix and store the result indest.Matrix3ftranspose()Transpose this matrix.Matrix3ftranspose(Matrix3f dest)Transposethismatrix and store the result indest.voidwriteExternal(java.io.ObjectOutput out)Matrix3fzero()Set all values within this matrix to zero.
-
-
-
Constructor Detail
-
Matrix3f
public Matrix3f()
-
Matrix3f
public Matrix3f(Matrix2fc mat)
Create a newMatrix3fby setting its uppper left 2x2 submatrix to the values of the givenMatrix2fcand the rest to identity.- Parameters:
mat- theMatrix2fc
-
Matrix3f
public Matrix3f(Matrix3fc mat)
Create a newMatrix3fand make it a copy of the given matrix.- Parameters:
mat- theMatrix3fcto copy the values from
-
Matrix3f
public Matrix3f(float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22)Create a new 3x3 matrix using the supplied float values. The order of the parameter is column-major, so the first three parameters specify the three elements of the first column.- Parameters:
m00- the value of m00m01- the value of m01m02- the value of m02m10- the value of m10m11- the value of m11m12- the value of m12m20- the value of m20m21- the value of m21m22- the value of m22
-
Matrix3f
public Matrix3f(java.nio.FloatBuffer buffer)
Create a newMatrix3fby reading its 9 float components from the givenFloatBufferat the buffer's current position.That FloatBuffer is expected to hold the values in column-major order.
The buffer's position will not be changed by this method.
- Parameters:
buffer- theFloatBufferto read the matrix values from
-
-
Method Detail
-
m00
public float m00()
Description copied from interface:Matrix3fcReturn the value of the matrix element at column 0 and row 0.
-
m01
public float m01()
Description copied from interface:Matrix3fcReturn the value of the matrix element at column 0 and row 1.
-
m02
public float m02()
Description copied from interface:Matrix3fcReturn the value of the matrix element at column 0 and row 2.
-
m10
public float m10()
Description copied from interface:Matrix3fcReturn the value of the matrix element at column 1 and row 0.
-
m11
public float m11()
Description copied from interface:Matrix3fcReturn the value of the matrix element at column 1 and row 1.
-
m12
public float m12()
Description copied from interface:Matrix3fcReturn the value of the matrix element at column 1 and row 2.
-
m20
public float m20()
Description copied from interface:Matrix3fcReturn the value of the matrix element at column 2 and row 0.
-
m21
public float m21()
Description copied from interface:Matrix3fcReturn the value of the matrix element at column 2 and row 1.
-
m22
public float m22()
Description copied from interface:Matrix3fcReturn the value of the matrix element at column 2 and row 2.
-
m00
public Matrix3f m00(float m00)
Set the value of the matrix element at column 0 and row 0.- Parameters:
m00- the new value- Returns:
- this
-
m01
public Matrix3f m01(float m01)
Set the value of the matrix element at column 0 and row 1.- Parameters:
m01- the new value- Returns:
- this
-
m02
public Matrix3f m02(float m02)
Set the value of the matrix element at column 0 and row 2.- Parameters:
m02- the new value- Returns:
- this
-
m10
public Matrix3f m10(float m10)
Set the value of the matrix element at column 1 and row 0.- Parameters:
m10- the new value- Returns:
- this
-
m11
public Matrix3f m11(float m11)
Set the value of the matrix element at column 1 and row 1.- Parameters:
m11- the new value- Returns:
- this
-
m12
public Matrix3f m12(float m12)
Set the value of the matrix element at column 1 and row 2.- Parameters:
m12- the new value- Returns:
- this
-
m20
public Matrix3f m20(float m20)
Set the value of the matrix element at column 2 and row 0.- Parameters:
m20- the new value- Returns:
- this
-
m21
public Matrix3f m21(float m21)
Set the value of the matrix element at column 2 and row 1.- Parameters:
m21- the new value- Returns:
- this
-
m22
public Matrix3f m22(float m22)
Set the value of the matrix element at column 2 and row 2.- Parameters:
m22- the new value- Returns:
- this
-
set
public Matrix3f set(Matrix3fc m)
Set the elements of this matrix to the ones inm.- Parameters:
m- the matrix to copy the elements from- Returns:
- this
-
setTransposed
public Matrix3f setTransposed(Matrix3fc m)
Store the values of the transpose of the given matrixmintothismatrix.- Parameters:
m- the matrix to copy the transposed values from- Returns:
- this
-
set
public Matrix3f set(Matrix4x3fc m)
Set the elements of this matrix to the left 3x3 submatrix ofm.- Parameters:
m- the matrix to copy the elements from- Returns:
- this
-
set
public Matrix3f set(Matrix4fc mat)
Set the elements of this matrix to the upper left 3x3 of the givenMatrix4fc.- Parameters:
mat- theMatrix4fcto copy the values from- Returns:
- this
-
set
public Matrix3f set(Matrix2fc mat)
- Parameters:
mat- theMatrix2fc- Returns:
- this
- See Also:
Matrix3f(Matrix2fc)
-
set
public Matrix3f set(AxisAngle4f axisAngle)
Set this matrix to be equivalent to the rotation specified by the givenAxisAngle4f.- Parameters:
axisAngle- theAxisAngle4f- Returns:
- this
-
set
public Matrix3f set(AxisAngle4d axisAngle)
Set this matrix to be equivalent to the rotation specified by the givenAxisAngle4d.- Parameters:
axisAngle- theAxisAngle4d- Returns:
- this
-
set
public Matrix3f set(Quaternionfc q)
Set this matrix to be equivalent to the rotation - and possibly scaling - specified by the givenQuaternionfc.This method is equivalent to calling:
rotation(q)Reference: http://www.euclideanspace.com/
- Parameters:
q- theQuaternionfc- Returns:
- this
- See Also:
rotation(Quaternionfc)
-
set
public Matrix3f set(Quaterniondc q)
Set this matrix to a rotation - and possibly scaling - equivalent to the given quaternion.Reference: http://www.euclideanspace.com/
- Parameters:
q- the quaternion- Returns:
- this
-
mul
public Matrix3f mul(Matrix3fc right)
Multiply this matrix by the suppliedrightmatrix.If
Misthismatrix andRtherightmatrix, then the new matrix will beM * R. So when transforming a vectorvwith the new matrix by usingM * R * v, the transformation of the right matrix will be applied first!- Parameters:
right- the right operand of the matrix multiplication- Returns:
- this
-
mul
public Matrix3f mul(Matrix3fc right, Matrix3f dest)
Description copied from interface:Matrix3fcMultiply this matrix by the suppliedrightmatrix and store the result indest.If
Misthismatrix andRtherightmatrix, then the new matrix will beM * R. So when transforming a vectorvwith the new matrix by usingM * R * v, the transformation of the right matrix will be applied first!
-
mulLocal
public Matrix3f mulLocal(Matrix3fc left)
Pre-multiply this matrix by the suppliedleftmatrix and store the result inthis.If
Misthismatrix andLtheleftmatrix, then the new matrix will beL * M. So when transforming a vectorvwith the new matrix by usingL * M * v, the transformation ofthismatrix will be applied first!- Parameters:
left- the left operand of the matrix multiplication- Returns:
- this
-
mulLocal
public Matrix3f mulLocal(Matrix3fc left, Matrix3f dest)
Description copied from interface:Matrix3fcPre-multiply this matrix by the suppliedleftmatrix and store the result indest.If
Misthismatrix andLtheleftmatrix, then the new matrix will beL * M. So when transforming a vectorvwith the new matrix by usingL * M * v, the transformation ofthismatrix will be applied first!
-
set
public Matrix3f set(float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22)
Set the values within this matrix to the supplied float values. The result looks like this:m00, m10, m20
m01, m11, m21
m02, m12, m22- Parameters:
m00- the new value of m00m01- the new value of m01m02- the new value of m02m10- the new value of m10m11- the new value of m11m12- the new value of m12m20- the new value of m20m21- the new value of m21m22- the new value of m22- Returns:
- this
-
set
public Matrix3f set(float[] m)
Set the values in this matrix based on the supplied float array. The result looks like this:0, 3, 6
1, 4, 7
2, 5, 8
This method only uses the first 9 values, all others are ignored.- Parameters:
m- the array to read the matrix values from- Returns:
- this
-
set
public Matrix3f set(Vector3fc col0, Vector3fc col1, Vector3fc col2)
Set the three columns of this matrix to the supplied vectors, respectively.- Parameters:
col0- the first columncol1- the second columncol2- the third column- Returns:
- this
-
determinant
public float determinant()
Description copied from interface:Matrix3fcReturn the determinant of this matrix.- Specified by:
determinantin interfaceMatrix3fc- Returns:
- the determinant
-
invert
public Matrix3f invert()
Invert this matrix.- Returns:
- this
-
invert
public Matrix3f invert(Matrix3f dest)
Description copied from interface:Matrix3fcInvert thethismatrix and store the result indest.
-
transpose
public Matrix3f transpose()
Transpose this matrix.- Returns:
- this
-
transpose
public Matrix3f transpose(Matrix3f dest)
Description copied from interface:Matrix3fcTransposethismatrix and store the result indest.
-
toString
public java.lang.String toString()
Return a string representation of this matrix.This method creates a new
DecimalFormaton every invocation with the format string "0.000E0;-".- Overrides:
toStringin classjava.lang.Object- Returns:
- the string representation
-
toString
public java.lang.String toString(java.text.NumberFormat formatter)
Return a string representation of this matrix by formatting the matrix elements with the givenNumberFormat.- Parameters:
formatter- theNumberFormatused to format the matrix values with- Returns:
- the string representation
-
get
public Matrix3f get(Matrix3f dest)
Get the current values ofthismatrix and store them intodest.This is the reverse method of
set(Matrix3fc)and allows to obtain intermediate calculation results when chaining multiple transformations.- Specified by:
getin interfaceMatrix3fc- Parameters:
dest- the destination matrix- Returns:
- the passed in destination
- See Also:
set(Matrix3fc)
-
get
public Matrix4f get(Matrix4f dest)
Description copied from interface:Matrix3fcGet the current values ofthismatrix and store them as the rotational component ofdest. All other values ofdestwill be set to identity.- Specified by:
getin interfaceMatrix3fc- Parameters:
dest- the destination matrix- Returns:
- the passed in destination
- See Also:
Matrix4f.set(Matrix3fc)
-
getRotation
public AxisAngle4f getRotation(AxisAngle4f dest)
Description copied from interface:Matrix3fcGet the current values ofthismatrix and store the represented rotation into the givenAxisAngle4f.- Specified by:
getRotationin interfaceMatrix3fc- Parameters:
dest- the destinationAxisAngle4f- Returns:
- the passed in destination
- See Also:
AxisAngle4f.set(Matrix3fc)
-
getUnnormalizedRotation
public Quaternionf getUnnormalizedRotation(Quaternionf dest)
Description copied from interface:Matrix3fcGet the current values ofthismatrix and store the represented rotation into the givenQuaternionf.This method assumes that the three column vectors of this matrix are not normalized and thus allows to ignore any additional scaling factor that is applied to the matrix.
- Specified by:
getUnnormalizedRotationin interfaceMatrix3fc- Parameters:
dest- the destinationQuaternionf- Returns:
- the passed in destination
- See Also:
Quaternionf.setFromUnnormalized(Matrix3fc)
-
getNormalizedRotation
public Quaternionf getNormalizedRotation(Quaternionf dest)
Description copied from interface:Matrix3fcGet the current values ofthismatrix and store the represented rotation into the givenQuaternionf.This method assumes that the three column vectors of this matrix are normalized.
- Specified by:
getNormalizedRotationin interfaceMatrix3fc- Parameters:
dest- the destinationQuaternionf- Returns:
- the passed in destination
- See Also:
Quaternionf.setFromNormalized(Matrix3fc)
-
getUnnormalizedRotation
public Quaterniond getUnnormalizedRotation(Quaterniond dest)
Description copied from interface:Matrix3fcGet the current values ofthismatrix and store the represented rotation into the givenQuaterniond.This method assumes that the three column vectors of this matrix are not normalized and thus allows to ignore any additional scaling factor that is applied to the matrix.
- Specified by:
getUnnormalizedRotationin interfaceMatrix3fc- Parameters:
dest- the destinationQuaterniond- Returns:
- the passed in destination
- See Also:
Quaterniond.setFromUnnormalized(Matrix3fc)
-
getNormalizedRotation
public Quaterniond getNormalizedRotation(Quaterniond dest)
Description copied from interface:Matrix3fcGet the current values ofthismatrix and store the represented rotation into the givenQuaterniond.This method assumes that the three column vectors of this matrix are normalized.
- Specified by:
getNormalizedRotationin interfaceMatrix3fc- Parameters:
dest- the destinationQuaterniond- Returns:
- the passed in destination
- See Also:
Quaterniond.setFromNormalized(Matrix3fc)
-
get
public java.nio.FloatBuffer get(java.nio.FloatBuffer buffer)
Description copied from interface:Matrix3fcStore this matrix in column-major order into the suppliedFloatBufferat the current bufferposition.This method will not increment the position of the given FloatBuffer.
In order to specify the offset into the FloatBuffer at which the matrix is stored, use
Matrix3fc.get(int, FloatBuffer), taking the absolute position as parameter.- Specified by:
getin interfaceMatrix3fc- Parameters:
buffer- will receive the values of this matrix in column-major order at its current position- Returns:
- the passed in buffer
- See Also:
Matrix3fc.get(int, FloatBuffer)
-
get
public java.nio.FloatBuffer get(int index, java.nio.FloatBuffer buffer)Description copied from interface:Matrix3fcStore this matrix in column-major order into the suppliedFloatBufferstarting at the specified absolute buffer position/index.This method will not increment the position of the given FloatBuffer.
-
get
public java.nio.ByteBuffer get(java.nio.ByteBuffer buffer)
Description copied from interface:Matrix3fcStore this matrix in column-major order into the suppliedByteBufferat the current bufferposition.This method will not increment the position of the given ByteBuffer.
In order to specify the offset into the ByteBuffer at which the matrix is stored, use
Matrix3fc.get(int, ByteBuffer), taking the absolute position as parameter.- Specified by:
getin interfaceMatrix3fc- Parameters:
buffer- will receive the values of this matrix in column-major order at its current position- Returns:
- the passed in buffer
- See Also:
Matrix3fc.get(int, ByteBuffer)
-
get
public java.nio.ByteBuffer get(int index, java.nio.ByteBuffer buffer)Description copied from interface:Matrix3fcStore this matrix in column-major order into the suppliedByteBufferstarting at the specified absolute buffer position/index.This method will not increment the position of the given ByteBuffer.
-
get3x4
public java.nio.FloatBuffer get3x4(java.nio.FloatBuffer buffer)
Description copied from interface:Matrix3fcStore this matrix as 3x4 matrix in column-major order into the suppliedFloatBufferat the current bufferposition, with the m03, m13 and m23 components being zero.This method will not increment the position of the given FloatBuffer.
In order to specify the offset into the FloatBuffer at which the matrix is stored, use
Matrix3fc.get3x4(int, FloatBuffer), taking the absolute position as parameter.- Specified by:
get3x4in interfaceMatrix3fc- Parameters:
buffer- will receive the values of this 3x3 matrix as 3x4 matrix in column-major order at its current position- Returns:
- the passed in buffer
- See Also:
Matrix3fc.get3x4(int, FloatBuffer)
-
get3x4
public java.nio.FloatBuffer get3x4(int index, java.nio.FloatBuffer buffer)Description copied from interface:Matrix3fcStore this matrix as 3x4 matrix in column-major order into the suppliedFloatBufferstarting at the specified absolute buffer position/index, with the m03, m13 and m23 components being zero.This method will not increment the position of the given FloatBuffer.
-
get3x4
public java.nio.ByteBuffer get3x4(java.nio.ByteBuffer buffer)
Description copied from interface:Matrix3fcStore this matrix as 3x4 matrix in column-major order into the suppliedByteBufferat the current bufferposition, with the m03, m13 and m23 components being zero.This method will not increment the position of the given ByteBuffer.
In order to specify the offset into the ByteBuffer at which the matrix is stored, use
Matrix3fc.get3x4(int, ByteBuffer), taking the absolute position as parameter.- Specified by:
get3x4in interfaceMatrix3fc- Parameters:
buffer- will receive the values of this 3x3 matrix as 3x4 matrix in column-major order at its current position- Returns:
- the passed in buffer
- See Also:
Matrix3fc.get3x4(int, ByteBuffer)
-
get3x4
public java.nio.ByteBuffer get3x4(int index, java.nio.ByteBuffer buffer)Description copied from interface:Matrix3fcStore this matrix as 3x4 matrix in column-major order into the suppliedByteBufferstarting at the specified absolute buffer position/index, with the m03, m13 and m23 components being zero.This method will not increment the position of the given ByteBuffer.
-
getTransposed
public java.nio.FloatBuffer getTransposed(java.nio.FloatBuffer buffer)
Description copied from interface:Matrix3fcStore the transpose of this matrix in column-major order into the suppliedFloatBufferat the current bufferposition.This method will not increment the position of the given FloatBuffer.
In order to specify the offset into the FloatBuffer at which the matrix is stored, use
Matrix3fc.getTransposed(int, FloatBuffer), taking the absolute position as parameter.- Specified by:
getTransposedin interfaceMatrix3fc- Parameters:
buffer- will receive the values of this matrix in column-major order at its current position- Returns:
- the passed in buffer
- See Also:
Matrix3fc.getTransposed(int, FloatBuffer)
-
getTransposed
public java.nio.FloatBuffer getTransposed(int index, java.nio.FloatBuffer buffer)Description copied from interface:Matrix3fcStore the transpose of this matrix in column-major order into the suppliedFloatBufferstarting at the specified absolute buffer position/index.This method will not increment the position of the given FloatBuffer.
- Specified by:
getTransposedin interfaceMatrix3fc- Parameters:
index- the absolute position into the FloatBufferbuffer- will receive the values of this matrix in column-major order- Returns:
- the passed in buffer
-
getTransposed
public java.nio.ByteBuffer getTransposed(java.nio.ByteBuffer buffer)
Description copied from interface:Matrix3fcStore the transpose of this matrix in column-major order into the suppliedByteBufferat the current bufferposition.This method will not increment the position of the given ByteBuffer.
In order to specify the offset into the ByteBuffer at which the matrix is stored, use
Matrix3fc.getTransposed(int, ByteBuffer), taking the absolute position as parameter.- Specified by:
getTransposedin interfaceMatrix3fc- Parameters:
buffer- will receive the values of this matrix in column-major order at its current position- Returns:
- the passed in buffer
- See Also:
Matrix3fc.getTransposed(int, ByteBuffer)
-
getTransposed
public java.nio.ByteBuffer getTransposed(int index, java.nio.ByteBuffer buffer)Description copied from interface:Matrix3fcStore the transpose of this matrix in column-major order into the suppliedByteBufferstarting at the specified absolute buffer position/index.This method will not increment the position of the given ByteBuffer.
- Specified by:
getTransposedin interfaceMatrix3fc- Parameters:
index- the absolute position into the ByteBufferbuffer- will receive the values of this matrix in column-major order- Returns:
- the passed in buffer
-
getToAddress
public Matrix3fc getToAddress(long address)
Description copied from interface:Matrix3fcStore this matrix in column-major order at the given off-heap address.This method will throw an
UnsupportedOperationExceptionwhen JOML is used with `-Djoml.nounsafe`.This method is unsafe as it can result in a crash of the JVM process when the specified address range does not belong to this process.
- Specified by:
getToAddressin interfaceMatrix3fc- Parameters:
address- the off-heap address where to store this matrix- Returns:
- this
-
get
public float[] get(float[] arr, int offset)Description copied from interface:Matrix3fcStore this matrix into the supplied float array in column-major order at the given offset.
-
get
public float[] get(float[] arr)
Description copied from interface:Matrix3fcStore this matrix into the supplied float array in column-major order.In order to specify an explicit offset into the array, use the method
Matrix3fc.get(float[], int).- Specified by:
getin interfaceMatrix3fc- Parameters:
arr- the array to write the matrix values into- Returns:
- the passed in array
- See Also:
Matrix3fc.get(float[], int)
-
set
public Matrix3f set(java.nio.FloatBuffer buffer)
Set the values of this matrix by reading 9 float values from the givenFloatBufferin column-major order, starting at its current position.The FloatBuffer is expected to contain the values in column-major order.
The position of the FloatBuffer will not be changed by this method.
- Parameters:
buffer- the FloatBuffer to read the matrix values from in column-major order- Returns:
- this
-
set
public Matrix3f set(java.nio.ByteBuffer buffer)
Set the values of this matrix by reading 9 float values from the givenByteBufferin column-major order, starting at its current position.The ByteBuffer is expected to contain the values in column-major order.
The position of the ByteBuffer will not be changed by this method.
- Parameters:
buffer- the ByteBuffer to read the matrix values from in column-major order- Returns:
- this
-
set
public Matrix3f set(int index, java.nio.FloatBuffer buffer)
Set the values of this matrix by reading 9 float values from the givenFloatBufferin column-major order, starting at the specified absolute buffer position/index.The FloatBuffer is expected to contain the values in column-major order.
The position of the FloatBuffer will not be changed by this method.
- Parameters:
index- the absolute position into the FloatBufferbuffer- the FloatBuffer to read the matrix values from in column-major order- Returns:
- this
-
set
public Matrix3f set(int index, java.nio.ByteBuffer buffer)
Set the values of this matrix by reading 9 float values from the givenByteBufferin column-major order, starting at the specified absolute buffer position/index.The ByteBuffer is expected to contain the values in column-major order.
The position of the ByteBuffer will not be changed by this method.
- Parameters:
index- the absolute position into the ByteBufferbuffer- the ByteBuffer to read the matrix values from in column-major order- Returns:
- this
-
setFromAddress
public Matrix3f setFromAddress(long address)
Set the values of this matrix by reading 9 float values from off-heap memory in column-major order, starting at the given address.This method will throw an
UnsupportedOperationExceptionwhen JOML is used with `-Djoml.nounsafe`.This method is unsafe as it can result in a crash of the JVM process when the specified address range does not belong to this process.
- Parameters:
address- the off-heap memory address to read the matrix values from in column-major order- Returns:
- this
-
zero
public Matrix3f zero()
Set all values within this matrix to zero.- Returns:
- this
-
identity
public Matrix3f identity()
Set this matrix to the identity.- Returns:
- this
-
scale
public Matrix3f scale(Vector3fc xyz, Matrix3f dest)
Description copied from interface:Matrix3fcApply scaling tothismatrix by scaling the base axes by the givenxyz.x,xyz.yandxyz.zfactors, respectively and store the result indest.If
Misthismatrix andSthe scaling matrix, then the new matrix will beM * S. So when transforming a vectorvwith the new matrix by usingM * S * v, the scaling will be applied first!
-
scale
public Matrix3f scale(Vector3fc xyz)
Apply scaling to this matrix by scaling the base axes by the givenxyz.x,xyz.yandxyz.zfactors, respectively.If
Misthismatrix andSthe scaling matrix, then the new matrix will beM * S. So when transforming a vectorvwith the new matrix by usingM * S * v, the scaling will be applied first!- Parameters:
xyz- the factors of the x, y and z component, respectively- Returns:
- this
-
scale
public Matrix3f scale(float x, float y, float z, Matrix3f dest)
Description copied from interface:Matrix3fcApply scaling to this matrix by scaling the base axes by the given x, y and z factors and store the result indest.If
Misthismatrix andSthe scaling matrix, then the new matrix will beM * S. So when transforming a vectorvwith the new matrix by usingM * S * v, the scaling will be applied first!
-
scale
public Matrix3f scale(float x, float y, float z)
Apply scaling to this matrix by scaling the base axes by the given x, y and z factors.If
Misthismatrix andSthe scaling matrix, then the new matrix will beM * S. So when transforming a vectorvwith the new matrix by usingM * S * v, the scaling will be applied first!- Parameters:
x- the factor of the x componenty- the factor of the y componentz- the factor of the z component- Returns:
- this
-
scale
public Matrix3f scale(float xyz, Matrix3f dest)
Description copied from interface:Matrix3fcApply scaling to this matrix by uniformly scaling all base axes by the givenxyzfactor and store the result indest.If
Misthismatrix andSthe scaling matrix, then the new matrix will beM * S. So when transforming a vectorvwith the new matrix by usingM * S * v, the scaling will be applied first!- Specified by:
scalein interfaceMatrix3fc- Parameters:
xyz- the factor for all componentsdest- will hold the result- Returns:
- dest
- See Also:
Matrix3fc.scale(float, float, float, Matrix3f)
-
scale
public Matrix3f scale(float xyz)
Apply scaling to this matrix by uniformly scaling all base axes by the givenxyzfactor.If
Misthismatrix andSthe scaling matrix, then the new matrix will beM * S. So when transforming a vectorvwith the new matrix by usingM * S * v, the scaling will be applied first!- Parameters:
xyz- the factor for all components- Returns:
- this
- See Also:
scale(float, float, float)
-
scaleLocal
public Matrix3f scaleLocal(float x, float y, float z, Matrix3f dest)
Description copied from interface:Matrix3fcPre-multiply scaling tothismatrix by scaling the base axes by the given x, y and z factors and store the result indest.If
Misthismatrix andSthe scaling matrix, then the new matrix will beS * M. So when transforming a vectorvwith the new matrix by usingS * M * v, the scaling will be applied last!- Specified by:
scaleLocalin interfaceMatrix3fc- Parameters:
x- the factor of the x componenty- the factor of the y componentz- the factor of the z componentdest- will hold the result- Returns:
- dest
-
scaleLocal
public Matrix3f scaleLocal(float x, float y, float z)
Pre-multiply scaling to this matrix by scaling the base axes by the given x, y and z factors.If
Misthismatrix andSthe scaling matrix, then the new matrix will beS * M. So when transforming a vectorvwith the new matrix by usingS * M * v, the scaling will be applied last!- Parameters:
x- the factor of the x componenty- the factor of the y componentz- the factor of the z component- Returns:
- this
-
scaling
public Matrix3f scaling(float factor)
Set this matrix to be a simple scale matrix, which scales all axes uniformly by the given factor.The resulting matrix can be multiplied against another transformation matrix to obtain an additional scaling.
In order to post-multiply a scaling transformation directly to a matrix, use
scale()instead.- Parameters:
factor- the scale factor in x, y and z- Returns:
- this
- See Also:
scale(float)
-
scaling
public Matrix3f scaling(float x, float y, float z)
Set this matrix to be a simple scale matrix.- Parameters:
x- the scale in xy- the scale in yz- the scale in z- Returns:
- this
-
scaling
public Matrix3f scaling(Vector3fc xyz)
Set this matrix to be a simple scale matrix which scales the base axes byxyz.x,xyz.yandxyz.zrespectively.The resulting matrix can be multiplied against another transformation matrix to obtain an additional scaling.
In order to post-multiply a scaling transformation directly to a matrix use
scale()instead.- Parameters:
xyz- the scale in x, y and z respectively- Returns:
- this
- See Also:
scale(Vector3fc)
-
rotation
public Matrix3f rotation(float angle, Vector3fc axis)
Set this matrix to a rotation matrix which rotates the given radians about a given axis.The axis described by the
axisvector needs to be a unit vector.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
The resulting matrix can be multiplied against another transformation matrix to obtain an additional rotation.
In order to post-multiply a rotation transformation directly to a matrix, use
rotate()instead.- Parameters:
angle- the angle in radiansaxis- the axis to rotate about (needs to benormalized)- Returns:
- this
- See Also:
rotate(float, Vector3fc)
-
rotation
public Matrix3f rotation(AxisAngle4f axisAngle)
Set this matrix to a rotation transformation using the givenAxisAngle4f.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
The resulting matrix can be multiplied against another transformation matrix to obtain an additional rotation.
In order to apply the rotation transformation to an existing transformation, use
rotate()instead.Reference: http://en.wikipedia.org
- Parameters:
axisAngle- theAxisAngle4f(needs to benormalized)- Returns:
- this
- See Also:
rotate(AxisAngle4f)
-
rotation
public Matrix3f rotation(float angle, float x, float y, float z)
Set this matrix to a rotation matrix which rotates the given radians about a given axis.The axis described by the three components needs to be a unit vector.
When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
The resulting matrix can be multiplied against another transformation matrix to obtain an additional rotation.
In order to apply the rotation transformation to an existing transformation, use
rotate()instead.Reference: http://en.wikipedia.org
- Parameters:
angle- the angle in radiansx- the x-component of the rotation axisy- the y-component of the rotation axisz- the z-component of the rotation axis- Returns:
- this
- See Also:
rotate(float, float, float, float)
-
rotationX
public Matrix3f rotationX(float ang)
Set this matrix to a rotation transformation about the X axis.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
Reference: http://en.wikipedia.org
- Parameters:
ang- the angle in radians- Returns:
- this
-
rotationY
public Matrix3f rotationY(float ang)
Set this matrix to a rotation transformation about the Y axis.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
Reference: http://en.wikipedia.org
- Parameters:
ang- the angle in radians- Returns:
- this
-
rotationZ
public Matrix3f rotationZ(float ang)
Set this matrix to a rotation transformation about the Z axis.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
Reference: http://en.wikipedia.org
- Parameters:
ang- the angle in radians- Returns:
- this
-
rotationXYZ
public Matrix3f rotationXYZ(float angleX, float angleY, float angleZ)
Set this matrix to a rotation ofangleXradians about the X axis, followed by a rotation ofangleYradians about the Y axis and followed by a rotation ofangleZradians about the Z axis.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
This method is equivalent to calling:
rotationX(angleX).rotateY(angleY).rotateZ(angleZ)- Parameters:
angleX- the angle to rotate about XangleY- the angle to rotate about YangleZ- the angle to rotate about Z- Returns:
- this
-
rotationZYX
public Matrix3f rotationZYX(float angleZ, float angleY, float angleX)
Set this matrix to a rotation ofangleZradians about the Z axis, followed by a rotation ofangleYradians about the Y axis and followed by a rotation ofangleXradians about the X axis.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
This method is equivalent to calling:
rotationZ(angleZ).rotateY(angleY).rotateX(angleX)- Parameters:
angleZ- the angle to rotate about ZangleY- the angle to rotate about YangleX- the angle to rotate about X- Returns:
- this
-
rotationYXZ
public Matrix3f rotationYXZ(float angleY, float angleX, float angleZ)
Set this matrix to a rotation ofangleYradians about the Y axis, followed by a rotation ofangleXradians about the X axis and followed by a rotation ofangleZradians about the Z axis.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
This method is equivalent to calling:
rotationY(angleY).rotateX(angleX).rotateZ(angleZ)- Parameters:
angleY- the angle to rotate about YangleX- the angle to rotate about XangleZ- the angle to rotate about Z- Returns:
- this
-
rotation
public Matrix3f rotation(Quaternionfc quat)
Set this matrix to the rotation - and possibly scaling - transformation of the givenQuaternionfc.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
The resulting matrix can be multiplied against another transformation matrix to obtain an additional rotation.
In order to apply the rotation transformation to an existing transformation, use
rotate()instead.Reference: http://en.wikipedia.org
- Parameters:
quat- theQuaternionfc- Returns:
- this
- See Also:
rotate(Quaternionfc)
-
transform
public Vector3f transform(Vector3f v)
Description copied from interface:Matrix3fcTransform the given vector by this matrix.
-
transform
public Vector3f transform(Vector3fc v, Vector3f dest)
Description copied from interface:Matrix3fcTransform the given vector by this matrix and store the result indest.
-
transform
public Vector3f transform(float x, float y, float z, Vector3f dest)
Description copied from interface:Matrix3fcTransform the vector(x, y, z)by this matrix and store the result indest.
-
transformTranspose
public Vector3f transformTranspose(Vector3f v)
Description copied from interface:Matrix3fcTransform the given vector by the transpose of this matrix.- Specified by:
transformTransposein interfaceMatrix3fc- Parameters:
v- the vector to transform- Returns:
- v
-
transformTranspose
public Vector3f transformTranspose(Vector3fc v, Vector3f dest)
Description copied from interface:Matrix3fcTransform the given vector by the transpose of this matrix and store the result indest.- Specified by:
transformTransposein interfaceMatrix3fc- Parameters:
v- the vector to transformdest- will hold the result- Returns:
- dest
-
transformTranspose
public Vector3f transformTranspose(float x, float y, float z, Vector3f dest)
Description copied from interface:Matrix3fcTransform the vector(x, y, z)by the transpose of this matrix and store the result indest.- Specified by:
transformTransposein interfaceMatrix3fc- Parameters:
x- the x coordinate of the vector to transformy- the y coordinate of the vector to transformz- the z coordinate of the vector to transformdest- will hold the result- Returns:
- dest
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException- Specified by:
writeExternalin interfacejava.io.Externalizable- Throws:
java.io.IOException
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException- Specified by:
readExternalin interfacejava.io.Externalizable- Throws:
java.io.IOException
-
rotateX
public Matrix3f rotateX(float ang, Matrix3f dest)
Description copied from interface:Matrix3fcApply rotation about the X axis to this matrix by rotating the given amount of radians and store the result indest.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
Misthismatrix andRthe rotation matrix, then the new matrix will beM * R. So when transforming a vectorvwith the new matrix by usingM * R * v, the rotation will be applied first!Reference: http://en.wikipedia.org
-
rotateX
public Matrix3f rotateX(float ang)
Apply rotation about the X axis to this matrix by rotating the given amount of radians.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
Misthismatrix andRthe rotation matrix, then the new matrix will beM * R. So when transforming a vectorvwith the new matrix by usingM * R * v, the rotation will be applied first!Reference: http://en.wikipedia.org
- Parameters:
ang- the angle in radians- Returns:
- this
-
rotateY
public Matrix3f rotateY(float ang, Matrix3f dest)
Description copied from interface:Matrix3fcApply rotation about the Y axis to this matrix by rotating the given amount of radians and store the result indest.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
Misthismatrix andRthe rotation matrix, then the new matrix will beM * R. So when transforming a vectorvwith the new matrix by usingM * R * v, the rotation will be applied first!Reference: http://en.wikipedia.org
-
rotateY
public Matrix3f rotateY(float ang)
Apply rotation about the Y axis to this matrix by rotating the given amount of radians.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
Misthismatrix andRthe rotation matrix, then the new matrix will beM * R. So when transforming a vectorvwith the new matrix by usingM * R * v, the rotation will be applied first!Reference: http://en.wikipedia.org
- Parameters:
ang- the angle in radians- Returns:
- this
-
rotateZ
public Matrix3f rotateZ(float ang, Matrix3f dest)
Description copied from interface:Matrix3fcApply rotation about the Z axis to this matrix by rotating the given amount of radians and store the result indest.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
Misthismatrix andRthe rotation matrix, then the new matrix will beM * R. So when transforming a vectorvwith the new matrix by usingM * R * v, the rotation will be applied first!Reference: http://en.wikipedia.org
-
rotateZ
public Matrix3f rotateZ(float ang)
Apply rotation about the Z axis to this matrix by rotating the given amount of radians.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
Misthismatrix andRthe rotation matrix, then the new matrix will beM * R. So when transforming a vectorvwith the new matrix by usingM * R * v, the rotation will be applied first!Reference: http://en.wikipedia.org
- Parameters:
ang- the angle in radians- Returns:
- this
-
rotateXYZ
public Matrix3f rotateXYZ(Vector3f angles)
Apply rotation ofangles.xradians about the X axis, followed by a rotation ofangles.yradians about the Y axis and followed by a rotation ofangles.zradians about the Z axis.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
Misthismatrix andRthe rotation matrix, then the new matrix will beM * R. So when transforming a vectorvwith the new matrix by usingM * R * v, the rotation will be applied first!This method is equivalent to calling:
rotateX(angles.x).rotateY(angles.y).rotateZ(angles.z)- Parameters:
angles- the Euler angles- Returns:
- this
-
rotateXYZ
public Matrix3f rotateXYZ(float angleX, float angleY, float angleZ)
Apply rotation ofangleXradians about the X axis, followed by a rotation ofangleYradians about the Y axis and followed by a rotation ofangleZradians about the Z axis.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
Misthismatrix andRthe rotation matrix, then the new matrix will beM * R. So when transforming a vectorvwith the new matrix by usingM * R * v, the rotation will be applied first!This method is equivalent to calling:
rotateX(angleX).rotateY(angleY).rotateZ(angleZ)- Parameters:
angleX- the angle to rotate about XangleY- the angle to rotate about YangleZ- the angle to rotate about Z- Returns:
- this
-
rotateXYZ
public Matrix3f rotateXYZ(float angleX, float angleY, float angleZ, Matrix3f dest)
Description copied from interface:Matrix3fcApply rotation ofangleXradians about the X axis, followed by a rotation ofangleYradians about the Y axis and followed by a rotation ofangleZradians about the Z axis and store the result indest.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
Misthismatrix andRthe rotation matrix, then the new matrix will beM * R. So when transforming a vectorvwith the new matrix by usingM * R * v, the rotation will be applied first!This method is equivalent to calling:
rotateX(angleX, dest).rotateY(angleY).rotateZ(angleZ)
-
rotateZYX
public Matrix3f rotateZYX(Vector3f angles)
Apply rotation ofangles.zradians about the Z axis, followed by a rotation ofangles.yradians about the Y axis and followed by a rotation ofangles.xradians about the X axis.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
Misthismatrix andRthe rotation matrix, then the new matrix will beM * R. So when transforming a vectorvwith the new matrix by usingM * R * v, the rotation will be applied first!This method is equivalent to calling:
rotateZ(angles.z).rotateY(angles.y).rotateX(angles.x)- Parameters:
angles- the Euler angles- Returns:
- this
-
rotateZYX
public Matrix3f rotateZYX(float angleZ, float angleY, float angleX)
Apply rotation ofangleZradians about the Z axis, followed by a rotation ofangleYradians about the Y axis and followed by a rotation ofangleXradians about the X axis.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
Misthismatrix andRthe rotation matrix, then the new matrix will beM * R. So when transforming a vectorvwith the new matrix by usingM * R * v, the rotation will be applied first!This method is equivalent to calling:
rotateZ(angleZ).rotateY(angleY).rotateX(angleX)- Parameters:
angleZ- the angle to rotate about ZangleY- the angle to rotate about YangleX- the angle to rotate about X- Returns:
- this
-
rotateZYX
public Matrix3f rotateZYX(float angleZ, float angleY, float angleX, Matrix3f dest)
Description copied from interface:Matrix3fcApply rotation ofangleZradians about the Z axis, followed by a rotation ofangleYradians about the Y axis and followed by a rotation ofangleXradians about the X axis and store the result indest.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
Misthismatrix andRthe rotation matrix, then the new matrix will beM * R. So when transforming a vectorvwith the new matrix by usingM * R * v, the rotation will be applied first!This method is equivalent to calling:
rotateZ(angleZ, dest).rotateY(angleY).rotateX(angleX)
-
rotateYXZ
public Matrix3f rotateYXZ(Vector3f angles)
Apply rotation ofangles.yradians about the Y axis, followed by a rotation ofangles.xradians about the X axis and followed by a rotation ofangles.zradians about the Z axis.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
Misthismatrix andRthe rotation matrix, then the new matrix will beM * R. So when transforming a vectorvwith the new matrix by usingM * R * v, the rotation will be applied first!This method is equivalent to calling:
rotateY(angles.y).rotateX(angles.x).rotateZ(angles.z)- Parameters:
angles- the Euler angles- Returns:
- this
-
rotateYXZ
public Matrix3f rotateYXZ(float angleY, float angleX, float angleZ)
Apply rotation ofangleYradians about the Y axis, followed by a rotation ofangleXradians about the X axis and followed by a rotation ofangleZradians about the Z axis.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
Misthismatrix andRthe rotation matrix, then the new matrix will beM * R. So when transforming a vectorvwith the new matrix by usingM * R * v, the rotation will be applied first!This method is equivalent to calling:
rotateY(angleY).rotateX(angleX).rotateZ(angleZ)- Parameters:
angleY- the angle to rotate about YangleX- the angle to rotate about XangleZ- the angle to rotate about Z- Returns:
- this
-
rotateYXZ
public Matrix3f rotateYXZ(float angleY, float angleX, float angleZ, Matrix3f dest)
Description copied from interface:Matrix3fcApply rotation ofangleYradians about the Y axis, followed by a rotation ofangleXradians about the X axis and followed by a rotation ofangleZradians about the Z axis and store the result indest.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
Misthismatrix andRthe rotation matrix, then the new matrix will beM * R. So when transforming a vectorvwith the new matrix by usingM * R * v, the rotation will be applied first!This method is equivalent to calling:
rotateY(angleY, dest).rotateX(angleX).rotateZ(angleZ)
-
rotate
public Matrix3f rotate(float ang, float x, float y, float z)
Apply rotation to this matrix by rotating the given amount of radians about the given axis specified as x, y and z components.The axis described by the three components needs to be a unit vector.
When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
Misthismatrix andRthe rotation matrix, then the new matrix will beM * R. So when transforming a vectorvwith the new matrix by usingM * R * v, the rotation will be applied first!Reference: http://en.wikipedia.org
- Parameters:
ang- the angle in radiansx- the x component of the axisy- the y component of the axisz- the z component of the axis- Returns:
- this
-
rotate
public Matrix3f rotate(float ang, float x, float y, float z, Matrix3f dest)
Description copied from interface:Matrix3fcApply rotation to this matrix by rotating the given amount of radians about the given axis specified as x, y and z components, and store the result indest.The axis described by the three components needs to be a unit vector.
When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
Misthismatrix andRthe rotation matrix, then the new matrix will beM * R. So when transforming a vectorvwith the new matrix by usingM * R * v, the rotation will be applied first!Reference: http://en.wikipedia.org
-
rotateLocal
public Matrix3f rotateLocal(float ang, float x, float y, float z, Matrix3f dest)
Pre-multiply a rotation to this matrix by rotating the given amount of radians about the specified(x, y, z)axis and store the result indest.The axis described by the three components needs to be a unit vector.
When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
Misthismatrix andRthe rotation matrix, then the new matrix will beR * M. So when transforming a vectorvwith the new matrix by usingR * M * v, the rotation will be applied last!In order to set the matrix to a rotation matrix without pre-multiplying the rotation transformation, use
rotation().Reference: http://en.wikipedia.org
- Specified by:
rotateLocalin interfaceMatrix3fc- Parameters:
ang- the angle in radiansx- the x component of the axisy- the y component of the axisz- the z component of the axisdest- will hold the result- Returns:
- dest
- See Also:
rotation(float, float, float, float)
-
rotateLocal
public Matrix3f rotateLocal(float ang, float x, float y, float z)
Pre-multiply a rotation to this matrix by rotating the given amount of radians about the specified(x, y, z)axis.The axis described by the three components needs to be a unit vector.
When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
Misthismatrix andRthe rotation matrix, then the new matrix will beR * M. So when transforming a vectorvwith the new matrix by usingR * M * v, the rotation will be applied last!In order to set the matrix to a rotation matrix without pre-multiplying the rotation transformation, use
rotation().Reference: http://en.wikipedia.org
- Parameters:
ang- the angle in radiansx- the x component of the axisy- the y component of the axisz- the z component of the axis- Returns:
- this
- See Also:
rotation(float, float, float, float)
-
rotateLocalX
public Matrix3f rotateLocalX(float ang, Matrix3f dest)
Pre-multiply a rotation around the X axis to this matrix by rotating the given amount of radians about the X axis and store the result indest.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
Misthismatrix andRthe rotation matrix, then the new matrix will beR * M. So when transforming a vectorvwith the new matrix by usingR * M * v, the rotation will be applied last!In order to set the matrix to a rotation matrix without pre-multiplying the rotation transformation, use
rotationX().Reference: http://en.wikipedia.org
- Specified by:
rotateLocalXin interfaceMatrix3fc- Parameters:
ang- the angle in radians to rotate about the X axisdest- will hold the result- Returns:
- dest
- See Also:
rotationX(float)
-
rotateLocalX
public Matrix3f rotateLocalX(float ang)
Pre-multiply a rotation to this matrix by rotating the given amount of radians about the X axis.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
Misthismatrix andRthe rotation matrix, then the new matrix will beR * M. So when transforming a vectorvwith the new matrix by usingR * M * v, the rotation will be applied last!In order to set the matrix to a rotation matrix without pre-multiplying the rotation transformation, use
rotationX().Reference: http://en.wikipedia.org
- Parameters:
ang- the angle in radians to rotate about the X axis- Returns:
- this
- See Also:
rotationX(float)
-
rotateLocalY
public Matrix3f rotateLocalY(float ang, Matrix3f dest)
Pre-multiply a rotation around the Y axis to this matrix by rotating the given amount of radians about the Y axis and store the result indest.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
Misthismatrix andRthe rotation matrix, then the new matrix will beR * M. So when transforming a vectorvwith the new matrix by usingR * M * v, the rotation will be applied last!In order to set the matrix to a rotation matrix without pre-multiplying the rotation transformation, use
rotationY().Reference: http://en.wikipedia.org
- Specified by:
rotateLocalYin interfaceMatrix3fc- Parameters:
ang- the angle in radians to rotate about the Y axisdest- will hold the result- Returns:
- dest
- See Also:
rotationY(float)
-
rotateLocalY
public Matrix3f rotateLocalY(float ang)
Pre-multiply a rotation to this matrix by rotating the given amount of radians about the Y axis.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
Misthismatrix andRthe rotation matrix, then the new matrix will beR * M. So when transforming a vectorvwith the new matrix by usingR * M * v, the rotation will be applied last!In order to set the matrix to a rotation matrix without pre-multiplying the rotation transformation, use
rotationY().Reference: http://en.wikipedia.org
- Parameters:
ang- the angle in radians to rotate about the Y axis- Returns:
- this
- See Also:
rotationY(float)
-
rotateLocalZ
public Matrix3f rotateLocalZ(float ang, Matrix3f dest)
Pre-multiply a rotation around the Z axis to this matrix by rotating the given amount of radians about the Z axis and store the result indest.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
Misthismatrix andRthe rotation matrix, then the new matrix will beR * M. So when transforming a vectorvwith the new matrix by usingR * M * v, the rotation will be applied last!In order to set the matrix to a rotation matrix without pre-multiplying the rotation transformation, use
rotationZ().Reference: http://en.wikipedia.org
- Specified by:
rotateLocalZin interfaceMatrix3fc- Parameters:
ang- the angle in radians to rotate about the Z axisdest- will hold the result- Returns:
- dest
- See Also:
rotationZ(float)
-
rotateLocalZ
public Matrix3f rotateLocalZ(float ang)
Pre-multiply a rotation to this matrix by rotating the given amount of radians about the Z axis.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
Misthismatrix andRthe rotation matrix, then the new matrix will beR * M. So when transforming a vectorvwith the new matrix by usingR * M * v, the rotation will be applied last!In order to set the matrix to a rotation matrix without pre-multiplying the rotation transformation, use
rotationY().Reference: http://en.wikipedia.org
- Parameters:
ang- the angle in radians to rotate about the Z axis- Returns:
- this
- See Also:
rotationY(float)
-
rotate
public Matrix3f rotate(Quaternionfc quat)
Apply the rotation - and possibly scaling - transformation of the givenQuaternionfcto this matrix.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
Misthismatrix andQthe rotation matrix obtained from the given quaternion, then the new matrix will beM * Q. So when transforming a vectorvwith the new matrix by usingM * Q * v, the quaternion rotation will be applied first!In order to set the matrix to a rotation transformation without post-multiplying, use
rotation(Quaternionfc).Reference: http://en.wikipedia.org
- Parameters:
quat- theQuaternionfc- Returns:
- this
- See Also:
rotation(Quaternionfc)
-
rotate
public Matrix3f rotate(Quaternionfc quat, Matrix3f dest)
Apply the rotation - and possibly scaling - transformation of the givenQuaternionfcto this matrix and store the result indest.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
Misthismatrix andQthe rotation matrix obtained from the given quaternion, then the new matrix will beM * Q. So when transforming a vectorvwith the new matrix by usingM * Q * v, the quaternion rotation will be applied first!In order to set the matrix to a rotation transformation without post-multiplying, use
rotation(Quaternionfc).Reference: http://en.wikipedia.org
- Specified by:
rotatein interfaceMatrix3fc- Parameters:
quat- theQuaternionfcdest- will hold the result- Returns:
- dest
- See Also:
rotation(Quaternionfc)
-
rotateLocal
public Matrix3f rotateLocal(Quaternionfc quat, Matrix3f dest)
Pre-multiply the rotation - and possibly scaling - transformation of the givenQuaternionfcto this matrix and store the result indest.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
Misthismatrix andQthe rotation matrix obtained from the given quaternion, then the new matrix will beQ * M. So when transforming a vectorvwith the new matrix by usingQ * M * v, the quaternion rotation will be applied last!In order to set the matrix to a rotation transformation without pre-multiplying, use
rotation(Quaternionfc).Reference: http://en.wikipedia.org
- Specified by:
rotateLocalin interfaceMatrix3fc- Parameters:
quat- theQuaternionfcdest- will hold the result- Returns:
- dest
- See Also:
rotation(Quaternionfc)
-
rotateLocal
public Matrix3f rotateLocal(Quaternionfc quat)
Pre-multiply the rotation - and possibly scaling - transformation of the givenQuaternionfcto this matrix.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
Misthismatrix andQthe rotation matrix obtained from the given quaternion, then the new matrix will beQ * M. So when transforming a vectorvwith the new matrix by usingQ * M * v, the quaternion rotation will be applied last!In order to set the matrix to a rotation transformation without pre-multiplying, use
rotation(Quaternionfc).Reference: http://en.wikipedia.org
- Parameters:
quat- theQuaternionfc- Returns:
- this
- See Also:
rotation(Quaternionfc)
-
rotate
public Matrix3f rotate(AxisAngle4f axisAngle)
Apply a rotation transformation, rotating about the givenAxisAngle4f, to this matrix.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
Misthismatrix andAthe rotation matrix obtained from the givenAxisAngle4f, then the new matrix will beM * A. So when transforming a vectorvwith the new matrix by usingM * A * v, theAxisAngle4frotation will be applied first!In order to set the matrix to a rotation transformation without post-multiplying, use
rotation(AxisAngle4f).Reference: http://en.wikipedia.org
- Parameters:
axisAngle- theAxisAngle4f(needs to benormalized)- Returns:
- this
- See Also:
rotate(float, float, float, float),rotation(AxisAngle4f)
-
rotate
public Matrix3f rotate(AxisAngle4f axisAngle, Matrix3f dest)
Apply a rotation transformation, rotating about the givenAxisAngle4fand store the result indest.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
Misthismatrix andAthe rotation matrix obtained from the givenAxisAngle4f, then the new matrix will beM * A. So when transforming a vectorvwith the new matrix by usingM * A * v, theAxisAngle4frotation will be applied first!In order to set the matrix to a rotation transformation without post-multiplying, use
rotation(AxisAngle4f).Reference: http://en.wikipedia.org
- Specified by:
rotatein interfaceMatrix3fc- Parameters:
axisAngle- theAxisAngle4f(needs to benormalized)dest- will hold the result- Returns:
- dest
- See Also:
rotate(float, float, float, float),rotation(AxisAngle4f)
-
rotate
public Matrix3f rotate(float angle, Vector3fc axis)
Apply a rotation transformation, rotating the given radians about the specified axis, to this matrix.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
Misthismatrix andAthe rotation matrix obtained from the given angle and axis, then the new matrix will beM * A. So when transforming a vectorvwith the new matrix by usingM * A * v, the axis-angle rotation will be applied first!In order to set the matrix to a rotation transformation without post-multiplying, use
rotation(float, Vector3fc).Reference: http://en.wikipedia.org
- Parameters:
angle- the angle in radiansaxis- the rotation axis (needs to benormalized)- Returns:
- this
- See Also:
rotate(float, float, float, float),rotation(float, Vector3fc)
-
rotate
public Matrix3f rotate(float angle, Vector3fc axis, Matrix3f dest)
Apply a rotation transformation, rotating the given radians about the specified axis and store the result indest.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
Misthismatrix andAthe rotation matrix obtained from the given angle and axis, then the new matrix will beM * A. So when transforming a vectorvwith the new matrix by usingM * A * v, the axis-angle rotation will be applied first!In order to set the matrix to a rotation transformation without post-multiplying, use
rotation(float, Vector3fc).Reference: http://en.wikipedia.org
- Specified by:
rotatein interfaceMatrix3fc- Parameters:
angle- the angle in radiansaxis- the rotation axis (needs to benormalized)dest- will hold the result- Returns:
- dest
- See Also:
rotate(float, float, float, float),rotation(float, Vector3fc)
-
lookAlong
public Matrix3f lookAlong(Vector3fc dir, Vector3fc up)
Apply a rotation transformation to this matrix to make-zpoint alongdir.If
Misthismatrix andLthe lookalong rotation matrix, then the new matrix will beM * L. So when transforming a vectorvwith the new matrix by usingM * L * v, the lookalong rotation transformation will be applied first!In order to set the matrix to a lookalong transformation without post-multiplying it, use
setLookAlong().- Parameters:
dir- the direction in space to look alongup- the direction of 'up'- Returns:
- this
- See Also:
lookAlong(float, float, float, float, float, float),setLookAlong(Vector3fc, Vector3fc)
-
lookAlong
public Matrix3f lookAlong(Vector3fc dir, Vector3fc up, Matrix3f dest)
Apply a rotation transformation to this matrix to make-zpoint alongdirand store the result indest.If
Misthismatrix andLthe lookalong rotation matrix, then the new matrix will beM * L. So when transforming a vectorvwith the new matrix by usingM * L * v, the lookalong rotation transformation will be applied first!In order to set the matrix to a lookalong transformation without post-multiplying it, use
setLookAlong().- Specified by:
lookAlongin interfaceMatrix3fc- Parameters:
dir- the direction in space to look alongup- the direction of 'up'dest- will hold the result- Returns:
- dest
- See Also:
lookAlong(float, float, float, float, float, float),setLookAlong(Vector3fc, Vector3fc)
-
lookAlong
public Matrix3f lookAlong(float dirX, float dirY, float dirZ, float upX, float upY, float upZ, Matrix3f dest)
Apply a rotation transformation to this matrix to make-zpoint alongdirand store the result indest.If
Misthismatrix andLthe lookalong rotation matrix, then the new matrix will beM * L. So when transforming a vectorvwith the new matrix by usingM * L * v, the lookalong rotation transformation will be applied first!In order to set the matrix to a lookalong transformation without post-multiplying it, use
setLookAlong()- Specified by:
lookAlongin interfaceMatrix3fc- Parameters:
dirX- the x-coordinate of the direction to look alongdirY- the y-coordinate of the direction to look alongdirZ- the z-coordinate of the direction to look alongupX- the x-coordinate of the up vectorupY- the y-coordinate of the up vectorupZ- the z-coordinate of the up vectordest- will hold the result- Returns:
- dest
- See Also:
setLookAlong(float, float, float, float, float, float)
-
lookAlong
public Matrix3f lookAlong(float dirX, float dirY, float dirZ, float upX, float upY, float upZ)
Apply a rotation transformation to this matrix to make-zpoint alongdir.If
Misthismatrix andLthe lookalong rotation matrix, then the new matrix will beM * L. So when transforming a vectorvwith the new matrix by usingM * L * v, the lookalong rotation transformation will be applied first!In order to set the matrix to a lookalong transformation without post-multiplying it, use
setLookAlong()- Parameters:
dirX- the x-coordinate of the direction to look alongdirY- the y-coordinate of the direction to look alongdirZ- the z-coordinate of the direction to look alongupX- the x-coordinate of the up vectorupY- the y-coordinate of the up vectorupZ- the z-coordinate of the up vector- Returns:
- this
- See Also:
setLookAlong(float, float, float, float, float, float)
-
setLookAlong
public Matrix3f setLookAlong(Vector3fc dir, Vector3fc up)
Set this matrix to a rotation transformation to make-zpoint alongdir.In order to apply the lookalong transformation to any previous existing transformation, use
lookAlong(Vector3fc, Vector3fc).- Parameters:
dir- the direction in space to look alongup- the direction of 'up'- Returns:
- this
- See Also:
setLookAlong(Vector3fc, Vector3fc),lookAlong(Vector3fc, Vector3fc)
-
setLookAlong
public Matrix3f setLookAlong(float dirX, float dirY, float dirZ, float upX, float upY, float upZ)
Set this matrix to a rotation transformation to make-zpoint alongdir.In order to apply the lookalong transformation to any previous existing transformation, use
lookAlong()- Parameters:
dirX- the x-coordinate of the direction to look alongdirY- the y-coordinate of the direction to look alongdirZ- the z-coordinate of the direction to look alongupX- the x-coordinate of the up vectorupY- the y-coordinate of the up vectorupZ- the z-coordinate of the up vector- Returns:
- this
- See Also:
setLookAlong(float, float, float, float, float, float),lookAlong(float, float, float, float, float, float)
-
getRow
public Vector3f getRow(int row, Vector3f dest) throws java.lang.IndexOutOfBoundsException
Description copied from interface:Matrix3fcGet the row at the givenrowindex, starting with0.
-
setRow
public Matrix3f setRow(int row, Vector3fc src) throws java.lang.IndexOutOfBoundsException
Set the row at the givenrowindex, starting with0.- Parameters:
row- the row index in[0..2]src- the row components to set- Returns:
- this
- Throws:
java.lang.IndexOutOfBoundsException- ifrowis not in[0..2]
-
setRow
public Matrix3f setRow(int row, float x, float y, float z) throws java.lang.IndexOutOfBoundsException
Set the row at the givenrowindex, starting with0.- Parameters:
row- the row index in[0..2]x- the first element in the rowy- the second element in the rowz- the third element in the row- Returns:
- this
- Throws:
java.lang.IndexOutOfBoundsException- ifrowis not in[0..2]
-
getColumn
public Vector3f getColumn(int column, Vector3f dest) throws java.lang.IndexOutOfBoundsException
Description copied from interface:Matrix3fcGet the column at the givencolumnindex, starting with0.
-
setColumn
public Matrix3f setColumn(int column, Vector3fc src) throws java.lang.IndexOutOfBoundsException
Set the column at the givencolumnindex, starting with0.- Parameters:
column- the column index in[0..2]src- the column components to set- Returns:
- this
- Throws:
java.lang.IndexOutOfBoundsException- ifcolumnis not in[0..2]
-
setColumn
public Matrix3f setColumn(int column, float x, float y, float z) throws java.lang.IndexOutOfBoundsException
Set the column at the givencolumnindex, starting with0.- Parameters:
column- the column index in[0..2]x- the first element in the columny- the second element in the columnz- the third element in the column- Returns:
- this
- Throws:
java.lang.IndexOutOfBoundsException- ifcolumnis not in[0..2]
-
get
public float get(int column, int row)Description copied from interface:Matrix3fcGet the matrix element value at the given column and row.
-
set
public Matrix3f set(int column, int row, float value)
Set the matrix element at the given column and row to the specified value.- Parameters:
column- the colum index in[0..2]row- the row index in[0..2]value- the value- Returns:
- this
-
getRowColumn
public float getRowColumn(int row, int column)Description copied from interface:Matrix3fcGet the matrix element value at the given row and column.- Specified by:
getRowColumnin interfaceMatrix3fc- Parameters:
row- the row index in[0..2]column- the colum index in[0..2]- Returns:
- the element value
-
setRowColumn
public Matrix3f setRowColumn(int row, int column, float value)
Set the matrix element at the given row and column to the specified value.- Parameters:
row- the row index in[0..2]column- the colum index in[0..2]value- the value- Returns:
- this
-
normal
public Matrix3f normal()
Setthismatrix to its own normal matrix.The normal matrix of
mis the transpose of the inverse ofm.Please note that, if
thisis an orthogonal matrix or a matrix whose columns are orthogonal vectors, then this method need not be invoked, since in that casethisitself is its normal matrix. In this case, useset(Matrix3fc)to set a given Matrix3f to this matrix.- Returns:
- this
- See Also:
set(Matrix3fc)
-
normal
public Matrix3f normal(Matrix3f dest)
Compute a normal matrix fromthismatrix and store it intodest.The normal matrix of
mis the transpose of the inverse ofm.Please note that, if
thisis an orthogonal matrix or a matrix whose columns are orthogonal vectors, then this method need not be invoked, since in that casethisitself is its normal matrix. In this case, useset(Matrix3fc)to set a given Matrix3f to this matrix.- Specified by:
normalin interfaceMatrix3fc- Parameters:
dest- will hold the result- Returns:
- dest
- See Also:
set(Matrix3fc)
-
cofactor
public Matrix3f cofactor()
Compute the cofactor matrix ofthis.The cofactor matrix can be used instead of
normal()to transform normals when the orientation of the normals with respect to the surface should be preserved.- Returns:
- this
-
cofactor
public Matrix3f cofactor(Matrix3f dest)
Compute the cofactor matrix ofthisand store it intodest.The cofactor matrix can be used instead of
normal(Matrix3f)to transform normals when the orientation of the normals with respect to the surface should be preserved.
-
getScale
public Vector3f getScale(Vector3f dest)
Description copied from interface:Matrix3fcGet the scaling factors ofthismatrix for the three base axes.
-
positiveZ
public Vector3f positiveZ(Vector3f dir)
Description copied from interface:Matrix3fcObtain the direction of+Zbefore the transformation represented bythismatrix is applied.This method is equivalent to the following code:
Matrix3f inv = new Matrix3f(this).invert(); inv.transform(dir.set(0, 0, 1)).normalize();
Ifthisis already an orthogonal matrix, then consider usingMatrix3fc.normalizedPositiveZ(Vector3f)instead.Reference: http://www.euclideanspace.com
-
normalizedPositiveZ
public Vector3f normalizedPositiveZ(Vector3f dir)
Description copied from interface:Matrix3fcObtain the direction of+Zbefore the transformation represented bythisorthogonal matrix is applied. This method only produces correct results ifthisis an orthogonal matrix.This method is equivalent to the following code:
Matrix3f inv = new Matrix3f(this).transpose(); inv.transform(dir.set(0, 0, 1));
Reference: http://www.euclideanspace.com
- Specified by:
normalizedPositiveZin interfaceMatrix3fc- Parameters:
dir- will hold the direction of+Z- Returns:
- dir
-
positiveX
public Vector3f positiveX(Vector3f dir)
Description copied from interface:Matrix3fcObtain the direction of+Xbefore the transformation represented bythismatrix is applied.This method is equivalent to the following code:
Matrix3f inv = new Matrix3f(this).invert(); inv.transform(dir.set(1, 0, 0)).normalize();
Ifthisis already an orthogonal matrix, then consider usingMatrix3fc.normalizedPositiveX(Vector3f)instead.Reference: http://www.euclideanspace.com
-
normalizedPositiveX
public Vector3f normalizedPositiveX(Vector3f dir)
Description copied from interface:Matrix3fcObtain the direction of+Xbefore the transformation represented bythisorthogonal matrix is applied. This method only produces correct results ifthisis an orthogonal matrix.This method is equivalent to the following code:
Matrix3f inv = new Matrix3f(this).transpose(); inv.transform(dir.set(1, 0, 0));
Reference: http://www.euclideanspace.com
- Specified by:
normalizedPositiveXin interfaceMatrix3fc- Parameters:
dir- will hold the direction of+X- Returns:
- dir
-
positiveY
public Vector3f positiveY(Vector3f dir)
Description copied from interface:Matrix3fcObtain the direction of+Ybefore the transformation represented bythismatrix is applied.This method is equivalent to the following code:
Matrix3f inv = new Matrix3f(this).invert(); inv.transform(dir.set(0, 1, 0)).normalize();
Ifthisis already an orthogonal matrix, then consider usingMatrix3fc.normalizedPositiveY(Vector3f)instead.Reference: http://www.euclideanspace.com
-
normalizedPositiveY
public Vector3f normalizedPositiveY(Vector3f dir)
Description copied from interface:Matrix3fcObtain the direction of+Ybefore the transformation represented bythisorthogonal matrix is applied. This method only produces correct results ifthisis an orthogonal matrix.This method is equivalent to the following code:
Matrix3f inv = new Matrix3f(this).transpose(); inv.transform(dir.set(0, 1, 0));
Reference: http://www.euclideanspace.com
- Specified by:
normalizedPositiveYin interfaceMatrix3fc- Parameters:
dir- will hold the direction of+Y- Returns:
- dir
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
equals
public boolean equals(Matrix3fc m, float delta)
Description copied from interface:Matrix3fcCompare the matrix elements ofthismatrix with the given matrix using the givendeltaand return whether all of them are equal within a maximum difference ofdelta.Please note that this method is not used by any data structure such as
ArrayListHashSetorHashMapand their operations, such asArrayList.contains(Object)orHashSet.remove(Object), since those data structures only use theObject.equals(Object)andObject.hashCode()methods.
-
swap
public Matrix3f swap(Matrix3f other)
Exchange the values ofthismatrix with the givenothermatrix.- Parameters:
other- the other matrix to exchange the values with- Returns:
- this
-
add
public Matrix3f add(Matrix3fc other)
Component-wise addthisandother.- Parameters:
other- the other addend- Returns:
- this
-
add
public Matrix3f add(Matrix3fc other, Matrix3f dest)
Description copied from interface:Matrix3fcComponent-wise addthisandotherand store the result indest.
-
sub
public Matrix3f sub(Matrix3fc subtrahend)
Component-wise subtractsubtrahendfromthis.- Parameters:
subtrahend- the subtrahend- Returns:
- this
-
sub
public Matrix3f sub(Matrix3fc subtrahend, Matrix3f dest)
Description copied from interface:Matrix3fcComponent-wise subtractsubtrahendfromthisand store the result indest.
-
mulComponentWise
public Matrix3f mulComponentWise(Matrix3fc other)
Component-wise multiplythisbyother.- Parameters:
other- the other matrix- Returns:
- this
-
mulComponentWise
public Matrix3f mulComponentWise(Matrix3fc other, Matrix3f dest)
Description copied from interface:Matrix3fcComponent-wise multiplythisbyotherand store the result indest.- Specified by:
mulComponentWisein interfaceMatrix3fc- Parameters:
other- the other matrixdest- will hold the result- Returns:
- dest
-
setSkewSymmetric
public Matrix3f setSkewSymmetric(float a, float b, float c)
Set this matrix to a skew-symmetric matrix using the following layout:0, a, -b -a, 0, c b, -c, 0
Reference: https://en.wikipedia.org- Parameters:
a- the value used for the matrix elements m01 and m10b- the value used for the matrix elements m02 and m20c- the value used for the matrix elements m12 and m21- Returns:
- this
-
lerp
public Matrix3f lerp(Matrix3fc other, float t)
Linearly interpolatethisandotherusing the given interpolation factortand store the result inthis.If
tis0.0then the result isthis. If the interpolation factor is1.0then the result isother.- Parameters:
other- the other matrixt- the interpolation factor between 0.0 and 1.0- Returns:
- this
-
lerp
public Matrix3f lerp(Matrix3fc other, float t, Matrix3f dest)
Description copied from interface:Matrix3fcLinearly interpolatethisandotherusing the given interpolation factortand store the result indest.If
tis0.0then the result isthis. If the interpolation factor is1.0then the result isother.
-
rotateTowards
public Matrix3f rotateTowards(Vector3fc direction, Vector3fc up, Matrix3f dest)
Apply a model transformation to this matrix for a right-handed coordinate system, that aligns the local+Zaxis withdirectionand store the result indest.If
Misthismatrix andLthe lookat matrix, then the new matrix will beM * L. So when transforming a vectorvwith the new matrix by usingM * L * v, the lookat transformation will be applied first!In order to set the matrix to a rotation transformation without post-multiplying it, use
rotationTowards().This method is equivalent to calling:
mul(new Matrix3f().lookAlong(new Vector3f(dir).negate(), up).invert(), dest)- Specified by:
rotateTowardsin interfaceMatrix3fc- Parameters:
direction- the direction to rotate towardsup- the model's up vectordest- will hold the result- Returns:
- dest
- See Also:
rotateTowards(float, float, float, float, float, float, Matrix3f),rotationTowards(Vector3fc, Vector3fc)
-
rotateTowards
public Matrix3f rotateTowards(Vector3fc direction, Vector3fc up)
Apply a model transformation to this matrix for a right-handed coordinate system, that aligns the local+Zaxis withdirection.If
Misthismatrix andLthe lookat matrix, then the new matrix will beM * L. So when transforming a vectorvwith the new matrix by usingM * L * v, the lookat transformation will be applied first!In order to set the matrix to a rotation transformation without post-multiplying it, use
rotationTowards().This method is equivalent to calling:
mul(new Matrix3f().lookAlong(new Vector3f(dir).negate(), up).invert())- Parameters:
direction- the direction to orient towardsup- the up vector- Returns:
- this
- See Also:
rotateTowards(float, float, float, float, float, float),rotationTowards(Vector3fc, Vector3fc)
-
rotateTowards
public Matrix3f rotateTowards(float dirX, float dirY, float dirZ, float upX, float upY, float upZ)
Apply a model transformation to this matrix for a right-handed coordinate system, that aligns the local+Zaxis withdirection.If
Misthismatrix andLthe lookat matrix, then the new matrix will beM * L. So when transforming a vectorvwith the new matrix by usingM * L * v, the lookat transformation will be applied first!In order to set the matrix to a rotation transformation without post-multiplying it, use
rotationTowards().This method is equivalent to calling:
mul(new Matrix3f().lookAlong(-dirX, -dirY, -dirZ, upX, upY, upZ).invert())- Parameters:
dirX- the x-coordinate of the direction to rotate towardsdirY- the y-coordinate of the direction to rotate towardsdirZ- the z-coordinate of the direction to rotate towardsupX- the x-coordinate of the up vectorupY- the y-coordinate of the up vectorupZ- the z-coordinate of the up vector- Returns:
- this
- See Also:
rotateTowards(Vector3fc, Vector3fc),rotationTowards(float, float, float, float, float, float)
-
rotateTowards
public Matrix3f rotateTowards(float dirX, float dirY, float dirZ, float upX, float upY, float upZ, Matrix3f dest)
Apply a model transformation to this matrix for a right-handed coordinate system, that aligns the local+Zaxis withdirand store the result indest.If
Misthismatrix andLthe lookat matrix, then the new matrix will beM * L. So when transforming a vectorvwith the new matrix by usingM * L * v, the lookat transformation will be applied first!In order to set the matrix to a rotation transformation without post-multiplying it, use
rotationTowards().This method is equivalent to calling:
mul(new Matrix3f().lookAlong(-dirX, -dirY, -dirZ, upX, upY, upZ).invert(), dest)- Specified by:
rotateTowardsin interfaceMatrix3fc- Parameters:
dirX- the x-coordinate of the direction to rotate towardsdirY- the y-coordinate of the direction to rotate towardsdirZ- the z-coordinate of the direction to rotate towardsupX- the x-coordinate of the up vectorupY- the y-coordinate of the up vectorupZ- the z-coordinate of the up vectordest- will hold the result- Returns:
- dest
- See Also:
rotateTowards(Vector3fc, Vector3fc),rotationTowards(float, float, float, float, float, float)
-
rotationTowards
public Matrix3f rotationTowards(Vector3fc dir, Vector3fc up)
Set this matrix to a model transformation for a right-handed coordinate system, that aligns the local-zaxis withcenter - eye.In order to apply the rotation transformation to a previous existing transformation, use
rotateTowards.This method is equivalent to calling:
setLookAlong(new Vector3f(dir).negate(), up).invert()- Parameters:
dir- the direction to orient the local -z axis towardsup- the up vector- Returns:
- this
- See Also:
rotationTowards(Vector3fc, Vector3fc),rotateTowards(float, float, float, float, float, float)
-
rotationTowards
public Matrix3f rotationTowards(float dirX, float dirY, float dirZ, float upX, float upY, float upZ)
Set this matrix to a model transformation for a right-handed coordinate system, that aligns the local-zaxis withcenter - eye.In order to apply the rotation transformation to a previous existing transformation, use
rotateTowards.This method is equivalent to calling:
setLookAlong(-dirX, -dirY, -dirZ, upX, upY, upZ).invert()- Parameters:
dirX- the x-coordinate of the direction to rotate towardsdirY- the y-coordinate of the direction to rotate towardsdirZ- the z-coordinate of the direction to rotate towardsupX- the x-coordinate of the up vectorupY- the y-coordinate of the up vectorupZ- the z-coordinate of the up vector- Returns:
- this
- See Also:
rotateTowards(Vector3fc, Vector3fc),rotationTowards(float, float, float, float, float, float)
-
getEulerAnglesZYX
public Vector3f getEulerAnglesZYX(Vector3f dest)
Description copied from interface:Matrix3fcExtract the Euler angles from the rotation represented bythismatrix and store the extracted Euler angles indest.This method assumes that
thismatrix only represents a rotation without scaling.The Euler angles are always returned as the angle around X in the
Vector3f.xfield, the angle around Y in theVector3f.yfield and the angle around Z in theVector3f.zfield of the suppliedVector3finstance.Note that the returned Euler angles must be applied in the order
Z * Y * Xto obtain the identical matrix. This means that callingMatrix3fc.rotateZYX(float, float, float, Matrix3f)using the obtained Euler angles will yield the same rotation as the original matrix from which the Euler angles were obtained, so in the below code the matrixm2should be identical tom(disregarding possible floating-point inaccuracies).Matrix3f m = ...; // <- matrix only representing rotation Matrix3f n = new Matrix3f(); n.rotateZYX(m.getEulerAnglesZYX(new Vector3f()));
Reference: http://en.wikipedia.org/
- Specified by:
getEulerAnglesZYXin interfaceMatrix3fc- Parameters:
dest- will hold the extracted Euler angles- Returns:
- dest
-
getEulerAnglesXYZ
public Vector3f getEulerAnglesXYZ(Vector3f dest)
Description copied from interface:Matrix3fcExtract the Euler angles from the rotation represented bythismatrix and store the extracted Euler angles indest.This method assumes that
thismatrix only represents a rotation without scaling.The Euler angles are always returned as the angle around X in the
Vector3f.xfield, the angle around Y in theVector3f.yfield and the angle around Z in theVector3f.zfield of the suppliedVector3finstance.Note that the returned Euler angles must be applied in the order
X * Y * Zto obtain the identical matrix. This means that callingMatrix3fc.rotateXYZ(float, float, float, Matrix3f)using the obtained Euler angles will yield the same rotation as the original matrix from which the Euler angles were obtained, so in the below code the matrixm2should be identical tom(disregarding possible floating-point inaccuracies).Matrix3f m = ...; // <- matrix only representing rotation Matrix3f n = new Matrix3f(); n.rotateXYZ(m.getEulerAnglesXYZ(new Vector3f()));
Reference: http://en.wikipedia.org/
- Specified by:
getEulerAnglesXYZin interfaceMatrix3fc- Parameters:
dest- will hold the extracted Euler angles- Returns:
- dest
-
obliqueZ
public Matrix3f obliqueZ(float a, float b)
Apply an oblique projection transformation to this matrix with the given values foraandb.If
Misthismatrix andOthe oblique transformation matrix, then the new matrix will beM * O. So when transforming a vectorvwith the new matrix by usingM * O * v, the oblique transformation will be applied first!The oblique transformation is defined as:
x' = x + a*z y' = y + a*z z' = z
or in matrix form:1 0 a 0 1 b 0 0 1
- Parameters:
a- the value for the z factor that applies to xb- the value for the z factor that applies to y- Returns:
- this
-
obliqueZ
public Matrix3f obliqueZ(float a, float b, Matrix3f dest)
Apply an oblique projection transformation to this matrix with the given values foraandband store the result indest.If
Misthismatrix andOthe oblique transformation matrix, then the new matrix will beM * O. So when transforming a vectorvwith the new matrix by usingM * O * v, the oblique transformation will be applied first!The oblique transformation is defined as:
x' = x + a*z y' = y + a*z z' = z
or in matrix form:1 0 a 0 1 b 0 0 1
-
reflect
public Matrix3f reflect(float nx, float ny, float nz, Matrix3f dest)
Description copied from interface:Matrix3fcApply a mirror/reflection transformation to this matrix that reflects through the given plane specified via the plane normal(nx, ny, nz), and store the result indest.If
Misthismatrix andRthe reflection matrix, then the new matrix will beM * R. So when transforming a vectorvwith the new matrix by usingM * R * v, the reflection will be applied first!
-
reflect
public Matrix3f reflect(float nx, float ny, float nz)
Apply a mirror/reflection transformation to this matrix that reflects through the given plane specified via the plane normal.If
Misthismatrix andRthe reflection matrix, then the new matrix will beM * R. So when transforming a vectorvwith the new matrix by usingM * R * v, the reflection will be applied first!- Parameters:
nx- the x-coordinate of the plane normalny- the y-coordinate of the plane normalnz- the z-coordinate of the plane normal- Returns:
- this
-
reflect
public Matrix3f reflect(Vector3fc normal)
Apply a mirror/reflection transformation to this matrix that reflects through the given plane specified via the plane normal.If
Misthismatrix andRthe reflection matrix, then the new matrix will beM * R. So when transforming a vectorvwith the new matrix by usingM * R * v, the reflection will be applied first!- Parameters:
normal- the plane normal- Returns:
- this
-
reflect
public Matrix3f reflect(Quaternionfc orientation)
Apply a mirror/reflection transformation to this matrix that reflects about a plane specified via the plane orientation.This method can be used to build a reflection transformation based on the orientation of a mirror object in the scene. It is assumed that the default mirror plane's normal is
(0, 0, 1). So, if the givenQuaternionfcis the identity (does not apply any additional rotation), the reflection plane will bez=0.If
Misthismatrix andRthe reflection matrix, then the new matrix will beM * R. So when transforming a vectorvwith the new matrix by usingM * R * v, the reflection will be applied first!- Parameters:
orientation- the plane orientation- Returns:
- this
-
reflect
public Matrix3f reflect(Quaternionfc orientation, Matrix3f dest)
Description copied from interface:Matrix3fcApply a mirror/reflection transformation to this matrix that reflects through a plane specified via the plane orientation, and store the result indest.This method can be used to build a reflection transformation based on the orientation of a mirror object in the scene. It is assumed that the default mirror plane's normal is
(0, 0, 1). So, if the givenQuaternionfcis the identity (does not apply any additional rotation), the reflection plane will bez=0.If
Misthismatrix andRthe reflection matrix, then the new matrix will beM * R. So when transforming a vectorvwith the new matrix by usingM * R * v, the reflection will be applied first!
-
reflect
public Matrix3f reflect(Vector3fc normal, Matrix3f dest)
Description copied from interface:Matrix3fcApply a mirror/reflection transformation to this matrix that reflects through the given plane specified via the plane normal, and store the result indest.If
Misthismatrix andRthe reflection matrix, then the new matrix will beM * R. So when transforming a vectorvwith the new matrix by usingM * R * v, the reflection will be applied first!
-
reflection
public Matrix3f reflection(float nx, float ny, float nz)
Set this matrix to a mirror/reflection transformation that reflects through the given plane specified via the plane normal.- Parameters:
nx- the x-coordinate of the plane normalny- the y-coordinate of the plane normalnz- the z-coordinate of the plane normal- Returns:
- this
-
reflection
public Matrix3f reflection(Vector3fc normal)
Set this matrix to a mirror/reflection transformation that reflects through the given plane specified via the plane normal.- Parameters:
normal- the plane normal- Returns:
- this
-
reflection
public Matrix3f reflection(Quaternionfc orientation)
Set this matrix to a mirror/reflection transformation that reflects through a plane specified via the plane orientation.This method can be used to build a reflection transformation based on the orientation of a mirror object in the scene. It is assumed that the default mirror plane's normal is
(0, 0, 1). So, if the givenQuaternionfcis the identity (does not apply any additional rotation), the reflection plane will bez=0, offset by the givenpoint.- Parameters:
orientation- the plane orientation- Returns:
- this
-
isFinite
public boolean isFinite()
Description copied from interface:Matrix3fcDetermine whether all matrix elements are finite floating-point values, that is, they are notNaNand notinfinity.
-
quadraticFormProduct
public float quadraticFormProduct(float x, float y, float z)Description copied from interface:Matrix3fcCompute(x, y, z)^T * this * (x, y, z).- Specified by:
quadraticFormProductin interfaceMatrix3fc- Parameters:
x- the x coordinate of the vector to multiplyy- the y coordinate of the vector to multiplyz- the z coordinate of the vector to multiply- Returns:
- the result
-
quadraticFormProduct
public float quadraticFormProduct(Vector3fc v)
Description copied from interface:Matrix3fcComputev^T * this * v.- Specified by:
quadraticFormProductin interfaceMatrix3fc- Parameters:
v- the vector to multiply- Returns:
- the result
-
mapXZY
public Matrix3f mapXZY()
Multiplythisby the matrix1 0 0 0 0 1 0 1 0
- Returns:
- this
-
mapXZY
public Matrix3f mapXZY(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix1 0 0 0 0 1 0 1 0
and store the result indest.
-
mapXZnY
public Matrix3f mapXZnY()
Multiplythisby the matrix1 0 0 0 0 -1 0 1 0
- Returns:
- this
-
mapXZnY
public Matrix3f mapXZnY(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix1 0 0 0 0 -1 0 1 0
and store the result indest.
-
mapXnYnZ
public Matrix3f mapXnYnZ()
Multiplythisby the matrix1 0 0 0 -1 0 0 0 -1
- Returns:
- this
-
mapXnYnZ
public Matrix3f mapXnYnZ(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix1 0 0 0 -1 0 0 0 -1
and store the result indest.
-
mapXnZY
public Matrix3f mapXnZY()
Multiplythisby the matrix1 0 0 0 0 1 0 -1 0
- Returns:
- this
-
mapXnZY
public Matrix3f mapXnZY(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix1 0 0 0 0 1 0 -1 0
and store the result indest.
-
mapXnZnY
public Matrix3f mapXnZnY()
Multiplythisby the matrix1 0 0 0 0 -1 0 -1 0
- Returns:
- this
-
mapXnZnY
public Matrix3f mapXnZnY(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix1 0 0 0 0 -1 0 -1 0
and store the result indest.
-
mapYXZ
public Matrix3f mapYXZ()
Multiplythisby the matrix0 1 0 1 0 0 0 0 1
- Returns:
- this
-
mapYXZ
public Matrix3f mapYXZ(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix0 1 0 1 0 0 0 0 1
and store the result indest.
-
mapYXnZ
public Matrix3f mapYXnZ()
Multiplythisby the matrix0 1 0 1 0 0 0 0 -1
- Returns:
- this
-
mapYXnZ
public Matrix3f mapYXnZ(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix0 1 0 1 0 0 0 0 -1
and store the result indest.
-
mapYZX
public Matrix3f mapYZX()
Multiplythisby the matrix0 0 1 1 0 0 0 1 0
- Returns:
- this
-
mapYZX
public Matrix3f mapYZX(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix0 0 1 1 0 0 0 1 0
and store the result indest.
-
mapYZnX
public Matrix3f mapYZnX()
Multiplythisby the matrix0 0 -1 1 0 0 0 1 0
- Returns:
- this
-
mapYZnX
public Matrix3f mapYZnX(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix0 0 -1 1 0 0 0 1 0
and store the result indest.
-
mapYnXZ
public Matrix3f mapYnXZ()
Multiplythisby the matrix0 -1 0 1 0 0 0 0 1
- Returns:
- this
-
mapYnXZ
public Matrix3f mapYnXZ(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix0 -1 0 1 0 0 0 0 1
and store the result indest.
-
mapYnXnZ
public Matrix3f mapYnXnZ()
Multiplythisby the matrix0 -1 0 1 0 0 0 0 -1
- Returns:
- this
-
mapYnXnZ
public Matrix3f mapYnXnZ(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix0 -1 0 1 0 0 0 0 -1
and store the result indest.
-
mapYnZX
public Matrix3f mapYnZX()
Multiplythisby the matrix0 0 1 1 0 0 0 -1 0
- Returns:
- this
-
mapYnZX
public Matrix3f mapYnZX(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix0 0 1 1 0 0 0 -1 0
and store the result indest.
-
mapYnZnX
public Matrix3f mapYnZnX()
Multiplythisby the matrix0 0 -1 1 0 0 0 -1 0
- Returns:
- this
-
mapYnZnX
public Matrix3f mapYnZnX(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix0 0 -1 1 0 0 0 -1 0
and store the result indest.
-
mapZXY
public Matrix3f mapZXY()
Multiplythisby the matrix0 1 0 0 0 1 1 0 0
- Returns:
- this
-
mapZXY
public Matrix3f mapZXY(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix0 1 0 0 0 1 1 0 0
and store the result indest.
-
mapZXnY
public Matrix3f mapZXnY()
Multiplythisby the matrix0 1 0 0 0 -1 1 0 0
- Returns:
- this
-
mapZXnY
public Matrix3f mapZXnY(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix0 1 0 0 0 -1 1 0 0
and store the result indest.
-
mapZYX
public Matrix3f mapZYX()
Multiplythisby the matrix0 0 1 0 1 0 1 0 0
- Returns:
- this
-
mapZYX
public Matrix3f mapZYX(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix0 0 1 0 1 0 1 0 0
and store the result indest.
-
mapZYnX
public Matrix3f mapZYnX()
Multiplythisby the matrix0 0 -1 0 1 0 1 0 0
- Returns:
- this
-
mapZYnX
public Matrix3f mapZYnX(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix0 0 -1 0 1 0 1 0 0
and store the result indest.
-
mapZnXY
public Matrix3f mapZnXY()
Multiplythisby the matrix0 -1 0 0 0 1 1 0 0
- Returns:
- this
-
mapZnXY
public Matrix3f mapZnXY(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix0 -1 0 0 0 1 1 0 0
and store the result indest.
-
mapZnXnY
public Matrix3f mapZnXnY()
Multiplythisby the matrix0 -1 0 0 0 -1 1 0 0
- Returns:
- this
-
mapZnXnY
public Matrix3f mapZnXnY(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix0 -1 0 0 0 -1 1 0 0
and store the result indest.
-
mapZnYX
public Matrix3f mapZnYX()
Multiplythisby the matrix0 0 1 0 -1 0 1 0 0
- Returns:
- this
-
mapZnYX
public Matrix3f mapZnYX(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix0 0 1 0 -1 0 1 0 0
and store the result indest.
-
mapZnYnX
public Matrix3f mapZnYnX()
Multiplythisby the matrix0 0 -1 0 -1 0 1 0 0
- Returns:
- this
-
mapZnYnX
public Matrix3f mapZnYnX(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix0 0 -1 0 -1 0 1 0 0
and store the result indest.
-
mapnXYnZ
public Matrix3f mapnXYnZ()
Multiplythisby the matrix-1 0 0 0 1 0 0 0 -1
- Returns:
- this
-
mapnXYnZ
public Matrix3f mapnXYnZ(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix-1 0 0 0 1 0 0 0 -1
and store the result indest.
-
mapnXZY
public Matrix3f mapnXZY()
Multiplythisby the matrix-1 0 0 0 0 1 0 1 0
- Returns:
- this
-
mapnXZY
public Matrix3f mapnXZY(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix-1 0 0 0 0 1 0 1 0
and store the result indest.
-
mapnXZnY
public Matrix3f mapnXZnY()
Multiplythisby the matrix-1 0 0 0 0 -1 0 1 0
- Returns:
- this
-
mapnXZnY
public Matrix3f mapnXZnY(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix-1 0 0 0 0 -1 0 1 0
and store the result indest.
-
mapnXnYZ
public Matrix3f mapnXnYZ()
Multiplythisby the matrix-1 0 0 0 -1 0 0 0 1
- Returns:
- this
-
mapnXnYZ
public Matrix3f mapnXnYZ(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix-1 0 0 0 -1 0 0 0 1
and store the result indest.
-
mapnXnYnZ
public Matrix3f mapnXnYnZ()
Multiplythisby the matrix-1 0 0 0 -1 0 0 0 -1
- Returns:
- this
-
mapnXnYnZ
public Matrix3f mapnXnYnZ(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix-1 0 0 0 -1 0 0 0 -1
and store the result indest.
-
mapnXnZY
public Matrix3f mapnXnZY()
Multiplythisby the matrix-1 0 0 0 0 1 0 -1 0
- Returns:
- this
-
mapnXnZY
public Matrix3f mapnXnZY(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix-1 0 0 0 0 1 0 -1 0
and store the result indest.
-
mapnXnZnY
public Matrix3f mapnXnZnY()
Multiplythisby the matrix-1 0 0 0 0 -1 0 -1 0
- Returns:
- this
-
mapnXnZnY
public Matrix3f mapnXnZnY(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix-1 0 0 0 0 -1 0 -1 0
and store the result indest.
-
mapnYXZ
public Matrix3f mapnYXZ()
Multiplythisby the matrix0 1 0 -1 0 0 0 0 1
- Returns:
- this
-
mapnYXZ
public Matrix3f mapnYXZ(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix0 1 0 -1 0 0 0 0 1
and store the result indest.
-
mapnYXnZ
public Matrix3f mapnYXnZ()
Multiplythisby the matrix0 1 0 -1 0 0 0 0 -1
- Returns:
- this
-
mapnYXnZ
public Matrix3f mapnYXnZ(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix0 1 0 -1 0 0 0 0 -1
and store the result indest.
-
mapnYZX
public Matrix3f mapnYZX()
Multiplythisby the matrix0 0 1 -1 0 0 0 1 0
- Returns:
- this
-
mapnYZX
public Matrix3f mapnYZX(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix0 0 1 -1 0 0 0 1 0
and store the result indest.
-
mapnYZnX
public Matrix3f mapnYZnX()
Multiplythisby the matrix0 0 -1 -1 0 0 0 1 0
- Returns:
- this
-
mapnYZnX
public Matrix3f mapnYZnX(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix0 0 -1 -1 0 0 0 1 0
and store the result indest.
-
mapnYnXZ
public Matrix3f mapnYnXZ()
Multiplythisby the matrix0 -1 0 -1 0 0 0 0 1
- Returns:
- this
-
mapnYnXZ
public Matrix3f mapnYnXZ(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix0 -1 0 -1 0 0 0 0 1
and store the result indest.
-
mapnYnXnZ
public Matrix3f mapnYnXnZ()
Multiplythisby the matrix0 -1 0 -1 0 0 0 0 -1
- Returns:
- this
-
mapnYnXnZ
public Matrix3f mapnYnXnZ(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix0 -1 0 -1 0 0 0 0 -1
and store the result indest.
-
mapnYnZX
public Matrix3f mapnYnZX()
Multiplythisby the matrix0 0 1 -1 0 0 0 -1 0
- Returns:
- this
-
mapnYnZX
public Matrix3f mapnYnZX(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix0 0 1 -1 0 0 0 -1 0
and store the result indest.
-
mapnYnZnX
public Matrix3f mapnYnZnX()
Multiplythisby the matrix0 0 -1 -1 0 0 0 -1 0
- Returns:
- this
-
mapnYnZnX
public Matrix3f mapnYnZnX(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix0 0 -1 -1 0 0 0 -1 0
and store the result indest.
-
mapnZXY
public Matrix3f mapnZXY()
Multiplythisby the matrix0 1 0 0 0 1 -1 0 0
- Returns:
- this
-
mapnZXY
public Matrix3f mapnZXY(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix0 1 0 0 0 1 -1 0 0
and store the result indest.
-
mapnZXnY
public Matrix3f mapnZXnY()
Multiplythisby the matrix0 1 0 0 0 -1 -1 0 0
- Returns:
- this
-
mapnZXnY
public Matrix3f mapnZXnY(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix0 1 0 0 0 -1 -1 0 0
and store the result indest.
-
mapnZYX
public Matrix3f mapnZYX()
Multiplythisby the matrix0 0 1 0 1 0 -1 0 0
- Returns:
- this
-
mapnZYX
public Matrix3f mapnZYX(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix0 0 1 0 1 0 -1 0 0
and store the result indest.
-
mapnZYnX
public Matrix3f mapnZYnX()
Multiplythisby the matrix0 0 -1 0 1 0 -1 0 0
- Returns:
- this
-
mapnZYnX
public Matrix3f mapnZYnX(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix0 0 -1 0 1 0 -1 0 0
and store the result indest.
-
mapnZnXY
public Matrix3f mapnZnXY()
Multiplythisby the matrix0 -1 0 0 0 1 -1 0 0
- Returns:
- this
-
mapnZnXY
public Matrix3f mapnZnXY(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix0 -1 0 0 0 1 -1 0 0
and store the result indest.
-
mapnZnXnY
public Matrix3f mapnZnXnY()
Multiplythisby the matrix0 -1 0 0 0 -1 -1 0 0
- Returns:
- this
-
mapnZnXnY
public Matrix3f mapnZnXnY(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix0 -1 0 0 0 -1 -1 0 0
and store the result indest.
-
mapnZnYX
public Matrix3f mapnZnYX()
Multiplythisby the matrix0 0 1 0 -1 0 -1 0 0
- Returns:
- this
-
mapnZnYX
public Matrix3f mapnZnYX(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix0 0 1 0 -1 0 -1 0 0
and store the result indest.
-
mapnZnYnX
public Matrix3f mapnZnYnX()
Multiplythisby the matrix0 0 -1 0 -1 0 -1 0 0
- Returns:
- this
-
mapnZnYnX
public Matrix3f mapnZnYnX(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix0 0 -1 0 -1 0 -1 0 0
and store the result indest.
-
negateX
public Matrix3f negateX()
Multiplythisby the matrix-1 0 0 0 1 0 0 0 1
- Returns:
- this
-
negateX
public Matrix3f negateX(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix-1 0 0 0 1 0 0 0 1
and store the result indest.
-
negateY
public Matrix3f negateY()
Multiplythisby the matrix1 0 0 0 -1 0 0 0 1
- Returns:
- this
-
negateY
public Matrix3f negateY(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix1 0 0 0 -1 0 0 0 1
and store the result indest.
-
negateZ
public Matrix3f negateZ()
Multiplythisby the matrix1 0 0 0 1 0 0 0 -1
- Returns:
- this
-
negateZ
public Matrix3f negateZ(Matrix3f dest)
Description copied from interface:Matrix3fcMultiplythisby the matrix1 0 0 0 1 0 0 0 -1
and store the result indest.
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException- Overrides:
clonein classjava.lang.Object- Throws:
java.lang.CloneNotSupportedException
-
-