Uses of Class
org.joml.Matrix4f
Packages that use Matrix4f
-
Uses of Matrix4f in org.joml
Modifier and TypeMethodDescriptionComponent-wise addthis
andother
.Component-wise addthis
andother
and store the result indest
.Component-wise add the upper 4x3 submatrices ofthis
andother
.Component-wise add the upper 4x3 submatrices ofthis
andother
and store the result indest
.Matrix4f.affineSpan
(Vector3f corner, Vector3f xDir, Vector3f yDir, Vector3f zDir) Compute the extents of the coordinate system before thisaffine
transformation was applied and store the resulting corner coordinates incorner
and the span vectors inxDir
,yDir
andzDir
.Matrix4f.arcball
(float radius, float centerX, float centerY, float centerZ, float angleX, float angleY) Apply an arcball view transformation to this matrix with the givenradius
and center(centerX, centerY, centerZ)
position of the arcball and the specified X and Y rotation angles.Matrix4f.arcball
(float radius, float centerX, float centerY, float centerZ, float angleX, float angleY, Matrix4f dest) Apply an arcball view transformation to this matrix with the givenradius
andcenter
position of the arcball and the specified X and Y rotation angles.Matrix4fc.arcball
(float radius, float centerX, float centerY, float centerZ, float angleX, float angleY, Matrix4f dest) Apply an arcball view transformation to this matrix with the givenradius
and center(centerX, centerY, centerZ)
position of the arcball and the specified X and Y rotation angles, and store the result indest
.Apply an arcball view transformation to this matrix with the givenradius
andcenter
position of the arcball and the specified X and Y rotation angles, and store the result indest
.Matrix4f.assume
(int properties) Assume the given properties about this matrix.Matrix4f.billboardCylindrical
(Vector3fc objPos, Vector3fc targetPos, Vector3fc up) Set this matrix to a cylindrical billboard transformation that rotates the local +Z axis of a given object with positionobjPos
towards a target position attargetPos
while constraining a cylindrical rotation around the givenup
vector.Matrix4f.billboardSpherical
(Vector3fc objPos, Vector3fc targetPos) Set this matrix to a spherical billboard transformation that rotates the local +Z axis of a given object with positionobjPos
towards a target position attargetPos
using a shortest arc rotation by not preserving any up vector of the object.Matrix4f.billboardSpherical
(Vector3fc objPos, Vector3fc targetPos, Vector3fc up) Set this matrix to a spherical billboard transformation that rotates the local +Z axis of a given object with positionobjPos
towards a target position attargetPos
.Matrix4f.cofactor3x3()
Compute the cofactor matrix of the upper left 3x3 submatrix ofthis
.Matrix4f.cofactor3x3
(Matrix4f dest) Compute the cofactor matrix of the upper left 3x3 submatrix ofthis
and store it intodest
.Matrix4fc.cofactor3x3
(Matrix4f dest) Compute the cofactor matrix of the upper left 3x3 submatrix ofthis
and store it intodest
.Matrix4f.determineProperties()
Compute and set the matrix properties returned byproperties()
based on the current matrix element values.Component-wise add the upper 4x3 submatrices ofthis
andother
by first multiplying each component ofother
's 4x3 submatrix byotherFactor
and adding that result tothis
.Component-wise add the upper 4x3 submatrices ofthis
andother
by first multiplying each component ofother
's 4x3 submatrix byotherFactor
, adding that tothis
and storing the final result indest
.Matrix4f.frustum
(float left, float right, float bottom, float top, float zNear, float zFar) Apply an arbitrary perspective projection frustum transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix.Matrix4f.frustum
(float left, float right, float bottom, float top, float zNear, float zFar, boolean zZeroToOne) Apply an arbitrary perspective projection frustum transformation for a right-handed coordinate system using the given NDC z range to this matrix.Matrix4f.frustum
(float left, float right, float bottom, float top, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply an arbitrary perspective projection frustum transformation for a right-handed coordinate system using the given NDC z range to this matrix and store the result indest
.Matrix4f.frustum
(float left, float right, float bottom, float top, float zNear, float zFar, Matrix4f dest) Apply an arbitrary perspective projection frustum transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Matrix4fc.frustum
(float left, float right, float bottom, float top, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply an arbitrary perspective projection frustum transformation for a right-handed coordinate system using the given NDC z range to this matrix and store the result indest
.Matrix4fc.frustum
(float left, float right, float bottom, float top, float zNear, float zFar, Matrix4f dest) Apply an arbitrary perspective projection frustum transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Matrix4f.frustumAabb
(Vector3f min, Vector3f max) Compute the axis-aligned bounding box of the frustum described bythis
matrix and store the minimum corner coordinates in the givenmin
and the maximum corner coordinates in the givenmax
vector.Matrix4fc.frustumAabb
(Vector3f min, Vector3f max) Compute the axis-aligned bounding box of the frustum described bythis
matrix and store the minimum corner coordinates in the givenmin
and the maximum corner coordinates in the givenmax
vector.Matrix4f.frustumLH
(float left, float right, float bottom, float top, float zNear, float zFar) Apply an arbitrary perspective projection frustum transformation for a left-handed coordinate system using the given NDC z range to this matrix.Matrix4f.frustumLH
(float left, float right, float bottom, float top, float zNear, float zFar, boolean zZeroToOne) Apply an arbitrary perspective projection frustum transformation for a left-handed coordinate system using the given NDC z range to this matrix.Matrix4f.frustumLH
(float left, float right, float bottom, float top, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply an arbitrary perspective projection frustum transformation for a left-handed coordinate system using the given NDC z range to this matrix and store the result indest
.Matrix4f.frustumLH
(float left, float right, float bottom, float top, float zNear, float zFar, Matrix4f dest) Apply an arbitrary perspective projection frustum transformation for a left-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Matrix4fc.frustumLH
(float left, float right, float bottom, float top, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply an arbitrary perspective projection frustum transformation for a left-handed coordinate system using the given NDC z range to this matrix and store the result indest
.Matrix4fc.frustumLH
(float left, float right, float bottom, float top, float zNear, float zFar, Matrix4f dest) Apply an arbitrary perspective projection frustum transformation for a left-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Set the givenMatrix4f
to a rotation transformation equivalent to thisAxisAngle4d
.Set the givenMatrix4f
to a rotation transformation equivalent to thisAxisAngle4f
.Get the current values ofthis
matrix and store them as the rotational component ofdest
.Get the current values ofthis
matrix and store them intodest
.Get the current values ofthis
matrix and store them intodest
.Get the current values ofthis
matrix and store them into the upper 4x3 submatrix ofdest
.Set the given destination matrix to the rotation represented bythis
.Set the given destination matrix to the rotation represented bythis
.Matrix4f.identity()
Reset this matrix to the identity.Matrix4f.invert()
Invert this matrix.Invert this matrix and write the result intodest
.Invert this matrix and write the result as the top 4x3 matrix intodest
and set all other values ofdest
to identity..Matrix4f.invertAffine()
Invert this matrix by assuming that it is anaffine
transformation (i.e.Matrix4f.invertAffine
(Matrix4f dest) Matrix4fc.invertAffine
(Matrix4f dest) Invert this matrix by assuming that it is anaffine
transformation (i.e.Matrix4f.invertFrustum()
Ifthis
is an arbitrary perspective projection matrix obtained via one of thefrustum()
methods or viasetFrustum()
, then this method builds the inverse ofthis
.Matrix4f.invertFrustum
(Matrix4f dest) Ifthis
is an arbitrary perspective projection matrix obtained via one of thefrustum()
methods or viasetFrustum()
, then this method builds the inverse ofthis
and stores it into the givendest
.Matrix4fc.invertFrustum
(Matrix4f dest) Ifthis
is an arbitrary perspective projection matrix obtained via one of thefrustum()
methods, then this method builds the inverse ofthis
and stores it into the givendest
.Matrix4f.invertOrtho()
Invertthis
orthographic projection matrix.Matrix4f.invertOrtho
(Matrix4f dest) Matrix4fc.invertOrtho
(Matrix4f dest) Invertthis
orthographic projection matrix and store the result into the givendest
.Matrix4f.invertPerspective()
Ifthis
is a perspective projection matrix obtained via one of theperspective()
methods or viasetPerspective()
, that is, ifthis
is a symmetrical perspective frustum transformation, then this method builds the inverse ofthis
.Matrix4f.invertPerspective
(Matrix4f dest) Ifthis
is a perspective projection matrix obtained via one of theperspective()
methods or viasetPerspective()
, that is, ifthis
is a symmetrical perspective frustum transformation, then this method builds the inverse ofthis
and stores it into the givendest
.Matrix4fc.invertPerspective
(Matrix4f dest) Ifthis
is a perspective projection matrix obtained via one of theperspective()
methods, that is, ifthis
is a symmetrical perspective frustum transformation, then this method builds the inverse ofthis
and stores it into the givendest
.Matrix4f.invertPerspectiveView
(Matrix4fc view, Matrix4f dest) Ifthis
is a perspective projection matrix obtained via one of theperspective()
methods or viasetPerspective()
, that is, ifthis
is a symmetrical perspective frustum transformation and the givenview
matrix isaffine
and has unit scaling (for example by being obtained vialookAt()
), then this method builds the inverse ofthis * view
and stores it into the givendest
.Matrix4f.invertPerspectiveView
(Matrix4x3fc view, Matrix4f dest) Ifthis
is a perspective projection matrix obtained via one of theperspective()
methods or viasetPerspective()
, that is, ifthis
is a symmetrical perspective frustum transformation and the givenview
matrix has unit scaling, then this method builds the inverse ofthis * view
and stores it into the givendest
.Matrix4fc.invertPerspectiveView
(Matrix4fc view, Matrix4f dest) Ifthis
is a perspective projection matrix obtained via one of theperspective()
methods, that is, ifthis
is a symmetrical perspective frustum transformation and the givenview
matrix isaffine
and has unit scaling (for example by being obtained vialookAt()
), then this method builds the inverse ofthis * view
and stores it into the givendest
.Matrix4fc.invertPerspectiveView
(Matrix4x3fc view, Matrix4f dest) Ifthis
is a perspective projection matrix obtained via one of theperspective()
methods, that is, ifthis
is a symmetrical perspective frustum transformation and the givenview
matrix has unit scaling, then this method builds the inverse ofthis * view
and stores it into the givendest
.Linearly interpolatethis
andother
using the given interpolation factort
and store the result inthis
.Linearly interpolatethis
andother
using the given interpolation factort
and store the result indest
.Matrix4f.lookAlong
(float dirX, float dirY, float dirZ, float upX, float upY, float upZ) Apply a rotation transformation to this matrix to make-z
point alongdir
.Matrix4f.lookAlong
(float dirX, float dirY, float dirZ, float upX, float upY, float upZ, Matrix4f dest) Apply a rotation transformation to this matrix to make-z
point alongdir
and store the result indest
.Apply a rotation transformation to this matrix to make-z
point alongdir
.Apply a rotation transformation to this matrix to make-z
point alongdir
and store the result indest
.Matrix4fc.lookAlong
(float dirX, float dirY, float dirZ, float upX, float upY, float upZ, Matrix4f dest) Apply a rotation transformation to this matrix to make-z
point alongdir
and store the result indest
.Apply a rotation transformation to this matrix to make-z
point alongdir
and store the result indest
.Matrix4f.lookAt
(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ) Apply a "lookat" transformation to this matrix for a right-handed coordinate system, that aligns-z
withcenter - eye
.Matrix4f.lookAt
(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ, Matrix4f dest) Apply a "lookat" transformation to this matrix for a right-handed coordinate system, that aligns-z
withcenter - eye
and store the result indest
.Apply a "lookat" transformation to this matrix for a right-handed coordinate system, that aligns-z
withcenter - eye
.Apply a "lookat" transformation to this matrix for a right-handed coordinate system, that aligns-z
withcenter - eye
and store the result indest
.Matrix4fc.lookAt
(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ, Matrix4f dest) Apply a "lookat" transformation to this matrix for a right-handed coordinate system, that aligns-z
withcenter - eye
and store the result indest
.Apply a "lookat" transformation to this matrix for a right-handed coordinate system, that aligns-z
withcenter - eye
and store the result indest
.Matrix4f.lookAtLH
(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ) Apply a "lookat" transformation to this matrix for a left-handed coordinate system, that aligns+z
withcenter - eye
.Matrix4f.lookAtLH
(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ, Matrix4f dest) Apply a "lookat" transformation to this matrix for a left-handed coordinate system, that aligns+z
withcenter - eye
and store the result indest
.Apply a "lookat" transformation to this matrix for a left-handed coordinate system, that aligns+z
withcenter - eye
.Apply a "lookat" transformation to this matrix for a left-handed coordinate system, that aligns+z
withcenter - eye
and store the result indest
.Matrix4fc.lookAtLH
(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ, Matrix4f dest) Apply a "lookat" transformation to this matrix for a left-handed coordinate system, that aligns+z
withcenter - eye
and store the result indest
.Apply a "lookat" transformation to this matrix for a left-handed coordinate system, that aligns+z
withcenter - eye
and store the result indest
.Matrix4f.lookAtPerspective
(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ, Matrix4f dest) Apply a "lookat" transformation to this matrix for a right-handed coordinate system, that aligns-z
withcenter - eye
and store the result indest
.Matrix4fc.lookAtPerspective
(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ, Matrix4f dest) Apply a "lookat" transformation to this matrix for a right-handed coordinate system, that aligns-z
withcenter - eye
and store the result indest
.Matrix4f.lookAtPerspectiveLH
(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ, Matrix4f dest) Apply a "lookat" transformation to this matrix for a left-handed coordinate system, that aligns+z
withcenter - eye
and store the result indest
.Matrix4fc.lookAtPerspectiveLH
(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ, Matrix4f dest) Apply a "lookat" transformation to this matrix for a left-handed coordinate system, that aligns+z
withcenter - eye
and store the result indest
.Matrix4f.m00
(float m00) Set the value of the matrix element at column 0 and row 0.Matrix4f.m01
(float m01) Set the value of the matrix element at column 0 and row 1.Matrix4f.m02
(float m02) Set the value of the matrix element at column 0 and row 2.Matrix4f.m03
(float m03) Set the value of the matrix element at column 0 and row 3.Matrix4f.m10
(float m10) Set the value of the matrix element at column 1 and row 0.Matrix4f.m11
(float m11) Set the value of the matrix element at column 1 and row 1.Matrix4f.m12
(float m12) Set the value of the matrix element at column 1 and row 2.Matrix4f.m13
(float m13) Set the value of the matrix element at column 1 and row 3.Matrix4f.m20
(float m20) Set the value of the matrix element at column 2 and row 0.Matrix4f.m21
(float m21) Set the value of the matrix element at column 2 and row 1.Matrix4f.m22
(float m22) Set the value of the matrix element at column 2 and row 2.Matrix4f.m23
(float m23) Set the value of the matrix element at column 2 and row 3.Matrix4f.m30
(float m30) Set the value of the matrix element at column 3 and row 0.Matrix4f.m31
(float m31) Set the value of the matrix element at column 3 and row 1.Matrix4f.m32
(float m32) Set the value of the matrix element at column 3 and row 2.Matrix4f.m33
(float m33) Set the value of the matrix element at column 3 and row 3.Matrix4f.mapnXnYnZ()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapnXnYZ()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapnXnZnY()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapnXnZY()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapnXYnZ()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapnXZnY()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapnXZY()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapnYnXnZ()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapnYnXZ()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapnYnZnX()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapnYnZX()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapnYXnZ()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapnYXZ()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapnYZnX()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapnYZX()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapnZnXnY()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapnZnXY()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapnZnYnX()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapnZnYX()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapnZXnY()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapnZXY()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapnZYnX()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapnZYX()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapXnYnZ()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapXnZnY()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapXnZY()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapXZnY()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapXZY()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapYnXnZ()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapYnXZ()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapYnZnX()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapYnZX()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapYXnZ()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapYXZ()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapYZnX()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapYZX()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapZnXnY()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapZnXY()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapZnYnX()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapZnYX()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapZXnY()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapZXY()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapZYnX()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mapZYX()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.mul
(float r00, float r01, float r02, float r03, float r10, float r11, float r12, float r13, float r20, float r21, float r22, float r23, float r30, float r31, float r32, float r33) Multiply this matrix by the matrix with the supplied elements.Matrix4f.mul
(float r00, float r01, float r02, float r03, float r10, float r11, float r12, float r13, float r20, float r21, float r22, float r23, float r30, float r31, float r32, float r33, Matrix4f dest) Matrix4f.mul
(Matrix3x2fc right) Multiply this matrix by the suppliedright
matrix and store the result inthis
.Matrix4f.mul
(Matrix3x2fc right, Matrix4f dest) Multiply this matrix by the suppliedright
matrix and store the result inthis
.Matrix4f.mul
(Matrix4x3fc right) Multiply this matrix by the suppliedright
matrix and store the result inthis
.Matrix4f.mul
(Matrix4x3fc right, Matrix4f dest) Matrix4fc.mul
(float r00, float r01, float r02, float r03, float r10, float r11, float r12, float r13, float r20, float r21, float r22, float r23, float r30, float r31, float r32, float r33, Matrix4f dest) Multiply this matrix by the matrix with the supplied elements and store the result indest
.Matrix4fc.mul
(Matrix3x2fc right, Matrix4f dest) Multiply this matrix by the suppliedright
matrix and store the result indest
.Multiply this matrix by the suppliedright
matrix and store the result indest
.Matrix4fc.mul
(Matrix4x3fc right, Matrix4f dest) Multiply this matrix by the suppliedright
matrix and store the result indest
.Multiply this matrix by the suppliedright
matrix.Multiply this matrix by the suppliedright
matrix and store the result indest
.Matrix4f.mul3x3
(float r00, float r01, float r02, float r10, float r11, float r12, float r20, float r21, float r22) Multiply this matrix by the 3x3 matrix with the supplied elements expanded to a 4x4 matrix with all other matrix elements set to identity.Matrix4f.mul3x3
(float r00, float r01, float r02, float r10, float r11, float r12, float r20, float r21, float r22, Matrix4f dest) Matrix4fc.mul3x3
(float r00, float r01, float r02, float r10, float r11, float r12, float r20, float r21, float r22, Matrix4f dest) Multiply this matrix by the 3x3 matrix with the supplied elements expanded to a 4x4 matrix with all other matrix elements set to identity, and store the result indest
.Matrix4f.mul4x3ComponentWise
(Matrix4fc other) Component-wise multiply the upper 4x3 submatrices ofthis
byother
.Matrix4f.mul4x3ComponentWise
(Matrix4fc other, Matrix4f dest) Matrix4fc.mul4x3ComponentWise
(Matrix4fc other, Matrix4f dest) Component-wise multiply the upper 4x3 submatrices ofthis
byother
and store the result indest
.Multiply this matrix by the suppliedright
matrix, both of which are assumed to beaffine
, and store the result inthis
.Multiply this matrix by the suppliedright
matrix, both of which are assumed to beaffine
, and store the result indest
.Matrix4f.mulAffineR
(Matrix4fc right) Multiply this matrix by the suppliedright
matrix, which is assumed to beaffine
, and store the result inthis
.Matrix4f.mulAffineR
(Matrix4fc right, Matrix4f dest) Matrix4fc.mulAffineR
(Matrix4fc right, Matrix4f dest) Multiply this matrix by the suppliedright
matrix, which is assumed to beaffine
, and store the result indest
.Matrix4f.mulComponentWise
(Matrix4fc other) Component-wise multiplythis
byother
.Matrix4f.mulComponentWise
(Matrix4fc other, Matrix4f dest) Matrix4fc.mulComponentWise
(Matrix4fc other, Matrix4f dest) Component-wise multiplythis
byother
and store the result indest
.Pre-multiply this matrix by the suppliedleft
matrix and store the result inthis
.Pre-multiply this matrix by the suppliedleft
matrix and store the result indest
.Matrix4f.mulLocalAffine
(Matrix4fc left) Pre-multiply this matrix by the suppliedleft
matrix, both of which are assumed to beaffine
, and store the result inthis
.Matrix4f.mulLocalAffine
(Matrix4fc left, Matrix4f dest) Matrix4fc.mulLocalAffine
(Matrix4fc left, Matrix4f dest) Pre-multiply this matrix by the suppliedleft
matrix, both of which are assumed to beaffine
, and store the result indest
.Matrix4f.mulOrthoAffine
(Matrix4fc view) Matrix4f.mulOrthoAffine
(Matrix4fc view, Matrix4f dest) Matrix4fc.mulOrthoAffine
(Matrix4fc view, Matrix4f dest) Multiplythis
orthographic projection matrix by the suppliedaffine
view
matrix and store the result indest
.Matrix4f.mulPerspectiveAffine
(Matrix4fc view) Matrix4f.mulPerspectiveAffine
(Matrix4fc view, Matrix4f dest) Matrix4f.mulPerspectiveAffine
(Matrix4x3fc view) Multiplythis
symmetric perspective projection matrix by the suppliedview
matrix.Matrix4f.mulPerspectiveAffine
(Matrix4x3fc view, Matrix4f dest) Matrix4fc.mulPerspectiveAffine
(Matrix4fc view, Matrix4f dest) Multiplythis
symmetric perspective projection matrix by the suppliedaffine
view
matrix and store the result indest
.Matrix4fc.mulPerspectiveAffine
(Matrix4x3fc view, Matrix4f dest) Multiplythis
symmetric perspective projection matrix by the suppliedview
matrix and store the result indest
.Matrix4f.mulTranslationAffine
(Matrix4fc right, Matrix4f dest) Matrix4fc.mulTranslationAffine
(Matrix4fc right, Matrix4f dest) Multiply this matrix, which is assumed to only contain a translation, by the suppliedright
matrix, which is assumed to beaffine
, and store the result indest
.Matrix4f.negateX()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.negateY()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.negateZ()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4f.normal()
Compute a normal matrix from the upper left 3x3 submatrix ofthis
and store it into the upper left 3x3 submatrix ofthis
.Compute a normal matrix from the upper left 3x3 submatrix ofthis
and store it into the upper left 3x3 submatrix ofdest
.Compute a normal matrix from the upper left 3x3 submatrix ofthis
and store it into the upper left 3x3 submatrix ofdest
.Matrix4f.normalize3x3()
Normalize the upper left 3x3 submatrix of this matrix.Matrix4f.normalize3x3
(Matrix4f dest) Matrix4fc.normalize3x3
(Matrix4f dest) Normalize the upper left 3x3 submatrix of this matrix and store the result indest
.Matrix4f.obliqueZ
(float a, float b) Apply an oblique projection transformation to this matrix with the given values fora
andb
.Apply an oblique projection transformation to this matrix with the given values fora
andb
and store the result indest
.Apply an oblique projection transformation to this matrix with the given values fora
andb
and store the result indest
.Matrix4f.ortho
(float left, float right, float bottom, float top, float zNear, float zFar) Apply an orthographic projection transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix.Matrix4f.ortho
(float left, float right, float bottom, float top, float zNear, float zFar, boolean zZeroToOne) Apply an orthographic projection transformation for a right-handed coordinate system using the given NDC z range to this matrix.Matrix4f.ortho
(float left, float right, float bottom, float top, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply an orthographic projection transformation for a right-handed coordinate system using the given NDC z range to this matrix and store the result indest
.Matrix4f.ortho
(float left, float right, float bottom, float top, float zNear, float zFar, Matrix4f dest) Apply an orthographic projection transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Matrix4fc.ortho
(float left, float right, float bottom, float top, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply an orthographic projection transformation for a right-handed coordinate system using the given NDC z range to this matrix and store the result indest
.Matrix4fc.ortho
(float left, float right, float bottom, float top, float zNear, float zFar, Matrix4f dest) Apply an orthographic projection transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Matrix4f.ortho2D
(float left, float right, float bottom, float top) Apply an orthographic projection transformation for a right-handed coordinate system to this matrix.Apply an orthographic projection transformation for a right-handed coordinate system to this matrix and store the result indest
.Apply an orthographic projection transformation for a right-handed coordinate system to this matrix and store the result indest
.Matrix4f.ortho2DLH
(float left, float right, float bottom, float top) Apply an orthographic projection transformation for a left-handed coordinate system to this matrix.Apply an orthographic projection transformation for a left-handed coordinate system to this matrix and store the result indest
.Apply an orthographic projection transformation for a left-handed coordinate system to this matrix and store the result indest
.Build an ortographic projection transformation that fits the view-projection transformation represented bythis
into the given affineview
transformation.Build an ortographic projection transformation that fits the view-projection transformation represented bythis
into the given affineview
transformation.Matrix4f.orthoLH
(float left, float right, float bottom, float top, float zNear, float zFar) Apply an orthographic projection transformation for a left-handed coordiante system using OpenGL's NDC z range of[-1..+1]
to this matrix.Matrix4f.orthoLH
(float left, float right, float bottom, float top, float zNear, float zFar, boolean zZeroToOne) Apply an orthographic projection transformation for a left-handed coordiante system using the given NDC z range to this matrix.Matrix4f.orthoLH
(float left, float right, float bottom, float top, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply an orthographic projection transformation for a left-handed coordiante system using the given NDC z range to this matrix and store the result indest
.Matrix4f.orthoLH
(float left, float right, float bottom, float top, float zNear, float zFar, Matrix4f dest) Apply an orthographic projection transformation for a left-handed coordiante system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Matrix4fc.orthoLH
(float left, float right, float bottom, float top, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply an orthographic projection transformation for a left-handed coordiante system using the given NDC z range to this matrix and store the result indest
.Matrix4fc.orthoLH
(float left, float right, float bottom, float top, float zNear, float zFar, Matrix4f dest) Apply an orthographic projection transformation for a left-handed coordiante system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Matrix4f.orthoSymmetric
(float width, float height, float zNear, float zFar) Apply a symmetric orthographic projection transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix.Matrix4f.orthoSymmetric
(float width, float height, float zNear, float zFar, boolean zZeroToOne) Apply a symmetric orthographic projection transformation for a right-handed coordinate system using the given NDC z range to this matrix.Matrix4f.orthoSymmetric
(float width, float height, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply a symmetric orthographic projection transformation for a right-handed coordinate system using the given NDC z range to this matrix and store the result indest
.Matrix4f.orthoSymmetric
(float width, float height, float zNear, float zFar, Matrix4f dest) Apply a symmetric orthographic projection transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Matrix4fc.orthoSymmetric
(float width, float height, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply a symmetric orthographic projection transformation for a right-handed coordinate system using the given NDC z range to this matrix and store the result indest
.Matrix4fc.orthoSymmetric
(float width, float height, float zNear, float zFar, Matrix4f dest) Apply a symmetric orthographic projection transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Matrix4f.orthoSymmetricLH
(float width, float height, float zNear, float zFar) Apply a symmetric orthographic projection transformation for a left-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix.Matrix4f.orthoSymmetricLH
(float width, float height, float zNear, float zFar, boolean zZeroToOne) Apply a symmetric orthographic projection transformation for a left-handed coordinate system using the given NDC z range to this matrix.Matrix4f.orthoSymmetricLH
(float width, float height, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply a symmetric orthographic projection transformation for a left-handed coordinate system using the given NDC z range to this matrix and store the result indest
.Matrix4f.orthoSymmetricLH
(float width, float height, float zNear, float zFar, Matrix4f dest) Apply a symmetric orthographic projection transformation for a left-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Matrix4fc.orthoSymmetricLH
(float width, float height, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply a symmetric orthographic projection transformation for a left-handed coordinate system using the given NDC z range to this matrix and store the result indest
.Matrix4fc.orthoSymmetricLH
(float width, float height, float zNear, float zFar, Matrix4f dest) Apply a symmetric orthographic projection transformation for a left-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Matrix4f.perspective
(float fovy, float aspect, float zNear, float zFar) Apply a symmetric perspective projection frustum transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix.Matrix4f.perspective
(float fovy, float aspect, float zNear, float zFar, boolean zZeroToOne) Apply a symmetric perspective projection frustum transformation using for a right-handed coordinate system using the given NDC z range to this matrix.Matrix4f.perspective
(float fovy, float aspect, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply a symmetric perspective projection frustum transformation for a right-handed coordinate system using the given NDC z range to this matrix and store the result indest
.Matrix4f.perspective
(float fovy, float aspect, float zNear, float zFar, Matrix4f dest) Apply a symmetric perspective projection frustum transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Matrix4fc.perspective
(float fovy, float aspect, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply a symmetric perspective projection frustum transformation for a right-handed coordinate system using the given NDC z range to this matrix and store the result indest
.Matrix4fc.perspective
(float fovy, float aspect, float zNear, float zFar, Matrix4f dest) Apply a symmetric perspective projection frustum transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Matrix4f.perspectiveFrustumSlice
(float near, float far, Matrix4f dest) Change the near and far clip plane distances ofthis
perspective frustum transformation matrix and store the result indest
.Matrix4fc.perspectiveFrustumSlice
(float near, float far, Matrix4f dest) Change the near and far clip plane distances ofthis
perspective frustum transformation matrix and store the result indest
.Matrix4f.perspectiveLH
(float fovy, float aspect, float zNear, float zFar) Apply a symmetric perspective projection frustum transformation for a left-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix.Matrix4f.perspectiveLH
(float fovy, float aspect, float zNear, float zFar, boolean zZeroToOne) Apply a symmetric perspective projection frustum transformation for a left-handed coordinate system using the given NDC z range to this matrix.Matrix4f.perspectiveLH
(float fovy, float aspect, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply a symmetric perspective projection frustum transformation for a left-handed coordinate system using the given NDC z range to this matrix and store the result indest
.Matrix4f.perspectiveLH
(float fovy, float aspect, float zNear, float zFar, Matrix4f dest) Apply a symmetric perspective projection frustum transformation for a left-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Matrix4fc.perspectiveLH
(float fovy, float aspect, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply a symmetric perspective projection frustum transformation for a left-handed coordinate system using the given NDC z range to this matrix and store the result indest
.Matrix4fc.perspectiveLH
(float fovy, float aspect, float zNear, float zFar, Matrix4f dest) Apply a symmetric perspective projection frustum transformation for a left-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Matrix4f.perspectiveOffCenter
(float fovy, float offAngleX, float offAngleY, float aspect, float zNear, float zFar) Apply an asymmetric off-center perspective projection frustum transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix.Matrix4f.perspectiveOffCenter
(float fovy, float offAngleX, float offAngleY, float aspect, float zNear, float zFar, boolean zZeroToOne) Apply an asymmetric off-center perspective projection frustum transformation using for a right-handed coordinate system using the given NDC z range to this matrix.Matrix4f.perspectiveOffCenter
(float fovy, float offAngleX, float offAngleY, float aspect, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply an asymmetric off-center perspective projection frustum transformation for a right-handed coordinate system using the given NDC z range to this matrix and store the result indest
.Matrix4f.perspectiveOffCenter
(float fovy, float offAngleX, float offAngleY, float aspect, float zNear, float zFar, Matrix4f dest) Apply an asymmetric off-center perspective projection frustum transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Matrix4fc.perspectiveOffCenter
(float fovy, float offAngleX, float offAngleY, float aspect, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply an asymmetric off-center perspective projection frustum transformation for a right-handed coordinate system using the given NDC z range to this matrix and store the result indest
.Matrix4fc.perspectiveOffCenter
(float fovy, float offAngleX, float offAngleY, float aspect, float zNear, float zFar, Matrix4f dest) Apply an asymmetric off-center perspective projection frustum transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Matrix4f.perspectiveOffCenterFov
(float angleLeft, float angleRight, float angleDown, float angleUp, float zNear, float zFar) Apply an asymmetric off-center perspective projection frustum transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix.Matrix4f.perspectiveOffCenterFov
(float angleLeft, float angleRight, float angleDown, float angleUp, float zNear, float zFar, boolean zZeroToOne) Apply an asymmetric off-center perspective projection frustum transformation for a right-handed coordinate system using the given NDC z range to this matrix.Matrix4f.perspectiveOffCenterFov
(float angleLeft, float angleRight, float angleDown, float angleUp, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Matrix4f.perspectiveOffCenterFov
(float angleLeft, float angleRight, float angleDown, float angleUp, float zNear, float zFar, Matrix4f dest) Matrix4fc.perspectiveOffCenterFov
(float angleLeft, float angleRight, float angleDown, float angleUp, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply an asymmetric off-center perspective projection frustum transformation for a right-handed coordinate system using the given NDC z range to this matrix and store the result indest
.Matrix4fc.perspectiveOffCenterFov
(float angleLeft, float angleRight, float angleDown, float angleUp, float zNear, float zFar, Matrix4f dest) Apply an asymmetric off-center perspective projection frustum transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Matrix4f.perspectiveOffCenterFovLH
(float angleLeft, float angleRight, float angleDown, float angleUp, float zNear, float zFar) Apply an asymmetric off-center perspective projection frustum transformation for a left-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix.Matrix4f.perspectiveOffCenterFovLH
(float angleLeft, float angleRight, float angleDown, float angleUp, float zNear, float zFar, boolean zZeroToOne) Apply an asymmetric off-center perspective projection frustum transformation for a left-handed coordinate system using the given NDC z range to this matrix.Matrix4f.perspectiveOffCenterFovLH
(float angleLeft, float angleRight, float angleDown, float angleUp, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Matrix4f.perspectiveOffCenterFovLH
(float angleLeft, float angleRight, float angleDown, float angleUp, float zNear, float zFar, Matrix4f dest) Matrix4fc.perspectiveOffCenterFovLH
(float angleLeft, float angleRight, float angleDown, float angleUp, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply an asymmetric off-center perspective projection frustum transformation for a left-handed coordinate system using the given NDC z range to this matrix and store the result indest
.Matrix4fc.perspectiveOffCenterFovLH
(float angleLeft, float angleRight, float angleDown, float angleUp, float zNear, float zFar, Matrix4f dest) Apply an asymmetric off-center perspective projection frustum transformation for a left-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Matrix4f.perspectiveRect
(float width, float height, float zNear, float zFar) Apply a symmetric perspective projection frustum transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix.Matrix4f.perspectiveRect
(float width, float height, float zNear, float zFar, boolean zZeroToOne) Apply a symmetric perspective projection frustum transformation using for a right-handed coordinate system using the given NDC z range to this matrix.Matrix4f.perspectiveRect
(float width, float height, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply a symmetric perspective projection frustum transformation for a right-handed coordinate system using the given NDC z range to this matrix and store the result indest
.Matrix4f.perspectiveRect
(float width, float height, float zNear, float zFar, Matrix4f dest) Apply a symmetric perspective projection frustum transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Matrix4fc.perspectiveRect
(float width, float height, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply a symmetric perspective projection frustum transformation for a right-handed coordinate system using the given NDC z range to this matrix and store the result indest
.Matrix4fc.perspectiveRect
(float width, float height, float zNear, float zFar, Matrix4f dest) Apply a symmetric perspective projection frustum transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Matrix4f.pick
(float x, float y, float width, float height, int[] viewport) Apply a picking transformation to this matrix using the given window coordinates(x, y)
as the pick center and the given(width, height)
as the size of the picking region in window coordinates.Apply a picking transformation to this matrix using the given window coordinates(x, y)
as the pick center and the given(width, height)
as the size of the picking region in window coordinates, and store the result indest
.Matrix4f.projectedGridRange
(Matrix4fc projector, float sLower, float sUpper, Matrix4f dest) Matrix4fc.projectedGridRange
(Matrix4fc projector, float sLower, float sUpper, Matrix4f dest) Compute the range matrix for the Projected Grid transformation as described in chapter "2.4.2 Creating the range conversion matrix" of the paper Real-time water rendering - Introducing the projected grid concept based on the inverse of the view-projection matrix which is assumed to bethis
, and store that range matrix intodest
.Matrix4f.reflect
(float a, float b, float c, float d) Apply a mirror/reflection transformation to this matrix that reflects about the given plane specified via the equationx*a + y*b + z*c + d = 0
.Matrix4f.reflect
(float nx, float ny, float nz, float px, float py, float pz) Apply a mirror/reflection transformation to this matrix that reflects about the given plane specified via the plane normal and a point on the plane.Matrix4f.reflect
(Quaternionfc orientation, Vector3fc point) Apply a mirror/reflection transformation to this matrix that reflects about a plane specified via the plane orientation and a point on the plane.Matrix4f.reflect
(Quaternionfc orientation, Vector3fc point, Matrix4f dest) Apply a mirror/reflection transformation to this matrix that reflects about the given plane specified via the plane normal and a point on the plane.Apply a mirror/reflection transformation to this matrix that reflects about the given plane specified via the plane normal and a point on the plane, and store the result indest
.Apply a mirror/reflection transformation to this matrix that reflects about the given plane specified via the equationx*a + y*b + z*c + d = 0
and store the result indest
.Matrix4fc.reflect
(Quaternionfc orientation, Vector3fc point, Matrix4f dest) Apply a mirror/reflection transformation to this matrix that reflects about a plane specified via the plane orientation and a point on the plane, and store the result indest
.Apply a mirror/reflection transformation to this matrix that reflects about the given plane specified via the plane normal and a point on the plane, and store the result indest
.Matrix4f.reflection
(float a, float b, float c, float d) Set this matrix to a mirror/reflection transformation that reflects about the given plane specified via the equationx*a + y*b + z*c + d = 0
.Matrix4f.reflection
(float nx, float ny, float nz, float px, float py, float pz) Set this matrix to a mirror/reflection transformation that reflects about the given plane specified via the plane normal and a point on the plane.Matrix4f.reflection
(Quaternionfc orientation, Vector3fc point) Set this matrix to a mirror/reflection transformation that reflects about a plane specified via the plane orientation and a point on the plane.Matrix4f.reflection
(Vector3fc normal, Vector3fc point) Set this matrix to a mirror/reflection transformation that reflects about the given plane specified via the plane normal and a point on the plane.Matrix4f.rotate
(float ang, float x, float y, float z) Apply rotation to this matrix by rotating the given amount of radians about the specified(x, y, z)
axis.Apply rotation to this matrix by rotating the given amount of radians about the specified(x, y, z)
axis and store the result indest
.Apply a rotation transformation, rotating the given radians about the specified axis, to this matrix.Apply a rotation transformation, rotating the given radians about the specified axis and store the result indest
.Matrix4f.rotate
(AxisAngle4f axisAngle) Apply a rotation transformation, rotating about the givenAxisAngle4f
, to this matrix.Matrix4f.rotate
(AxisAngle4f axisAngle, Matrix4f dest) Apply a rotation transformation, rotating about the givenAxisAngle4f
and store the result indest
.Matrix4f.rotate
(Quaternionfc quat) Apply the rotation transformation of the givenQuaternionfc
to this matrix.Matrix4f.rotate
(Quaternionfc quat, Matrix4f dest) Apply the rotation transformation of the givenQuaternionfc
to this matrix and store the result indest
.Apply rotation to this matrix by rotating the given amount of radians about the specified(x, y, z)
axis and store the result indest
.Apply a rotation transformation, rotating the given radians about the specified axis and store the result indest
.Matrix4fc.rotate
(AxisAngle4f axisAngle, Matrix4f dest) Apply a rotation transformation, rotating about the givenAxisAngle4f
and store the result indest
.Matrix4fc.rotate
(Quaternionfc quat, Matrix4f dest) Apply the rotation - and possibly scaling - transformation of the givenQuaternionfc
to this matrix and store the result indest
.Matrix4f.rotateAffine
(float ang, float x, float y, float z) Apply rotation to thisaffine
matrix by rotating the given amount of radians about the specified(x, y, z)
axis.Matrix4f.rotateAffine
(float ang, float x, float y, float z, Matrix4f dest) Apply rotation to thisaffine
matrix by rotating the given amount of radians about the specified(x, y, z)
axis and store the result indest
.Matrix4f.rotateAffine
(Quaternionfc quat) Apply the rotation transformation of the givenQuaternionfc
to this matrix.Matrix4f.rotateAffine
(Quaternionfc quat, Matrix4f dest) Apply the rotation transformation of the givenQuaternionfc
to thisaffine
matrix and store the result indest
.Matrix4fc.rotateAffine
(float ang, float x, float y, float z, Matrix4f dest) Apply rotation to thisaffine
matrix by rotating the given amount of radians about the specified(x, y, z)
axis and store the result indest
.Matrix4fc.rotateAffine
(Quaternionfc quat, Matrix4f dest) Apply the rotation - and possibly scaling - transformation of the givenQuaternionfc
to thisaffine
matrix and store the result indest
.Matrix4f.rotateAffineXYZ
(float angleX, float angleY, float angleZ) Apply rotation ofangleX
radians about the X axis, followed by a rotation ofangleY
radians about the Y axis and followed by a rotation ofangleZ
radians about the Z axis.Matrix4f.rotateAffineXYZ
(float angleX, float angleY, float angleZ, Matrix4f dest) Matrix4fc.rotateAffineXYZ
(float angleX, float angleY, float angleZ, Matrix4f dest) Apply rotation ofangleX
radians about the X axis, followed by a rotation ofangleY
radians about the Y axis and followed by a rotation ofangleZ
radians about the Z axis and store the result indest
.Matrix4f.rotateAffineYXZ
(float angleY, float angleX, float angleZ) Apply rotation ofangleY
radians about the Y axis, followed by a rotation ofangleX
radians about the X axis and followed by a rotation ofangleZ
radians about the Z axis.Matrix4f.rotateAffineYXZ
(float angleY, float angleX, float angleZ, Matrix4f dest) Matrix4fc.rotateAffineYXZ
(float angleY, float angleX, float angleZ, Matrix4f dest) Apply rotation ofangleY
radians about the Y axis, followed by a rotation ofangleX
radians about the X axis and followed by a rotation ofangleZ
radians about the Z axis and store the result indest
.Matrix4f.rotateAffineZYX
(float angleZ, float angleY, float angleX) Apply rotation ofangleZ
radians about the Z axis, followed by a rotation ofangleY
radians about the Y axis and followed by a rotation ofangleX
radians about the X axis.Matrix4f.rotateAffineZYX
(float angleZ, float angleY, float angleX, Matrix4f dest) Matrix4fc.rotateAffineZYX
(float angleZ, float angleY, float angleX, Matrix4f dest) Apply rotation ofangleZ
radians about the Z axis, followed by a rotation ofangleY
radians about the Y axis and followed by a rotation ofangleX
radians about the X axis and store the result indest
.Matrix4f.rotateAround
(Quaternionfc quat, float ox, float oy, float oz) Apply the rotation transformation of the givenQuaternionfc
to this matrix while using(ox, oy, oz)
as the rotation origin.Matrix4f.rotateAround
(Quaternionfc quat, float ox, float oy, float oz, Matrix4f dest) Matrix4fc.rotateAround
(Quaternionfc quat, float ox, float oy, float oz, Matrix4f dest) Apply the rotation - and possibly scaling - transformation of the givenQuaternionfc
to this matrix while using(ox, oy, oz)
as the rotation origin, and store the result indest
.Matrix4f.rotateAroundAffine
(Quaternionfc quat, float ox, float oy, float oz, Matrix4f dest) Matrix4fc.rotateAroundAffine
(Quaternionfc quat, float ox, float oy, float oz, Matrix4f dest) Apply the rotation - and possibly scaling - transformation of the givenQuaternionfc
to thisaffine
matrix while using(ox, oy, oz)
as the rotation origin, and store the result indest
.Matrix4f.rotateAroundLocal
(Quaternionfc quat, float ox, float oy, float oz) Pre-multiply the rotation transformation of the givenQuaternionfc
to this matrix while using(ox, oy, oz)
as the rotation origin.Matrix4f.rotateAroundLocal
(Quaternionfc quat, float ox, float oy, float oz, Matrix4f dest) Matrix4fc.rotateAroundLocal
(Quaternionfc quat, float ox, float oy, float oz, Matrix4f dest) Pre-multiply the rotation - and possibly scaling - transformation of the givenQuaternionfc
to this matrix while using(ox, oy, oz)
as the rotation origin, and store the result indest
.Matrix4f.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.Matrix4f.rotateLocal
(float ang, float x, float y, float z, Matrix4f 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
.Matrix4f.rotateLocal
(Quaternionfc quat) Pre-multiply the rotation transformation of the givenQuaternionfc
to this matrix.Matrix4f.rotateLocal
(Quaternionfc quat, Matrix4f dest) Pre-multiply the rotation transformation of the givenQuaternionfc
to this matrix and store the result indest
.Matrix4fc.rotateLocal
(float ang, float x, float y, float z, Matrix4f 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
.Matrix4fc.rotateLocal
(Quaternionfc quat, Matrix4f dest) Pre-multiply the rotation - and possibly scaling - transformation of the givenQuaternionfc
to this matrix and store the result indest
.Matrix4f.rotateLocalX
(float ang) Pre-multiply a rotation to this matrix by rotating the given amount of radians about the X axis.Matrix4f.rotateLocalX
(float ang, Matrix4f 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
.Matrix4fc.rotateLocalX
(float ang, Matrix4f 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
.Matrix4f.rotateLocalY
(float ang) Pre-multiply a rotation to this matrix by rotating the given amount of radians about the Y axis.Matrix4f.rotateLocalY
(float ang, Matrix4f 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
.Matrix4fc.rotateLocalY
(float ang, Matrix4f 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
.Matrix4f.rotateLocalZ
(float ang) Pre-multiply a rotation to this matrix by rotating the given amount of radians about the Z axis.Matrix4f.rotateLocalZ
(float ang, Matrix4f 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
.Matrix4fc.rotateLocalZ
(float ang, Matrix4f 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
.Matrix4f.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+Z
axis with(dirX, dirY, dirZ)
.Matrix4f.rotateTowards
(float dirX, float dirY, float dirZ, float upX, float upY, float upZ, Matrix4f dest) Apply a model transformation to this matrix for a right-handed coordinate system, that aligns the local+Z
axis with(dirX, dirY, dirZ)
and store the result indest
.Matrix4f.rotateTowards
(Vector3fc dir, Vector3fc up) Apply a model transformation to this matrix for a right-handed coordinate system, that aligns the local+Z
axis withdir
.Matrix4f.rotateTowards
(Vector3fc dir, Vector3fc up, Matrix4f dest) Apply a model transformation to this matrix for a right-handed coordinate system, that aligns the local+Z
axis withdir
and store the result indest
.Matrix4fc.rotateTowards
(float dirX, float dirY, float dirZ, float upX, float upY, float upZ, Matrix4f dest) Apply a model transformation to this matrix for a right-handed coordinate system, that aligns the local+Z
axis with(dirX, dirY, dirZ)
and store the result indest
.Matrix4fc.rotateTowards
(Vector3fc dir, Vector3fc up, Matrix4f dest) Apply a model transformation to this matrix for a right-handed coordinate system, that aligns the local+Z
axis withdir
and store the result indest
.Matrix4f.rotateTowardsXY
(float dirX, float dirY) Apply rotation about the Z axis to align the local+X
towards(dirX, dirY)
.Matrix4f.rotateTowardsXY
(float dirX, float dirY, Matrix4f dest) Matrix4fc.rotateTowardsXY
(float dirX, float dirY, Matrix4f dest) Apply rotation about the Z axis to align the local+X
towards(dirX, dirY)
and store the result indest
.Matrix4f.rotateTranslation
(float ang, float x, float y, float z, Matrix4f dest) Apply rotation to this matrix, which is assumed to only contain a translation, by rotating the given amount of radians about the specified(x, y, z)
axis and store the result indest
.Matrix4f.rotateTranslation
(Quaternionfc quat, Matrix4f dest) Apply the rotation transformation of the givenQuaternionfc
to this matrix, which is assumed to only contain a translation, and store the result indest
.Matrix4fc.rotateTranslation
(float ang, float x, float y, float z, Matrix4f dest) Apply rotation to this matrix, which is assumed to only contain a translation, by rotating the given amount of radians about the specified(x, y, z)
axis and store the result indest
.Matrix4fc.rotateTranslation
(Quaternionfc quat, Matrix4f dest) Apply the rotation - and possibly scaling - ransformation of the givenQuaternionfc
to this matrix, which is assumed to only contain a translation, and store the result indest
.Matrix4f.rotateX
(float ang) Apply rotation about the X axis to this matrix by rotating the given amount of radians.Apply rotation about the X axis to this matrix by rotating the given amount of radians and store the result indest
.Matrix4f.rotateXYZ
(float angleX, float angleY, float angleZ) Apply rotation ofangleX
radians about the X axis, followed by a rotation ofangleY
radians about the Y axis and followed by a rotation ofangleZ
radians about the Z axis.Apply rotation ofangles.x
radians about the X axis, followed by a rotation ofangles.y
radians about the Y axis and followed by a rotation ofangles.z
radians about the Z axis.Apply rotation ofangleX
radians about the X axis, followed by a rotation ofangleY
radians about the Y axis and followed by a rotation ofangleZ
radians about the Z axis and store the result indest
.Matrix4f.rotateY
(float ang) Apply rotation about the Y axis to this matrix by rotating the given amount of radians.Apply rotation about the Y axis to this matrix by rotating the given amount of radians and store the result indest
.Matrix4f.rotateYXZ
(float angleY, float angleX, float angleZ) Apply rotation ofangleY
radians about the Y axis, followed by a rotation ofangleX
radians about the X axis and followed by a rotation ofangleZ
radians about the Z axis.Apply rotation ofangles.y
radians about the Y axis, followed by a rotation ofangles.x
radians about the X axis and followed by a rotation ofangles.z
radians about the Z axis.Apply rotation ofangleY
radians about the Y axis, followed by a rotation ofangleX
radians about the X axis and followed by a rotation ofangleZ
radians about the Z axis and store the result indest
.Matrix4f.rotateZ
(float ang) Apply rotation about the Z axis to this matrix by rotating the given amount of radians.Apply rotation about the Z axis to this matrix by rotating the given amount of radians and store the result indest
.Matrix4f.rotateZYX
(float angleZ, float angleY, float angleX) Apply rotation ofangleZ
radians about the Z axis, followed by a rotation ofangleY
radians about the Y axis and followed by a rotation ofangleX
radians about the X axis.Apply rotation ofangles.z
radians about the Z axis, followed by a rotation ofangles.y
radians about the Y axis and followed by a rotation ofangles.x
radians about the X axis.Apply rotation ofangleZ
radians about the Z axis, followed by a rotation ofangleY
radians about the Y axis and followed by a rotation ofangleX
radians about the X axis and store the result indest
.Matrix4f.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.Set this matrix to a rotation matrix which rotates the given radians about a given axis.Matrix4f.rotation
(AxisAngle4f axisAngle) Set this matrix to a rotation transformation using the givenAxisAngle4f
.Matrix4f.rotation
(Quaternionfc quat) Set this matrix to the rotation transformation of the givenQuaternionfc
.Matrix4f.rotationAround
(Quaternionfc quat, float ox, float oy, float oz) Set this matrix to a transformation composed of a rotation of the specifiedQuaternionfc
while using(ox, oy, oz)
as the rotation origin.Matrix4f.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-z
axis with(dirX, dirY, dirZ)
.Matrix4f.rotationTowards
(Vector3fc dir, Vector3fc up) Set this matrix to a model transformation for a right-handed coordinate system, that aligns the local-z
axis withdir
.Matrix4f.rotationTowardsXY
(float dirX, float dirY) Set this matrix to a rotation transformation about the Z axis to align the local+X
towards(dirX, dirY)
.Matrix4f.rotationX
(float ang) Set this matrix to a rotation transformation about the X axis.Matrix4f.rotationXYZ
(float angleX, float angleY, float angleZ) Set this matrix to a rotation ofangleX
radians about the X axis, followed by a rotation ofangleY
radians about the Y axis and followed by a rotation ofangleZ
radians about the Z axis.Matrix4f.rotationY
(float ang) Set this matrix to a rotation transformation about the Y axis.Matrix4f.rotationYXZ
(float angleY, float angleX, float angleZ) Set this matrix to a rotation ofangleY
radians about the Y axis, followed by a rotation ofangleX
radians about the X axis and followed by a rotation ofangleZ
radians about the Z axis.Matrix4f.rotationZ
(float ang) Set this matrix to a rotation transformation about the Z axis.Matrix4f.rotationZYX
(float angleZ, float angleY, float angleX) Set this matrix to a rotation ofangleZ
radians about the Z axis, followed by a rotation ofangleY
radians about the Y axis and followed by a rotation ofangleX
radians about the X axis.Matrix4f.scale
(float xyz) Apply scaling to this matrix by uniformly scaling all base axes by the givenxyz
factor.Matrix4f.scale
(float x, float y, float z) Apply scaling to this matrix by scaling the base axes by the given sx, sy and sz factors.Apply scaling to this matrix by scaling the base axes by the givenxyz.x
,xyz.y
andxyz.z
factors, respectively.Apply scaling tothis
matrix by scaling the base axes by the given x, y and z factors and store the result indest
.Apply scaling to this matrix by uniformly scaling all base axes by the givenxyz
factor and store the result indest
.Apply scaling tothis
matrix by scaling the base axes by the givenxyz.x
,xyz.y
andxyz.z
factors, respectively and store the result indest
.Matrix4f.scaleAround
(float factor, float ox, float oy, float oz) Apply scaling to this matrix by scaling all three base axes by the givenfactor
while using(ox, oy, oz)
as the scaling origin.Matrix4f.scaleAround
(float sx, float sy, float sz, float ox, float oy, float oz) Apply scaling to this matrix by scaling the base axes by the given sx, sy and sz factors while using(ox, oy, oz)
as the scaling origin.Matrix4f.scaleAround
(float sx, float sy, float sz, float ox, float oy, float oz, Matrix4f dest) Matrix4f.scaleAround
(float factor, float ox, float oy, float oz, Matrix4f dest) Matrix4fc.scaleAround
(float sx, float sy, float sz, float ox, float oy, float oz, Matrix4f dest) Apply scaling tothis
matrix by scaling the base axes by the given sx, sy and sz factors while using(ox, oy, oz)
as the scaling origin, and store the result indest
.Matrix4fc.scaleAround
(float factor, float ox, float oy, float oz, Matrix4f dest) Apply scaling to this matrix by scaling all three base axes by the givenfactor
while using(ox, oy, oz)
as the scaling origin, and store the result indest
.Matrix4f.scaleAroundLocal
(float factor, float ox, float oy, float oz) Pre-multiply scaling to this matrix by scaling all three base axes by the givenfactor
while using(ox, oy, oz)
as the scaling origin.Matrix4f.scaleAroundLocal
(float sx, float sy, float sz, float ox, float oy, float oz) Pre-multiply scaling to this matrix by scaling the base axes by the given sx, sy and sz factors while using(ox, oy, oz)
as the scaling origin.Matrix4f.scaleAroundLocal
(float sx, float sy, float sz, float ox, float oy, float oz, Matrix4f dest) Matrix4f.scaleAroundLocal
(float factor, float ox, float oy, float oz, Matrix4f dest) Matrix4fc.scaleAroundLocal
(float sx, float sy, float sz, float ox, float oy, float oz, Matrix4f dest) Pre-multiply scaling tothis
matrix by scaling the base axes by the given sx, sy and sz factors while using the given(ox, oy, oz)
as the scaling origin, and store the result indest
.Matrix4fc.scaleAroundLocal
(float factor, float ox, float oy, float oz, Matrix4f dest) Pre-multiply scaling to this matrix by scaling all three base axes by the givenfactor
while using(ox, oy, oz)
as the scaling origin, and store the result indest
.Matrix4f.scaleLocal
(float xyz) Pre-multiply scaling to this matrix by scaling the base axes by the given xyz factor.Matrix4f.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.Matrix4f.scaleLocal
(float x, float y, float z, Matrix4f dest) Matrix4f.scaleLocal
(float xyz, Matrix4f dest) Matrix4fc.scaleLocal
(float x, float y, float z, Matrix4f dest) Pre-multiply scaling tothis
matrix by scaling the base axes by the given x, y and z factors and store the result indest
.Matrix4fc.scaleLocal
(float xyz, Matrix4f dest) Pre-multiply scaling tothis
matrix by scaling all base axes by the givenxyz
factor, and store the result indest
.Matrix4f.scaleXY
(float x, float y) Apply scaling to this matrix by scaling the X axis byx
and the Y axis byy
.Apply scaling to this matrix by by scaling the X axis byx
and the Y axis byy
and store the result indest
.Matrix4f.scaling
(float factor) Set this matrix to be a simple scale matrix, which scales all axes uniformly by the given factor.Matrix4f.scaling
(float x, float y, float z) Set this matrix to be a simple scale matrix.Set this matrix to be a simple scale matrix which scales the base axes byxyz.x
,xyz.y
andxyz.z
respectively.Matrix4f.set
(float[] m) Set the values in the matrix using a float array that contains the matrix elements in column-major order.Matrix4f.set
(float[] m, int off) Set the values in the matrix using a float array that contains the matrix elements in column-major order.Matrix4f.set
(float m00, float m01, float m02, float m03, float m10, float m11, float m12, float m13, float m20, float m21, float m22, float m23, float m30, float m31, float m32, float m33) Set the values within this matrix to the supplied float values.Matrix4f.set
(int column, int row, float value) Set the matrix element at the given column and row to the specified value.Matrix4f.set
(int index, ByteBuffer buffer) Set the values of this matrix by reading 16 float values from the givenByteBuffer
in column-major order, starting at the specified absolute buffer position/index.Matrix4f.set
(int index, FloatBuffer buffer) Set the values of this matrix by reading 16 float values from the givenFloatBuffer
in column-major order, starting at the specified absolute buffer position/index.Matrix4f.set
(ByteBuffer buffer) Set the values of this matrix by reading 16 float values from the givenByteBuffer
in column-major order, starting at its current position.Matrix4f.set
(FloatBuffer buffer) Set the values of this matrix by reading 16 float values from the givenFloatBuffer
in column-major order, starting at its current position.Matrix4f.set
(AxisAngle4d axisAngle) Set this matrix to be equivalent to the rotation specified by the givenAxisAngle4d
.Matrix4f.set
(AxisAngle4f axisAngle) Set this matrix to be equivalent to the rotation specified by the givenAxisAngle4f
.Store the values of the given matrixm
intothis
matrix.Store the values of the given matrixm
intothis
matrix.Matrix4f.set
(Matrix4x3fc m) Store the values of the given matrixm
intothis
matrix and set the other matrix elements to identity.Matrix4f.set
(Quaterniondc q) Set this matrix to be equivalent to the rotation specified by the givenQuaterniondc
.Matrix4f.set
(Quaternionfc q) Set this matrix to be equivalent to the rotation specified by the givenQuaternionfc
.Set the four columns of this matrix to the supplied vectors, respectively.Matrix4f.set4x3
(Matrix4x3fc mat) Set the upper 4x3 submatrix of thisMatrix4f
to the givenMatrix4x3fc
and don't change the other elements.Set the column at the givencolumn
index, starting with0
.Matrix4f.setFromAddress
(long address) Set the values of this matrix by reading 16 float values from off-heap memory in column-major order, starting at the given address.Matrix4f.setFromIntrinsic
(float alphaX, float alphaY, float gamma, float u0, float v0, int imgWidth, int imgHeight, float near, float far) Set this matrix to represent a perspective projection equivalent to the given intrinsic camera calibration parameters.Matrix4f.setFrustum
(float left, float right, float bottom, float top, float zNear, float zFar) Set this matrix to be an arbitrary perspective projection frustum transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
.Matrix4f.setFrustum
(float left, float right, float bottom, float top, float zNear, float zFar, boolean zZeroToOne) Set this matrix to be an arbitrary perspective projection frustum transformation for a right-handed coordinate system using the given NDC z range.Matrix4f.setFrustumLH
(float left, float right, float bottom, float top, float zNear, float zFar) Set this matrix to be an arbitrary perspective projection frustum transformation for a left-handed coordinate system using OpenGL's NDC z range of[-1..+1]
.Matrix4f.setFrustumLH
(float left, float right, float bottom, float top, float zNear, float zFar, boolean zZeroToOne) Set this matrix to be an arbitrary perspective projection frustum transformation for a left-handed coordinate system using OpenGL's NDC z range of[-1..+1]
.Matrix4f.setLookAlong
(float dirX, float dirY, float dirZ, float upX, float upY, float upZ) Set this matrix to a rotation transformation to make-z
point alongdir
.Matrix4f.setLookAlong
(Vector3fc dir, Vector3fc up) Set this matrix to a rotation transformation to make-z
point alongdir
.Matrix4f.setLookAt
(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ) Set this matrix to be a "lookat" transformation for a right-handed coordinate system, that aligns-z
withcenter - eye
.Set this matrix to be a "lookat" transformation for a right-handed coordinate system, that aligns-z
withcenter - eye
.Matrix4f.setLookAtLH
(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ) Set this matrix to be a "lookat" transformation for a left-handed coordinate system, that aligns+z
withcenter - eye
.Matrix4f.setLookAtLH
(Vector3fc eye, Vector3fc center, Vector3fc up) Set this matrix to be a "lookat" transformation for a left-handed coordinate system, that aligns+z
withcenter - eye
.Matrix4f.setOrtho
(float left, float right, float bottom, float top, float zNear, float zFar) Set this matrix to be an orthographic projection transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
.Matrix4f.setOrtho
(float left, float right, float bottom, float top, float zNear, float zFar, boolean zZeroToOne) Set this matrix to be an orthographic projection transformation for a right-handed coordinate system using the given NDC z range.Matrix4f.setOrtho2D
(float left, float right, float bottom, float top) Set this matrix to be an orthographic projection transformation for a right-handed coordinate system.Matrix4f.setOrtho2DLH
(float left, float right, float bottom, float top) Set this matrix to be an orthographic projection transformation for a left-handed coordinate system.Matrix4f.setOrthoLH
(float left, float right, float bottom, float top, float zNear, float zFar) Set this matrix to be an orthographic projection transformation for a left-handed coordinate system using OpenGL's NDC z range of[-1..+1]
.Matrix4f.setOrthoLH
(float left, float right, float bottom, float top, float zNear, float zFar, boolean zZeroToOne) Set this matrix to be an orthographic projection transformation for a left-handed coordinate system using the given NDC z range.Matrix4f.setOrthoSymmetric
(float width, float height, float zNear, float zFar) Set this matrix to be a symmetric orthographic projection transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
.Matrix4f.setOrthoSymmetric
(float width, float height, float zNear, float zFar, boolean zZeroToOne) Set this matrix to be a symmetric orthographic projection transformation for a right-handed coordinate system using the given NDC z range.Matrix4f.setOrthoSymmetricLH
(float width, float height, float zNear, float zFar) Set this matrix to be a symmetric orthographic projection transformation for a left-handed coordinate system using OpenGL's NDC z range of[-1..+1]
.Matrix4f.setOrthoSymmetricLH
(float width, float height, float zNear, float zFar, boolean zZeroToOne) Set this matrix to be a symmetric orthographic projection transformation for a left-handed coordinate system using the given NDC z range.Matrix4f.setPerspective
(float fovy, float aspect, float zNear, float zFar) Set this matrix to be a symmetric perspective projection frustum transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
.Matrix4f.setPerspective
(float fovy, float aspect, float zNear, float zFar, boolean zZeroToOne) Set this matrix to be a symmetric perspective projection frustum transformation for a right-handed coordinate system using the given NDC z range.Matrix4f.setPerspectiveLH
(float fovy, float aspect, float zNear, float zFar) Set this matrix to be a symmetric perspective projection frustum transformation for a left-handed coordinate system using OpenGL's NDC z range of[-1..+1]
.Matrix4f.setPerspectiveLH
(float fovy, float aspect, float zNear, float zFar, boolean zZeroToOne) Set this matrix to be a symmetric perspective projection frustum transformation for a left-handed coordinate system using the given NDC z range of[-1..+1]
.Matrix4f.setPerspectiveOffCenter
(float fovy, float offAngleX, float offAngleY, float aspect, float zNear, float zFar) Set this matrix to be an asymmetric off-center perspective projection frustum transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
.Matrix4f.setPerspectiveOffCenter
(float fovy, float offAngleX, float offAngleY, float aspect, float zNear, float zFar, boolean zZeroToOne) Set this matrix to be an asymmetric off-center perspective projection frustum transformation for a right-handed coordinate system using the given NDC z range.Matrix4f.setPerspectiveOffCenterFov
(float angleLeft, float angleRight, float angleDown, float angleUp, float zNear, float zFar) Set this matrix to be an asymmetric off-center perspective projection frustum transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
.Matrix4f.setPerspectiveOffCenterFov
(float angleLeft, float angleRight, float angleDown, float angleUp, float zNear, float zFar, boolean zZeroToOne) Set this matrix to be an asymmetric off-center perspective projection frustum transformation for a right-handed coordinate system using the given NDC z range.Matrix4f.setPerspectiveOffCenterFovLH
(float angleLeft, float angleRight, float angleDown, float angleUp, float zNear, float zFar) Set this matrix to be an asymmetric off-center perspective projection frustum transformation for a left-handed coordinate system using OpenGL's NDC z range of[-1..+1]
.Matrix4f.setPerspectiveOffCenterFovLH
(float angleLeft, float angleRight, float angleDown, float angleUp, float zNear, float zFar, boolean zZeroToOne) Set this matrix to be an asymmetric off-center perspective projection frustum transformation for a left-handed coordinate system using the given NDC z range.Matrix4f.setPerspectiveRect
(float width, float height, float zNear, float zFar) Set this matrix to be a symmetric perspective projection frustum transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
.Matrix4f.setPerspectiveRect
(float width, float height, float zNear, float zFar, boolean zZeroToOne) Set this matrix to be a symmetric perspective projection frustum transformation for a right-handed coordinate system using the given NDC z range.Matrix4f.setRotationXYZ
(float angleX, float angleY, float angleZ) Set only the upper left 3x3 submatrix of this matrix to a rotation ofangleX
radians about the X axis, followed by a rotation ofangleY
radians about the Y axis and followed by a rotation ofangleZ
radians about the Z axis.Matrix4f.setRotationYXZ
(float angleY, float angleX, float angleZ) Set only the upper left 3x3 submatrix of this matrix to a rotation ofangleY
radians about the Y axis, followed by a rotation ofangleX
radians about the X axis and followed by a rotation ofangleZ
radians about the Z axis.Matrix4f.setRotationZYX
(float angleZ, float angleY, float angleX) Set only the upper left 3x3 submatrix of this matrix to a rotation ofangleZ
radians about the Z axis, followed by a rotation ofangleY
radians about the Y axis and followed by a rotation ofangleX
radians about the X axis.Set the row at the givenrow
index, starting with0
.Matrix4f.setRowColumn
(int row, int column, float value) Set the matrix element at the given row and column to the specified value.Matrix4f.setTranslation
(float x, float y, float z) Set only the translation components(m30, m31, m32)
of this matrix to the given values(x, y, z)
.Matrix4f.setTranslation
(Vector3fc xyz) Set only the translation components(m30, m31, m32)
of this matrix to the values(xyz.x, xyz.y, xyz.z)
.Matrix4f.setTransposed
(float[] m) Set the values in the matrix using a float array that contains the matrix elements in row-major order.Matrix4f.setTransposed
(float[] m, int off) Set the values in the matrix using a float array that contains the matrix elements in row-major order.Matrix4f.setTransposed
(ByteBuffer buffer) Set the values of this matrix by reading 16 float values from the givenByteBuffer
in row-major order, starting at its current position.Matrix4f.setTransposed
(FloatBuffer buffer) Set the values of this matrix by reading 16 float values from the givenFloatBuffer
in row-major order, starting at its current position.Matrix4f.setTransposed
(Matrix4fc m) Store the values of the transpose of the given matrixm
intothis
matrix.Matrix4f.setTransposedFromAddress
(long address) Set the values of this matrix by reading 16 float values from off-heap memory in row-major order, starting at the given address.Matrix4f.shadow
(float lightX, float lightY, float lightZ, float lightW, float a, float b, float c, float d) Apply a projection transformation to this matrix that projects onto the plane specified via the general plane equationx*a + y*b + z*c + d = 0
as if casting a shadow from a given light position/direction(lightX, lightY, lightZ, lightW)
.Matrix4f.shadow
(float lightX, float lightY, float lightZ, float lightW, float a, float b, float c, float d, Matrix4f dest) Apply a projection transformation to this matrix that projects onto the plane with the general plane equationy = 0
as if casting a shadow from a given light position/direction(lightX, lightY, lightZ, lightW)
.Matrix4f.shadow
(float lightX, float lightY, float lightZ, float lightW, Matrix4fc planeTransform, Matrix4f dest) Apply a projection transformation to this matrix that projects onto the plane specified via the general plane equationx*a + y*b + z*c + d = 0
as if casting a shadow from a given light position/directionlight
.Apply a projection transformation to this matrix that projects onto the plane with the general plane equationy = 0
as if casting a shadow from a given light position/directionlight
.Matrix4fc.shadow
(float lightX, float lightY, float lightZ, float lightW, float a, float b, float c, float d, Matrix4f dest) Apply a projection transformation to this matrix that projects onto the plane specified via the general plane equationx*a + y*b + z*c + d = 0
as if casting a shadow from a given light position/direction(lightX, lightY, lightZ, lightW)
and store the result indest
.Matrix4fc.shadow
(float lightX, float lightY, float lightZ, float lightW, Matrix4fc planeTransform, Matrix4f dest) Apply a projection transformation to this matrix that projects onto the plane with the general plane equationy = 0
as if casting a shadow from a given light position/direction(lightX, lightY, lightZ, lightW)
and store the result indest
.Apply a projection transformation to this matrix that projects onto the plane specified via the general plane equationx*a + y*b + z*c + d = 0
as if casting a shadow from a given light position/directionlight
and store the result indest
.Apply a projection transformation to this matrix that projects onto the plane with the general plane equationy = 0
as if casting a shadow from a given light position/directionlight
and store the result indest
.Component-wise subtractsubtrahend
fromthis
.Component-wise subtractsubtrahend
fromthis
and store the result indest
.Component-wise subtract the upper 4x3 submatrices ofsubtrahend
fromthis
.Component-wise subtract the upper 4x3 submatrices ofsubtrahend
fromthis
and store the result indest
.Exchange the values ofthis
matrix with the givenother
matrix.Matrix4f.tile
(int x, int y, int w, int h) This method is equivalent to calling:translate(w-1-2*x, h-1-2*y, 0).scale(w, h, 1)
This method is equivalent to calling:translate(w-1-2*x, h-1-2*y, 0, dest).scale(w, h, 1)
Matrix4f.transformAab
(float minX, float minY, float minZ, float maxX, float maxY, float maxZ, Vector3f outMin, Vector3f outMax) Matrix4f.transformAab
(Vector3fc min, Vector3fc max, Vector3f outMin, Vector3f outMax) Matrix4fc.transformAab
(float minX, float minY, float minZ, float maxX, float maxY, float maxZ, Vector3f outMin, Vector3f outMax) Transform the axis-aligned box given as the minimum corner(minX, minY, minZ)
and maximum corner(maxX, maxY, maxZ)
bythis
affine
matrix and compute the axis-aligned box of the result whose minimum corner is stored inoutMin
and maximum corner stored inoutMax
.Matrix4fc.transformAab
(Vector3fc min, Vector3fc max, Vector3f outMin, Vector3f outMax) Transform the axis-aligned box given as the minimum cornermin
and maximum cornermax
bythis
affine
matrix and compute the axis-aligned box of the result whose minimum corner is stored inoutMin
and maximum corner stored inoutMax
.Matrix4f.translate
(float x, float y, float z) Apply a translation to this matrix by translating by the given number of units in x, y and z.Apply a translation to this matrix by translating by the given number of units in x, y and z and store the result indest
.Apply a translation to this matrix by translating by the given number of units in x, y and z.Apply a translation to this matrix by translating by the given number of units in x, y and z and store the result indest
.Apply a translation to this matrix by translating by the given number of units in x, y and z and store the result indest
.Apply a translation to this matrix by translating by the given number of units in x, y and z and store the result indest
.Matrix4f.translateLocal
(float x, float y, float z) Pre-multiply a translation to this matrix by translating by the given number of units in x, y and z.Matrix4f.translateLocal
(float x, float y, float z, Matrix4f dest) Pre-multiply a translation to this matrix by translating by the given number of units in x, y and z and store the result indest
.Matrix4f.translateLocal
(Vector3fc offset) Pre-multiply a translation to this matrix by translating by the given number of units in x, y and z.Matrix4f.translateLocal
(Vector3fc offset, Matrix4f dest) Pre-multiply a translation to this matrix by translating by the given number of units in x, y and z and store the result indest
.Matrix4fc.translateLocal
(float x, float y, float z, Matrix4f dest) Pre-multiply a translation to this matrix by translating by the given number of units in x, y and z and store the result indest
.Matrix4fc.translateLocal
(Vector3fc offset, Matrix4f dest) Pre-multiply a translation to this matrix by translating by the given number of units in x, y and z and store the result indest
.Matrix4f.translation
(float x, float y, float z) Set this matrix to be a simple translation matrix.Matrix4f.translation
(Vector3fc offset) Set this matrix to be a simple translation matrix.Matrix4f.translationRotate
(float tx, float ty, float tz, float qx, float qy, float qz, float qw) Setthis
matrix toT * R
, whereT
is a translation by the given(tx, ty, tz)
andR
is a rotation - and possibly scaling - transformation specified by the quaternion(qx, qy, qz, qw)
.Matrix4f.translationRotate
(float tx, float ty, float tz, Quaternionfc quat) Setthis
matrix toT * R
, whereT
is a translation by the given(tx, ty, tz)
andR
is a rotation - and possibly scaling - transformation specified by the given quaternion.Matrix4f.translationRotate
(Vector3fc translation, Quaternionfc quat) Setthis
matrix toT * R
, whereT
is the giventranslation
andR
is a rotation transformation specified by the given quaternion.Matrix4f.translationRotateInvert
(float tx, float ty, float tz, float qx, float qy, float qz, float qw) Setthis
matrix to(T * R)-1
, whereT
is a translation by the given(tx, ty, tz)
andR
is a rotation transformation specified by the quaternion(qx, qy, qz, qw)
.Matrix4f.translationRotateInvert
(Vector3fc translation, Quaternionfc quat) Setthis
matrix to(T * R)-1
, whereT
is the giventranslation
andR
is a rotation transformation specified by the given quaternion.Matrix4f.translationRotateScale
(float tx, float ty, float tz, float qx, float qy, float qz, float qw, float scale) Setthis
matrix toT * R * S
, whereT
is a translation by the given(tx, ty, tz)
,R
is a rotation transformation specified by the quaternion(qx, qy, qz, qw)
, andS
is a scaling transformation which scales all three axes byscale
.Matrix4f.translationRotateScale
(float tx, float ty, float tz, float qx, float qy, float qz, float qw, float sx, float sy, float sz) Setthis
matrix toT * R * S
, whereT
is a translation by the given(tx, ty, tz)
,R
is a rotation transformation specified by the quaternion(qx, qy, qz, qw)
, andS
is a scaling transformation which scales the three axes x, y and z by(sx, sy, sz)
.Matrix4f.translationRotateScale
(Vector3fc translation, Quaternionfc quat, float scale) Setthis
matrix toT * R * S
, whereT
is the giventranslation
,R
is a rotation transformation specified by the given quaternion, andS
is a scaling transformation which scales all three axes byscale
.Matrix4f.translationRotateScale
(Vector3fc translation, Quaternionfc quat, Vector3fc scale) Setthis
matrix toT * R * S
, whereT
is the giventranslation
,R
is a rotation transformation specified by the given quaternion, andS
is a scaling transformation which scales the axes byscale
.Matrix4f.translationRotateScaleInvert
(float tx, float ty, float tz, float qx, float qy, float qz, float qw, float sx, float sy, float sz) Setthis
matrix to(T * R * S)-1
, whereT
is a translation by the given(tx, ty, tz)
,R
is a rotation transformation specified by the quaternion(qx, qy, qz, qw)
, andS
is a scaling transformation which scales the three axes x, y and z by(sx, sy, sz)
.Matrix4f.translationRotateScaleInvert
(Vector3fc translation, Quaternionfc quat, float scale) Setthis
matrix to(T * R * S)-1
, whereT
is the giventranslation
,R
is a rotation transformation specified by the given quaternion, andS
is a scaling transformation which scales all three axes byscale
.Matrix4f.translationRotateScaleInvert
(Vector3fc translation, Quaternionfc quat, Vector3fc scale) Setthis
matrix to(T * R * S)-1
, whereT
is the giventranslation
,R
is a rotation transformation specified by the given quaternion, andS
is a scaling transformation which scales the axes byscale
.Matrix4f.translationRotateScaleMulAffine
(float tx, float ty, float tz, float qx, float qy, float qz, float qw, float sx, float sy, float sz, Matrix4f m) Setthis
matrix toT * R * S * M
, whereT
is a translation by the given(tx, ty, tz)
,R
is a rotation - and possibly scaling - transformation specified by the quaternion(qx, qy, qz, qw)
,S
is a scaling transformation which scales the three axes x, y and z by(sx, sy, sz)
andM
is anaffine
matrix.Matrix4f.translationRotateScaleMulAffine
(Vector3fc translation, Quaternionfc quat, Vector3fc scale, Matrix4f m) Setthis
matrix toT * R * S * M
, whereT
is the giventranslation
,R
is a rotation - and possibly scaling - transformation specified by the given quaternion,S
is a scaling transformation which scales the axes byscale
andM
is anaffine
matrix.Matrix4f.translationRotateTowards
(float posX, float posY, float posZ, 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 translates to the given(posX, posY, posZ)
and aligns the local-z
axis with(dirX, dirY, dirZ)
.Matrix4f.translationRotateTowards
(Vector3fc pos, Vector3fc dir, Vector3fc up) Set this matrix to a model transformation for a right-handed coordinate system, that translates to the givenpos
and aligns the local-z
axis withdir
.Matrix4f.transpose()
Transpose this matrix.Transpose this matrix and store the result indest
.Matrix4f.transpose3x3()
Transpose only the upper left 3x3 submatrix of this matrix.Matrix4f.transpose3x3
(Matrix4f dest) Matrix4fc.transpose3x3
(Matrix4f dest) Transpose only the upper left 3x3 submatrix of this matrix and store the result indest
.Matrix4f.trapezoidCrop
(float p0x, float p0y, float p1x, float p1y, float p2x, float p2y, float p3x, float p3y) Setthis
matrix to a perspective transformation that maps the trapezoid spanned by the four corner coordinates(p0x, p0y)
,(p1x, p1y)
,(p2x, p2y)
and(p3x, p3y)
to the unit square[(-1, -1)..(+1, +1)]
.Matrix4f.unprojectInvRay
(float winX, float winY, int[] viewport, Vector3f originDest, Vector3f dirDest) Matrix4f.unprojectInvRay
(Vector2fc winCoords, int[] viewport, Vector3f originDest, Vector3f dirDest) Matrix4fc.unprojectInvRay
(float winX, float winY, int[] viewport, Vector3f originDest, Vector3f dirDest) Unproject the given 2D window coordinates(winX, winY)
bythis
matrix using the specified viewport and compute the origin and the direction of the resulting ray which starts at NDCz = -1.0
and goes through NDCz = +1.0
.Matrix4fc.unprojectInvRay
(Vector2fc winCoords, int[] viewport, Vector3f originDest, Vector3f dirDest) Unproject the given window coordinateswinCoords
bythis
matrix using the specified viewport and compute the origin and the direction of the resulting ray which starts at NDCz = -1.0
and goes through NDCz = +1.0
.Matrix4f.unprojectRay
(float winX, float winY, int[] viewport, Vector3f originDest, Vector3f dirDest) Matrix4f.unprojectRay
(Vector2fc winCoords, int[] viewport, Vector3f originDest, Vector3f dirDest) Matrix4fc.unprojectRay
(float winX, float winY, int[] viewport, Vector3f originDest, Vector3f dirDest) Unproject the given 2D window coordinates(winX, winY)
bythis
matrix using the specified viewport and compute the origin and the direction of the resulting ray which starts at NDCz = -1.0
and goes through NDCz = +1.0
.Matrix4fc.unprojectRay
(Vector2fc winCoords, int[] viewport, Vector3f originDest, Vector3f dirDest) Unproject the given 2D window coordinateswinCoords
bythis
matrix using the specified viewport and compute the origin and the direction of the resulting ray which starts at NDCz = -1.0
and goes through NDCz = +1.0
.Matrix4f.withLookAtUp
(float upX, float upY, float upZ) Apply a transformation to this matrix to ensure that the local Y axis (as obtained bypositiveY(Vector3f)
) will be coplanar to the plane spanned by the local Z axis (as obtained bypositiveZ(Vector3f)
) and the given vector(upX, upY, upZ)
.Matrix4f.withLookAtUp
(float upX, float upY, float upZ, Matrix4f dest) Matrix4f.withLookAtUp
(Vector3fc up) Apply a transformation to this matrix to ensure that the local Y axis (as obtained bypositiveY(Vector3f)
) will be coplanar to the plane spanned by the local Z axis (as obtained bypositiveZ(Vector3f)
) and the given vectorup
.Matrix4f.withLookAtUp
(Vector3fc up, Matrix4f dest) Matrix4fc.withLookAtUp
(float upX, float upY, float upZ, Matrix4f dest) Apply a transformation to this matrix to ensure that the local Y axis (as obtained byMatrix4fc.positiveY(Vector3f)
) will be coplanar to the plane spanned by the local Z axis (as obtained byMatrix4fc.positiveZ(Vector3f)
) and the given vector(upX, upY, upZ)
, and store the result indest
.Matrix4fc.withLookAtUp
(Vector3fc up, Matrix4f dest) Apply a transformation to this matrix to ensure that the local Y axis (as obtained byMatrix4fc.positiveY(Vector3f)
) will be coplanar to the plane spanned by the local Z axis (as obtained byMatrix4fc.positiveZ(Vector3f)
) and the given vectorup
, and store the result indest
.Matrix4f.zero()
Set all the values within this matrix to0
.Modifier and TypeMethodDescriptionComponent-wise addthis
andother
and store the result indest
.Component-wise add the upper 4x3 submatrices ofthis
andother
and store the result indest
.Matrix4f.arcball
(float radius, float centerX, float centerY, float centerZ, float angleX, float angleY, Matrix4f dest) Matrix4fc.arcball
(float radius, float centerX, float centerY, float centerZ, float angleX, float angleY, Matrix4f dest) Apply an arcball view transformation to this matrix with the givenradius
and center(centerX, centerY, centerZ)
position of the arcball and the specified X and Y rotation angles, and store the result indest
.Apply an arcball view transformation to this matrix with the givenradius
andcenter
position of the arcball and the specified X and Y rotation angles, and store the result indest
.Matrix4f.cofactor3x3
(Matrix4f dest) Compute the cofactor matrix of the upper left 3x3 submatrix ofthis
and store it intodest
.Matrix4fc.cofactor3x3
(Matrix4f dest) Compute the cofactor matrix of the upper left 3x3 submatrix ofthis
and store it intodest
.Component-wise add the upper 4x3 submatrices ofthis
andother
by first multiplying each component ofother
's 4x3 submatrix byotherFactor
, adding that tothis
and storing the final result indest
.Matrix4f.frustum
(float left, float right, float bottom, float top, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply an arbitrary perspective projection frustum transformation for a right-handed coordinate system using the given NDC z range to this matrix and store the result indest
.Matrix4f.frustum
(float left, float right, float bottom, float top, float zNear, float zFar, Matrix4f dest) Apply an arbitrary perspective projection frustum transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Matrix4fc.frustum
(float left, float right, float bottom, float top, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply an arbitrary perspective projection frustum transformation for a right-handed coordinate system using the given NDC z range to this matrix and store the result indest
.Matrix4fc.frustum
(float left, float right, float bottom, float top, float zNear, float zFar, Matrix4f dest) Apply an arbitrary perspective projection frustum transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Matrix4f.frustumLH
(float left, float right, float bottom, float top, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply an arbitrary perspective projection frustum transformation for a left-handed coordinate system using the given NDC z range to this matrix and store the result indest
.Matrix4f.frustumLH
(float left, float right, float bottom, float top, float zNear, float zFar, Matrix4f dest) Apply an arbitrary perspective projection frustum transformation for a left-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Matrix4fc.frustumLH
(float left, float right, float bottom, float top, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply an arbitrary perspective projection frustum transformation for a left-handed coordinate system using the given NDC z range to this matrix and store the result indest
.Matrix4fc.frustumLH
(float left, float right, float bottom, float top, float zNear, float zFar, Matrix4f dest) Apply an arbitrary perspective projection frustum transformation for a left-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Set the givenMatrix4f
to a rotation transformation equivalent to thisAxisAngle4d
.Set the givenMatrix4f
to a rotation transformation equivalent to thisAxisAngle4f
.Get the current values ofthis
matrix and store them as the rotational component ofdest
.Get the current values ofthis
matrix and store them intodest
.Get the current values ofthis
matrix and store them intodest
.Get the current values ofthis
matrix and store them into the upper 4x3 submatrix ofdest
.Set the given destination matrix to the rotation represented bythis
.Set the given destination matrix to the rotation represented bythis
.Invert this matrix and write the result intodest
.Invert this matrix and write the result as the top 4x3 matrix intodest
and set all other values ofdest
to identity..Matrix4f.invertAffine
(Matrix4f dest) Matrix4fc.invertAffine
(Matrix4f dest) Invert this matrix by assuming that it is anaffine
transformation (i.e.Matrix4f.invertFrustum
(Matrix4f dest) Ifthis
is an arbitrary perspective projection matrix obtained via one of thefrustum()
methods or viasetFrustum()
, then this method builds the inverse ofthis
and stores it into the givendest
.Matrix4fc.invertFrustum
(Matrix4f dest) Ifthis
is an arbitrary perspective projection matrix obtained via one of thefrustum()
methods, then this method builds the inverse ofthis
and stores it into the givendest
.Matrix4f.invertOrtho
(Matrix4f dest) Matrix4fc.invertOrtho
(Matrix4f dest) Invertthis
orthographic projection matrix and store the result into the givendest
.Matrix4f.invertPerspective
(Matrix4f dest) Ifthis
is a perspective projection matrix obtained via one of theperspective()
methods or viasetPerspective()
, that is, ifthis
is a symmetrical perspective frustum transformation, then this method builds the inverse ofthis
and stores it into the givendest
.Matrix4fc.invertPerspective
(Matrix4f dest) Ifthis
is a perspective projection matrix obtained via one of theperspective()
methods, that is, ifthis
is a symmetrical perspective frustum transformation, then this method builds the inverse ofthis
and stores it into the givendest
.Matrix4f.invertPerspectiveView
(Matrix4fc view, Matrix4f dest) Ifthis
is a perspective projection matrix obtained via one of theperspective()
methods or viasetPerspective()
, that is, ifthis
is a symmetrical perspective frustum transformation and the givenview
matrix isaffine
and has unit scaling (for example by being obtained vialookAt()
), then this method builds the inverse ofthis * view
and stores it into the givendest
.Matrix4f.invertPerspectiveView
(Matrix4x3fc view, Matrix4f dest) Ifthis
is a perspective projection matrix obtained via one of theperspective()
methods or viasetPerspective()
, that is, ifthis
is a symmetrical perspective frustum transformation and the givenview
matrix has unit scaling, then this method builds the inverse ofthis * view
and stores it into the givendest
.Matrix4fc.invertPerspectiveView
(Matrix4fc view, Matrix4f dest) Ifthis
is a perspective projection matrix obtained via one of theperspective()
methods, that is, ifthis
is a symmetrical perspective frustum transformation and the givenview
matrix isaffine
and has unit scaling (for example by being obtained vialookAt()
), then this method builds the inverse ofthis * view
and stores it into the givendest
.Matrix4fc.invertPerspectiveView
(Matrix4x3fc view, Matrix4f dest) Ifthis
is a perspective projection matrix obtained via one of theperspective()
methods, that is, ifthis
is a symmetrical perspective frustum transformation and the givenview
matrix has unit scaling, then this method builds the inverse ofthis * view
and stores it into the givendest
.Linearly interpolatethis
andother
using the given interpolation factort
and store the result indest
.Matrix4f.lookAlong
(float dirX, float dirY, float dirZ, float upX, float upY, float upZ, Matrix4f dest) Apply a rotation transformation to this matrix to make-z
point alongdir
and store the result indest
.Apply a rotation transformation to this matrix to make-z
point alongdir
and store the result indest
.Matrix4fc.lookAlong
(float dirX, float dirY, float dirZ, float upX, float upY, float upZ, Matrix4f dest) Apply a rotation transformation to this matrix to make-z
point alongdir
and store the result indest
.Apply a rotation transformation to this matrix to make-z
point alongdir
and store the result indest
.Matrix4f.lookAt
(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ, Matrix4f dest) Apply a "lookat" transformation to this matrix for a right-handed coordinate system, that aligns-z
withcenter - eye
and store the result indest
.Apply a "lookat" transformation to this matrix for a right-handed coordinate system, that aligns-z
withcenter - eye
and store the result indest
.Matrix4fc.lookAt
(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ, Matrix4f dest) Apply a "lookat" transformation to this matrix for a right-handed coordinate system, that aligns-z
withcenter - eye
and store the result indest
.Apply a "lookat" transformation to this matrix for a right-handed coordinate system, that aligns-z
withcenter - eye
and store the result indest
.Matrix4f.lookAtLH
(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ, Matrix4f dest) Apply a "lookat" transformation to this matrix for a left-handed coordinate system, that aligns+z
withcenter - eye
and store the result indest
.Apply a "lookat" transformation to this matrix for a left-handed coordinate system, that aligns+z
withcenter - eye
and store the result indest
.Matrix4fc.lookAtLH
(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ, Matrix4f dest) Apply a "lookat" transformation to this matrix for a left-handed coordinate system, that aligns+z
withcenter - eye
and store the result indest
.Apply a "lookat" transformation to this matrix for a left-handed coordinate system, that aligns+z
withcenter - eye
and store the result indest
.Matrix4f.lookAtPerspective
(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ, Matrix4f dest) Apply a "lookat" transformation to this matrix for a right-handed coordinate system, that aligns-z
withcenter - eye
and store the result indest
.Matrix4fc.lookAtPerspective
(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ, Matrix4f dest) Apply a "lookat" transformation to this matrix for a right-handed coordinate system, that aligns-z
withcenter - eye
and store the result indest
.Matrix4f.lookAtPerspectiveLH
(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ, Matrix4f dest) Apply a "lookat" transformation to this matrix for a left-handed coordinate system, that aligns+z
withcenter - eye
and store the result indest
.Matrix4fc.lookAtPerspectiveLH
(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ, Matrix4f dest) Apply a "lookat" transformation to this matrix for a left-handed coordinate system, that aligns+z
withcenter - eye
and store the result indest
.Multiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiply this matrix by the supplied parameter matrix.Matrix4f.mul
(float r00, float r01, float r02, float r03, float r10, float r11, float r12, float r13, float r20, float r21, float r22, float r23, float r30, float r31, float r32, float r33, Matrix4f dest) Matrix4f.mul
(Matrix3x2fc right, Matrix4f dest) Matrix4f.mul
(Matrix4x3fc right, Matrix4f dest) Matrix4fc.mul
(float r00, float r01, float r02, float r03, float r10, float r11, float r12, float r13, float r20, float r21, float r22, float r23, float r30, float r31, float r32, float r33, Matrix4f dest) Multiply this matrix by the matrix with the supplied elements and store the result indest
.Matrix4fc.mul
(Matrix3x2fc right, Matrix4f dest) Multiply this matrix by the suppliedright
matrix and store the result indest
.Multiply this matrix by the suppliedright
matrix and store the result indest
.Matrix4fc.mul
(Matrix4x3fc right, Matrix4f dest) Multiply this matrix by the suppliedright
matrix and store the result indest
.Multiply this matrix by the suppliedright
matrix and store the result indest
.Matrix4f.mul3x3
(float r00, float r01, float r02, float r10, float r11, float r12, float r20, float r21, float r22, Matrix4f dest) Matrix4fc.mul3x3
(float r00, float r01, float r02, float r10, float r11, float r12, float r20, float r21, float r22, Matrix4f dest) Multiply this matrix by the 3x3 matrix with the supplied elements expanded to a 4x4 matrix with all other matrix elements set to identity, and store the result indest
.Matrix4f.mul4x3ComponentWise
(Matrix4fc other, Matrix4f dest) Matrix4fc.mul4x3ComponentWise
(Matrix4fc other, Matrix4f dest) Component-wise multiply the upper 4x3 submatrices ofthis
byother
and store the result indest
.Multiply this matrix by the suppliedright
matrix, both of which are assumed to beaffine
, and store the result indest
.Matrix4f.mulAffineR
(Matrix4fc right, Matrix4f dest) Matrix4fc.mulAffineR
(Matrix4fc right, Matrix4f dest) Multiply this matrix by the suppliedright
matrix, which is assumed to beaffine
, and store the result indest
.Matrix4f.mulComponentWise
(Matrix4fc other, Matrix4f dest) Matrix4fc.mulComponentWise
(Matrix4fc other, Matrix4f dest) Component-wise multiplythis
byother
and store the result indest
.Pre-multiply this matrix by the suppliedleft
matrix and store the result indest
.Matrix4f.mulLocalAffine
(Matrix4fc left, Matrix4f dest) Matrix4fc.mulLocalAffine
(Matrix4fc left, Matrix4f dest) Pre-multiply this matrix by the suppliedleft
matrix, both of which are assumed to beaffine
, and store the result indest
.Matrix4f.mulOrthoAffine
(Matrix4fc view, Matrix4f dest) Matrix4fc.mulOrthoAffine
(Matrix4fc view, Matrix4f dest) Multiplythis
orthographic projection matrix by the suppliedaffine
view
matrix and store the result indest
.Matrix4f.mulPerspectiveAffine
(Matrix4fc view, Matrix4f dest) Matrix4f.mulPerspectiveAffine
(Matrix4x3fc view, Matrix4f dest) Matrix4fc.mulPerspectiveAffine
(Matrix4fc view, Matrix4f dest) Multiplythis
symmetric perspective projection matrix by the suppliedaffine
view
matrix and store the result indest
.Matrix4fc.mulPerspectiveAffine
(Matrix4x3fc view, Matrix4f dest) Multiplythis
symmetric perspective projection matrix by the suppliedview
matrix and store the result indest
.Matrix4f.mulTranslationAffine
(Matrix4fc right, Matrix4f dest) Matrix4fc.mulTranslationAffine
(Matrix4fc right, Matrix4f dest) Multiply this matrix, which is assumed to only contain a translation, by the suppliedright
matrix, which is assumed to beaffine
, and store the result indest
.Multiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixCompute a normal matrix from the upper left 3x3 submatrix ofthis
and store it into the upper left 3x3 submatrix ofdest
.Compute a normal matrix from the upper left 3x3 submatrix ofthis
and store it into the upper left 3x3 submatrix ofdest
.Matrix4f.normalize3x3
(Matrix4f dest) Matrix4fc.normalize3x3
(Matrix4f dest) Normalize the upper left 3x3 submatrix of this matrix and store the result indest
.Apply an oblique projection transformation to this matrix with the given values fora
andb
and store the result indest
.Apply an oblique projection transformation to this matrix with the given values fora
andb
and store the result indest
.Matrix4f.ortho
(float left, float right, float bottom, float top, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply an orthographic projection transformation for a right-handed coordinate system using the given NDC z range to this matrix and store the result indest
.Matrix4f.ortho
(float left, float right, float bottom, float top, float zNear, float zFar, Matrix4f dest) Apply an orthographic projection transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Matrix4fc.ortho
(float left, float right, float bottom, float top, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply an orthographic projection transformation for a right-handed coordinate system using the given NDC z range to this matrix and store the result indest
.Matrix4fc.ortho
(float left, float right, float bottom, float top, float zNear, float zFar, Matrix4f dest) Apply an orthographic projection transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Apply an orthographic projection transformation for a right-handed coordinate system to this matrix and store the result indest
.Apply an orthographic projection transformation for a right-handed coordinate system to this matrix and store the result indest
.Apply an orthographic projection transformation for a left-handed coordinate system to this matrix and store the result indest
.Apply an orthographic projection transformation for a left-handed coordinate system to this matrix and store the result indest
.Build an ortographic projection transformation that fits the view-projection transformation represented bythis
into the given affineview
transformation.Build an ortographic projection transformation that fits the view-projection transformation represented bythis
into the given affineview
transformation.Matrix4f.orthoLH
(float left, float right, float bottom, float top, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply an orthographic projection transformation for a left-handed coordiante system using the given NDC z range to this matrix and store the result indest
.Matrix4f.orthoLH
(float left, float right, float bottom, float top, float zNear, float zFar, Matrix4f dest) Apply an orthographic projection transformation for a left-handed coordiante system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Matrix4fc.orthoLH
(float left, float right, float bottom, float top, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply an orthographic projection transformation for a left-handed coordiante system using the given NDC z range to this matrix and store the result indest
.Matrix4fc.orthoLH
(float left, float right, float bottom, float top, float zNear, float zFar, Matrix4f dest) Apply an orthographic projection transformation for a left-handed coordiante system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Matrix4f.orthoSymmetric
(float width, float height, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply a symmetric orthographic projection transformation for a right-handed coordinate system using the given NDC z range to this matrix and store the result indest
.Matrix4f.orthoSymmetric
(float width, float height, float zNear, float zFar, Matrix4f dest) Apply a symmetric orthographic projection transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Matrix4fc.orthoSymmetric
(float width, float height, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply a symmetric orthographic projection transformation for a right-handed coordinate system using the given NDC z range to this matrix and store the result indest
.Matrix4fc.orthoSymmetric
(float width, float height, float zNear, float zFar, Matrix4f dest) Apply a symmetric orthographic projection transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Matrix4f.orthoSymmetricLH
(float width, float height, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply a symmetric orthographic projection transformation for a left-handed coordinate system using the given NDC z range to this matrix and store the result indest
.Matrix4f.orthoSymmetricLH
(float width, float height, float zNear, float zFar, Matrix4f dest) Apply a symmetric orthographic projection transformation for a left-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Matrix4fc.orthoSymmetricLH
(float width, float height, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply a symmetric orthographic projection transformation for a left-handed coordinate system using the given NDC z range to this matrix and store the result indest
.Matrix4fc.orthoSymmetricLH
(float width, float height, float zNear, float zFar, Matrix4f dest) Apply a symmetric orthographic projection transformation for a left-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Matrix4f.perspective
(float fovy, float aspect, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply a symmetric perspective projection frustum transformation for a right-handed coordinate system using the given NDC z range to this matrix and store the result indest
.Matrix4f.perspective
(float fovy, float aspect, float zNear, float zFar, Matrix4f dest) Apply a symmetric perspective projection frustum transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Matrix4fc.perspective
(float fovy, float aspect, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply a symmetric perspective projection frustum transformation for a right-handed coordinate system using the given NDC z range to this matrix and store the result indest
.Matrix4fc.perspective
(float fovy, float aspect, float zNear, float zFar, Matrix4f dest) Apply a symmetric perspective projection frustum transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Matrix4f.perspectiveFrustumSlice
(float near, float far, Matrix4f dest) Change the near and far clip plane distances ofthis
perspective frustum transformation matrix and store the result indest
.Matrix4fc.perspectiveFrustumSlice
(float near, float far, Matrix4f dest) Change the near and far clip plane distances ofthis
perspective frustum transformation matrix and store the result indest
.Matrix4f.perspectiveLH
(float fovy, float aspect, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply a symmetric perspective projection frustum transformation for a left-handed coordinate system using the given NDC z range to this matrix and store the result indest
.Matrix4f.perspectiveLH
(float fovy, float aspect, float zNear, float zFar, Matrix4f dest) Apply a symmetric perspective projection frustum transformation for a left-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Matrix4fc.perspectiveLH
(float fovy, float aspect, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply a symmetric perspective projection frustum transformation for a left-handed coordinate system using the given NDC z range to this matrix and store the result indest
.Matrix4fc.perspectiveLH
(float fovy, float aspect, float zNear, float zFar, Matrix4f dest) Apply a symmetric perspective projection frustum transformation for a left-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Matrix4f.perspectiveOffCenter
(float fovy, float offAngleX, float offAngleY, float aspect, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply an asymmetric off-center perspective projection frustum transformation for a right-handed coordinate system using the given NDC z range to this matrix and store the result indest
.Matrix4f.perspectiveOffCenter
(float fovy, float offAngleX, float offAngleY, float aspect, float zNear, float zFar, Matrix4f dest) Apply an asymmetric off-center perspective projection frustum transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Matrix4fc.perspectiveOffCenter
(float fovy, float offAngleX, float offAngleY, float aspect, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply an asymmetric off-center perspective projection frustum transformation for a right-handed coordinate system using the given NDC z range to this matrix and store the result indest
.Matrix4fc.perspectiveOffCenter
(float fovy, float offAngleX, float offAngleY, float aspect, float zNear, float zFar, Matrix4f dest) Apply an asymmetric off-center perspective projection frustum transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Matrix4f.perspectiveOffCenterFov
(float angleLeft, float angleRight, float angleDown, float angleUp, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Matrix4f.perspectiveOffCenterFov
(float angleLeft, float angleRight, float angleDown, float angleUp, float zNear, float zFar, Matrix4f dest) Matrix4fc.perspectiveOffCenterFov
(float angleLeft, float angleRight, float angleDown, float angleUp, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply an asymmetric off-center perspective projection frustum transformation for a right-handed coordinate system using the given NDC z range to this matrix and store the result indest
.Matrix4fc.perspectiveOffCenterFov
(float angleLeft, float angleRight, float angleDown, float angleUp, float zNear, float zFar, Matrix4f dest) Apply an asymmetric off-center perspective projection frustum transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Matrix4f.perspectiveOffCenterFovLH
(float angleLeft, float angleRight, float angleDown, float angleUp, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Matrix4f.perspectiveOffCenterFovLH
(float angleLeft, float angleRight, float angleDown, float angleUp, float zNear, float zFar, Matrix4f dest) Matrix4fc.perspectiveOffCenterFovLH
(float angleLeft, float angleRight, float angleDown, float angleUp, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply an asymmetric off-center perspective projection frustum transformation for a left-handed coordinate system using the given NDC z range to this matrix and store the result indest
.Matrix4fc.perspectiveOffCenterFovLH
(float angleLeft, float angleRight, float angleDown, float angleUp, float zNear, float zFar, Matrix4f dest) Apply an asymmetric off-center perspective projection frustum transformation for a left-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.static void
Matrix4f.perspectiveOffCenterViewFromRectangle
(Vector3f eye, Vector3f p, Vector3f x, Vector3f y, float nearFarDist, boolean zeroToOne, Matrix4f projDest, Matrix4f viewDest) Create a view and off-center perspective projection matrix from a giveneye
position, a given bottom left corner positionp
of the near plane rectangle and the extents of the near plane rectangle along its localx
andy
axes, and store the resulting matrices inprojDest
andviewDest
.Matrix4f.perspectiveRect
(float width, float height, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply a symmetric perspective projection frustum transformation for a right-handed coordinate system using the given NDC z range to this matrix and store the result indest
.Matrix4f.perspectiveRect
(float width, float height, float zNear, float zFar, Matrix4f dest) Apply a symmetric perspective projection frustum transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Matrix4fc.perspectiveRect
(float width, float height, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) Apply a symmetric perspective projection frustum transformation for a right-handed coordinate system using the given NDC z range to this matrix and store the result indest
.Matrix4fc.perspectiveRect
(float width, float height, float zNear, float zFar, Matrix4f dest) Apply a symmetric perspective projection frustum transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix and store the result indest
.Apply a picking transformation to this matrix using the given window coordinates(x, y)
as the pick center and the given(width, height)
as the size of the picking region in window coordinates, and store the result indest
.Matrix4f.projectedGridRange
(Matrix4fc projector, float sLower, float sUpper, Matrix4f dest) Matrix4fc.projectedGridRange
(Matrix4fc projector, float sLower, float sUpper, Matrix4f dest) Compute the range matrix for the Projected Grid transformation as described in chapter "2.4.2 Creating the range conversion matrix" of the paper Real-time water rendering - Introducing the projected grid concept based on the inverse of the view-projection matrix which is assumed to bethis
, and store that range matrix intodest
.Matrix4f.reflect
(Quaternionfc orientation, Vector3fc point, Matrix4f dest) Apply a mirror/reflection transformation to this matrix that reflects about the given plane specified via the plane normal and a point on the plane, and store the result indest
.Apply a mirror/reflection transformation to this matrix that reflects about the given plane specified via the equationx*a + y*b + z*c + d = 0
and store the result indest
.Matrix4fc.reflect
(Quaternionfc orientation, Vector3fc point, Matrix4f dest) Apply a mirror/reflection transformation to this matrix that reflects about a plane specified via the plane orientation and a point on the plane, and store the result indest
.Apply a mirror/reflection transformation to this matrix that reflects about the given plane specified via the plane normal and a point on the plane, and store the result indest
.Apply rotation to this matrix by rotating the given amount of radians about the specified(x, y, z)
axis and store the result indest
.Apply a rotation transformation, rotating the given radians about the specified axis and store the result indest
.Matrix4f.rotate
(AxisAngle4f axisAngle, Matrix4f dest) Apply a rotation transformation, rotating about the givenAxisAngle4f
and store the result indest
.Matrix4f.rotate
(Quaternionfc quat, Matrix4f dest) Apply the rotation transformation of the givenQuaternionfc
to this matrix and store the result indest
.Apply rotation to this matrix by rotating the given amount of radians about the specified(x, y, z)
axis and store the result indest
.Apply a rotation transformation, rotating the given radians about the specified axis and store the result indest
.Matrix4fc.rotate
(AxisAngle4f axisAngle, Matrix4f dest) Apply a rotation transformation, rotating about the givenAxisAngle4f
and store the result indest
.Matrix4fc.rotate
(Quaternionfc quat, Matrix4f dest) Apply the rotation - and possibly scaling - transformation of the givenQuaternionfc
to this matrix and store the result indest
.Matrix4f.rotateAffine
(float ang, float x, float y, float z, Matrix4f dest) Apply rotation to thisaffine
matrix by rotating the given amount of radians about the specified(x, y, z)
axis and store the result indest
.Matrix4f.rotateAffine
(Quaternionfc quat, Matrix4f dest) Apply the rotation transformation of the givenQuaternionfc
to thisaffine
matrix and store the result indest
.Matrix4fc.rotateAffine
(float ang, float x, float y, float z, Matrix4f dest) Apply rotation to thisaffine
matrix by rotating the given amount of radians about the specified(x, y, z)
axis and store the result indest
.Matrix4fc.rotateAffine
(Quaternionfc quat, Matrix4f dest) Apply the rotation - and possibly scaling - transformation of the givenQuaternionfc
to thisaffine
matrix and store the result indest
.Matrix4f.rotateAffineXYZ
(float angleX, float angleY, float angleZ, Matrix4f dest) Matrix4fc.rotateAffineXYZ
(float angleX, float angleY, float angleZ, Matrix4f dest) Apply rotation ofangleX
radians about the X axis, followed by a rotation ofangleY
radians about the Y axis and followed by a rotation ofangleZ
radians about the Z axis and store the result indest
.Matrix4f.rotateAffineYXZ
(float angleY, float angleX, float angleZ, Matrix4f dest) Matrix4fc.rotateAffineYXZ
(float angleY, float angleX, float angleZ, Matrix4f dest) Apply rotation ofangleY
radians about the Y axis, followed by a rotation ofangleX
radians about the X axis and followed by a rotation ofangleZ
radians about the Z axis and store the result indest
.Matrix4f.rotateAffineZYX
(float angleZ, float angleY, float angleX, Matrix4f dest) Matrix4fc.rotateAffineZYX
(float angleZ, float angleY, float angleX, Matrix4f dest) Apply rotation ofangleZ
radians about the Z axis, followed by a rotation ofangleY
radians about the Y axis and followed by a rotation ofangleX
radians about the X axis and store the result indest
.Matrix4f.rotateAround
(Quaternionfc quat, float ox, float oy, float oz, Matrix4f dest) Matrix4fc.rotateAround
(Quaternionfc quat, float ox, float oy, float oz, Matrix4f dest) Apply the rotation - and possibly scaling - transformation of the givenQuaternionfc
to this matrix while using(ox, oy, oz)
as the rotation origin, and store the result indest
.Matrix4f.rotateAroundAffine
(Quaternionfc quat, float ox, float oy, float oz, Matrix4f dest) Matrix4fc.rotateAroundAffine
(Quaternionfc quat, float ox, float oy, float oz, Matrix4f dest) Apply the rotation - and possibly scaling - transformation of the givenQuaternionfc
to thisaffine
matrix while using(ox, oy, oz)
as the rotation origin, and store the result indest
.Matrix4f.rotateAroundLocal
(Quaternionfc quat, float ox, float oy, float oz, Matrix4f dest) Matrix4fc.rotateAroundLocal
(Quaternionfc quat, float ox, float oy, float oz, Matrix4f dest) Pre-multiply the rotation - and possibly scaling - transformation of the givenQuaternionfc
to this matrix while using(ox, oy, oz)
as the rotation origin, and store the result indest
.Matrix4f.rotateLocal
(float ang, float x, float y, float z, Matrix4f 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
.Matrix4f.rotateLocal
(Quaternionfc quat, Matrix4f dest) Pre-multiply the rotation transformation of the givenQuaternionfc
to this matrix and store the result indest
.Matrix4fc.rotateLocal
(float ang, float x, float y, float z, Matrix4f 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
.Matrix4fc.rotateLocal
(Quaternionfc quat, Matrix4f dest) Pre-multiply the rotation - and possibly scaling - transformation of the givenQuaternionfc
to this matrix and store the result indest
.Matrix4f.rotateLocalX
(float ang, Matrix4f 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
.Matrix4fc.rotateLocalX
(float ang, Matrix4f 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
.Matrix4f.rotateLocalY
(float ang, Matrix4f 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
.Matrix4fc.rotateLocalY
(float ang, Matrix4f 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
.Matrix4f.rotateLocalZ
(float ang, Matrix4f 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
.Matrix4fc.rotateLocalZ
(float ang, Matrix4f 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
.Matrix4f.rotateTowards
(float dirX, float dirY, float dirZ, float upX, float upY, float upZ, Matrix4f dest) Apply a model transformation to this matrix for a right-handed coordinate system, that aligns the local+Z
axis with(dirX, dirY, dirZ)
and store the result indest
.Matrix4f.rotateTowards
(Vector3fc dir, Vector3fc up, Matrix4f dest) Apply a model transformation to this matrix for a right-handed coordinate system, that aligns the local+Z
axis withdir
and store the result indest
.Matrix4fc.rotateTowards
(float dirX, float dirY, float dirZ, float upX, float upY, float upZ, Matrix4f dest) Apply a model transformation to this matrix for a right-handed coordinate system, that aligns the local+Z
axis with(dirX, dirY, dirZ)
and store the result indest
.Matrix4fc.rotateTowards
(Vector3fc dir, Vector3fc up, Matrix4f dest) Apply a model transformation to this matrix for a right-handed coordinate system, that aligns the local+Z
axis withdir
and store the result indest
.Matrix4f.rotateTowardsXY
(float dirX, float dirY, Matrix4f dest) Matrix4fc.rotateTowardsXY
(float dirX, float dirY, Matrix4f dest) Apply rotation about the Z axis to align the local+X
towards(dirX, dirY)
and store the result indest
.Matrix4f.rotateTranslation
(float ang, float x, float y, float z, Matrix4f dest) Apply rotation to this matrix, which is assumed to only contain a translation, by rotating the given amount of radians about the specified(x, y, z)
axis and store the result indest
.Matrix4f.rotateTranslation
(Quaternionfc quat, Matrix4f dest) Apply the rotation transformation of the givenQuaternionfc
to this matrix, which is assumed to only contain a translation, and store the result indest
.Matrix4fc.rotateTranslation
(float ang, float x, float y, float z, Matrix4f dest) Apply rotation to this matrix, which is assumed to only contain a translation, by rotating the given amount of radians about the specified(x, y, z)
axis and store the result indest
.Matrix4fc.rotateTranslation
(Quaternionfc quat, Matrix4f dest) Apply the rotation - and possibly scaling - ransformation of the givenQuaternionfc
to this matrix, which is assumed to only contain a translation, and store the result indest
.Apply rotation about the X axis to this matrix by rotating the given amount of radians and store the result indest
.Apply rotation ofangleX
radians about the X axis, followed by a rotation ofangleY
radians about the Y axis and followed by a rotation ofangleZ
radians about the Z axis and store the result indest
.Apply rotation about the Y axis to this matrix by rotating the given amount of radians and store the result indest
.Apply rotation ofangleY
radians about the Y axis, followed by a rotation ofangleX
radians about the X axis and followed by a rotation ofangleZ
radians about the Z axis and store the result indest
.Apply rotation about the Z axis to this matrix by rotating the given amount of radians and store the result indest
.Apply rotation ofangleZ
radians about the Z axis, followed by a rotation ofangleY
radians about the Y axis and followed by a rotation ofangleX
radians about the X axis and store the result indest
.Apply scaling tothis
matrix by scaling the base axes by the given x, y and z factors and store the result indest
.Apply scaling to this matrix by uniformly scaling all base axes by the givenxyz
factor and store the result indest
.Apply scaling tothis
matrix by scaling the base axes by the givenxyz.x
,xyz.y
andxyz.z
factors, respectively and store the result indest
.Matrix4f.scaleAround
(float sx, float sy, float sz, float ox, float oy, float oz, Matrix4f dest) Matrix4f.scaleAround
(float factor, float ox, float oy, float oz, Matrix4f dest) Matrix4fc.scaleAround
(float sx, float sy, float sz, float ox, float oy, float oz, Matrix4f dest) Apply scaling tothis
matrix by scaling the base axes by the given sx, sy and sz factors while using(ox, oy, oz)
as the scaling origin, and store the result indest
.Matrix4fc.scaleAround
(float factor, float ox, float oy, float oz, Matrix4f dest) Apply scaling to this matrix by scaling all three base axes by the givenfactor
while using(ox, oy, oz)
as the scaling origin, and store the result indest
.Matrix4f.scaleAroundLocal
(float sx, float sy, float sz, float ox, float oy, float oz, Matrix4f dest) Matrix4f.scaleAroundLocal
(float factor, float ox, float oy, float oz, Matrix4f dest) Matrix4fc.scaleAroundLocal
(float sx, float sy, float sz, float ox, float oy, float oz, Matrix4f dest) Pre-multiply scaling tothis
matrix by scaling the base axes by the given sx, sy and sz factors while using the given(ox, oy, oz)
as the scaling origin, and store the result indest
.Matrix4fc.scaleAroundLocal
(float factor, float ox, float oy, float oz, Matrix4f dest) Pre-multiply scaling to this matrix by scaling all three base axes by the givenfactor
while using(ox, oy, oz)
as the scaling origin, and store the result indest
.Matrix4f.scaleLocal
(float x, float y, float z, Matrix4f dest) Matrix4f.scaleLocal
(float xyz, Matrix4f dest) Matrix4fc.scaleLocal
(float x, float y, float z, Matrix4f dest) Pre-multiply scaling tothis
matrix by scaling the base axes by the given x, y and z factors and store the result indest
.Matrix4fc.scaleLocal
(float xyz, Matrix4f dest) Pre-multiply scaling tothis
matrix by scaling all base axes by the givenxyz
factor, and store the result indest
.Apply scaling to this matrix by by scaling the X axis byx
and the Y axis byy
and store the result indest
.Matrix4f.shadow
(float lightX, float lightY, float lightZ, float lightW, float a, float b, float c, float d, Matrix4f dest) Apply a projection transformation to this matrix that projects onto the plane with the general plane equationy = 0
as if casting a shadow from a given light position/direction(lightX, lightY, lightZ, lightW)
.Matrix4f.shadow
(float lightX, float lightY, float lightZ, float lightW, Matrix4fc planeTransform, Matrix4f dest) Apply a projection transformation to this matrix that projects onto the plane with the general plane equationy = 0
as if casting a shadow from a given light position/directionlight
.Matrix4fc.shadow
(float lightX, float lightY, float lightZ, float lightW, float a, float b, float c, float d, Matrix4f dest) Apply a projection transformation to this matrix that projects onto the plane specified via the general plane equationx*a + y*b + z*c + d = 0
as if casting a shadow from a given light position/direction(lightX, lightY, lightZ, lightW)
and store the result indest
.Matrix4fc.shadow
(float lightX, float lightY, float lightZ, float lightW, Matrix4fc planeTransform, Matrix4f dest) Apply a projection transformation to this matrix that projects onto the plane with the general plane equationy = 0
as if casting a shadow from a given light position/direction(lightX, lightY, lightZ, lightW)
and store the result indest
.Apply a projection transformation to this matrix that projects onto the plane specified via the general plane equationx*a + y*b + z*c + d = 0
as if casting a shadow from a given light position/directionlight
and store the result indest
.Apply a projection transformation to this matrix that projects onto the plane with the general plane equationy = 0
as if casting a shadow from a given light position/directionlight
and store the result indest
.Component-wise subtractsubtrahend
fromthis
and store the result indest
.Component-wise subtract the upper 4x3 submatrices ofsubtrahend
fromthis
.Component-wise subtract the upper 4x3 submatrices ofsubtrahend
fromthis
and store the result indest
.Exchange the values ofthis
matrix with the givenother
matrix.This method is equivalent to calling:translate(w-1-2*x, h-1-2*y, 0, dest).scale(w, h, 1)
Apply a translation to this matrix by translating by the given number of units in x, y and z and store the result indest
.Apply a translation to this matrix by translating by the given number of units in x, y and z and store the result indest
.Apply a translation to this matrix by translating by the given number of units in x, y and z and store the result indest
.Apply a translation to this matrix by translating by the given number of units in x, y and z and store the result indest
.Matrix4f.translateLocal
(float x, float y, float z, Matrix4f dest) Pre-multiply a translation to this matrix by translating by the given number of units in x, y and z and store the result indest
.Matrix4f.translateLocal
(Vector3fc offset, Matrix4f dest) Pre-multiply a translation to this matrix by translating by the given number of units in x, y and z and store the result indest
.Matrix4fc.translateLocal
(float x, float y, float z, Matrix4f dest) Pre-multiply a translation to this matrix by translating by the given number of units in x, y and z and store the result indest
.Matrix4fc.translateLocal
(Vector3fc offset, Matrix4f dest) Pre-multiply a translation to this matrix by translating by the given number of units in x, y and z and store the result indest
.Matrix4f.translationRotateScaleMulAffine
(float tx, float ty, float tz, float qx, float qy, float qz, float qw, float sx, float sy, float sz, Matrix4f m) Setthis
matrix toT * R * S * M
, whereT
is a translation by the given(tx, ty, tz)
,R
is a rotation - and possibly scaling - transformation specified by the quaternion(qx, qy, qz, qw)
,S
is a scaling transformation which scales the three axes x, y and z by(sx, sy, sz)
andM
is anaffine
matrix.Matrix4f.translationRotateScaleMulAffine
(Vector3fc translation, Quaternionfc quat, Vector3fc scale, Matrix4f m) Setthis
matrix toT * R * S * M
, whereT
is the giventranslation
,R
is a rotation - and possibly scaling - transformation specified by the given quaternion,S
is a scaling transformation which scales the axes byscale
andM
is anaffine
matrix.Transpose this matrix and store the result indest
.Matrix4f.transpose3x3
(Matrix4f dest) Matrix4fc.transpose3x3
(Matrix4f dest) Transpose only the upper left 3x3 submatrix of this matrix and store the result indest
.Matrix4f.withLookAtUp
(float upX, float upY, float upZ, Matrix4f dest) Matrix4f.withLookAtUp
(Vector3fc up, Matrix4f dest) Matrix4fc.withLookAtUp
(float upX, float upY, float upZ, Matrix4f dest) Apply a transformation to this matrix to ensure that the local Y axis (as obtained byMatrix4fc.positiveY(Vector3f)
) will be coplanar to the plane spanned by the local Z axis (as obtained byMatrix4fc.positiveZ(Vector3f)
) and the given vector(upX, upY, upZ)
, and store the result indest
.Matrix4fc.withLookAtUp
(Vector3fc up, Matrix4f dest) Apply a transformation to this matrix to ensure that the local Y axis (as obtained byMatrix4fc.positiveY(Vector3f)
) will be coplanar to the plane spanned by the local Z axis (as obtained byMatrix4fc.positiveZ(Vector3f)
) and the given vectorup
, and store the result indest
.