Uses of Class
org.joml.Matrix4d
Packages that use Matrix4d
-
Uses of Matrix4d 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
.Component-wise add the upper 4x3 submatrices ofthis
andother
and store the result indest
.Component-wise add the upper 4x3 submatrices ofthis
andother
and store the result indest
.Matrix4d.affineSpan
(Vector3d corner, Vector3d xDir, Vector3d yDir, Vector3d 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
.Matrix4d.arcball
(double radius, double centerX, double centerY, double centerZ, double angleX, double 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.Matrix4d.arcball
(double radius, double centerX, double centerY, double centerZ, double angleX, double angleY, Matrix4d 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.Matrix4dc.arcball
(double radius, double centerX, double centerY, double centerZ, double angleX, double angleY, Matrix4d 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
.Matrix4d.assume
(int properties) Assume the given properties about this matrix.Matrix4d.billboardCylindrical
(Vector3dc objPos, Vector3dc targetPos, Vector3dc 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.Matrix4d.billboardSpherical
(Vector3dc objPos, Vector3dc 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.Matrix4d.billboardSpherical
(Vector3dc objPos, Vector3dc targetPos, Vector3dc 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
.Matrix4d.cofactor3x3()
Compute the cofactor matrix of the upper left 3x3 submatrix ofthis
.Matrix4d.cofactor3x3
(Matrix4d dest) Compute the cofactor matrix of the upper left 3x3 submatrix ofthis
and store it intodest
.Matrix4dc.cofactor3x3
(Matrix4d dest) Compute the cofactor matrix of the upper left 3x3 submatrix ofthis
and store it intodest
.Matrix4d.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
.Matrix4d.frustum
(double left, double right, double bottom, double top, double zNear, double 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.Matrix4d.frustum
(double left, double right, double bottom, double top, double zNear, double 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.Matrix4d.frustum
(double left, double right, double bottom, double top, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4d.frustum
(double left, double right, double bottom, double top, double zNear, double zFar, Matrix4d 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
.Matrix4dc.frustum
(double left, double right, double bottom, double top, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4dc.frustum
(double left, double right, double bottom, double top, double zNear, double zFar, Matrix4d 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
.Matrix4d.frustumAabb
(Vector3d min, Vector3d 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.Matrix4d.frustumLH
(double left, double right, double bottom, double top, double zNear, double zFar) Apply an arbitrary perspective projection frustum transformation for a left-handed coordinate system using the given NDC z range to this matrix.Matrix4d.frustumLH
(double left, double right, double bottom, double top, double zNear, double 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.Matrix4d.frustumLH
(double left, double right, double bottom, double top, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4d.frustumLH
(double left, double right, double bottom, double top, double zNear, double zFar, Matrix4d 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
.Matrix4dc.frustumLH
(double left, double right, double bottom, double top, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4dc.frustumLH
(double left, double right, double bottom, double top, double zNear, double zFar, Matrix4d 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 givenMatrix4d
to a rotation transformation equivalent to thisAxisAngle4d
.Set the givenMatrix4d
to a rotation transformation equivalent to thisAxisAngle4f
.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 intodest
.Get the current values ofthis
matrix and store them into the upper 4x3 submatrix ofdest
.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
.Matrix4d.identity()
Reset this matrix to the identity.Matrix4d.invert()
Invert this matrix.Invertthis
matrix and store the result indest
.Matrix4d.invertAffine()
Invert this matrix by assuming that it is anaffine
transformation (i.e.Matrix4d.invertAffine
(Matrix4d dest) Matrix4dc.invertAffine
(Matrix4d dest) Invert this matrix by assuming that it is anaffine
transformation (i.e.Matrix4d.invertFrustum()
Ifthis
is an arbitrary perspective projection matrix obtained via one of thefrustum()
methods or viasetFrustum()
, then this method builds the inverse ofthis
.Matrix4d.invertFrustum
(Matrix4d dest) Matrix4dc.invertFrustum
(Matrix4d 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
.Matrix4d.invertOrtho()
Invertthis
orthographic projection matrix.Matrix4d.invertOrtho
(Matrix4d dest) Matrix4dc.invertOrtho
(Matrix4d dest) Invertthis
orthographic projection matrix and store the result into the givendest
.Matrix4d.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
.Matrix4d.invertPerspective
(Matrix4d dest) Matrix4dc.invertPerspective
(Matrix4d 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
.Matrix4d.invertPerspectiveView
(Matrix4dc view, Matrix4d dest) Matrix4d.invertPerspectiveView
(Matrix4x3dc view, Matrix4d dest) Matrix4dc.invertPerspectiveView
(Matrix4dc view, Matrix4d 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
.Matrix4dc.invertPerspectiveView
(Matrix4x3dc view, Matrix4d 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
.Matrix4d.lookAlong
(double dirX, double dirY, double dirZ, double upX, double upY, double upZ) Apply a rotation transformation to this matrix to make-z
point alongdir
.Matrix4d.lookAlong
(double dirX, double dirY, double dirZ, double upX, double upY, double upZ, Matrix4d 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
.Matrix4dc.lookAlong
(double dirX, double dirY, double dirZ, double upX, double upY, double upZ, Matrix4d 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
.Matrix4d.lookAt
(double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ) Apply a "lookat" transformation to this matrix for a right-handed coordinate system, that aligns-z
withcenter - eye
.Matrix4d.lookAt
(double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ, Matrix4d 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
.Matrix4dc.lookAt
(double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ, Matrix4d 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
.Matrix4d.lookAtLH
(double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ) Apply a "lookat" transformation to this matrix for a left-handed coordinate system, that aligns+z
withcenter - eye
.Matrix4d.lookAtLH
(double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ, Matrix4d 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
.Matrix4dc.lookAtLH
(double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ, Matrix4d 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
.Matrix4d.lookAtPerspective
(double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ, Matrix4d dest) Apply a "lookat" transformation to this matrix for a right-handed coordinate system, that aligns-z
withcenter - eye
and store the result indest
.Matrix4dc.lookAtPerspective
(double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ, Matrix4d dest) Apply a "lookat" transformation to this matrix for a right-handed coordinate system, that aligns-z
withcenter - eye
and store the result indest
.Matrix4d.lookAtPerspectiveLH
(double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ, Matrix4d dest) Apply a "lookat" transformation to this matrix for a left-handed coordinate system, that aligns+z
withcenter - eye
and store the result indest
.Matrix4dc.lookAtPerspectiveLH
(double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ, Matrix4d dest) Apply a "lookat" transformation to this matrix for a left-handed coordinate system, that aligns+z
withcenter - eye
and store the result indest
.Matrix4d.m00
(double m00) Set the value of the matrix element at column 0 and row 0.Matrix4d.m01
(double m01) Set the value of the matrix element at column 0 and row 1.Matrix4d.m02
(double m02) Set the value of the matrix element at column 0 and row 2.Matrix4d.m03
(double m03) Set the value of the matrix element at column 0 and row 3.Matrix4d.m10
(double m10) Set the value of the matrix element at column 1 and row 0.Matrix4d.m11
(double m11) Set the value of the matrix element at column 1 and row 1.Matrix4d.m12
(double m12) Set the value of the matrix element at column 1 and row 2.Matrix4d.m13
(double m13) Set the value of the matrix element at column 1 and row 3.Matrix4d.m20
(double m20) Set the value of the matrix element at column 2 and row 0.Matrix4d.m21
(double m21) Set the value of the matrix element at column 2 and row 1.Matrix4d.m22
(double m22) Set the value of the matrix element at column 2 and row 2.Matrix4d.m23
(double m23) Set the value of the matrix element at column 2 and row 3.Matrix4d.m30
(double m30) Set the value of the matrix element at column 3 and row 0.Matrix4d.m31
(double m31) Set the value of the matrix element at column 3 and row 1.Matrix4d.m32
(double m32) Set the value of the matrix element at column 3 and row 2.Matrix4d.m33
(double m33) Set the value of the matrix element at column 3 and row 3.Matrix4d.mapnXnYnZ()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapnXnYZ()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapnXnZnY()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapnXnZY()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapnXYnZ()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapnXZnY()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapnXZY()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapnYnXnZ()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapnYnXZ()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapnYnZnX()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapnYnZX()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapnYXnZ()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapnYXZ()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapnYZnX()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapnYZX()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapnZnXnY()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapnZnXY()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapnZnYnX()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapnZnYX()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapnZXnY()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapnZXY()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapnZYnX()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapnZYX()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapXnYnZ()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapXnZnY()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapXnZY()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapXZnY()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapXZY()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapYnXnZ()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapYnXZ()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapYnZnX()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapYnZX()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapYXnZ()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapYXZ()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapYZnX()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapYZX()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapZnXnY()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapZnXY()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapZnYnX()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapZnYX()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapZXnY()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapZXY()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapZYnX()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mapZYX()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.mul
(double r00, double r01, double r02, double r03, double r10, double r11, double r12, double r13, double r20, double r21, double r22, double r23, double r30, double r31, double r32, double r33) Multiply this matrix by the matrix with the supplied elements.Matrix4d.mul
(double r00, double r01, double r02, double r03, double r10, double r11, double r12, double r13, double r20, double r21, double r22, double r23, double r30, double r31, double r32, double r33, Matrix4d dest) Matrix4d.mul
(Matrix3x2dc right) Multiply this matrix by the suppliedright
matrix and store the result inthis
.Matrix4d.mul
(Matrix3x2dc right, Matrix4d dest) Matrix4d.mul
(Matrix3x2fc right) Multiply this matrix by the suppliedright
matrix and store the result inthis
.Matrix4d.mul
(Matrix3x2fc right, Matrix4d dest) Multiply this matrix by the suppliedright
matrix.Multiply this matrix by the supplied parameter matrix.Matrix4d.mul
(Matrix4x3dc right) Multiply this matrix by the suppliedright
matrix.Matrix4d.mul
(Matrix4x3dc right, Matrix4d dest) Matrix4d.mul
(Matrix4x3fc right, Matrix4d dest) Matrix4dc.mul
(double r00, double r01, double r02, double r03, double r10, double r11, double r12, double r13, double r20, double r21, double r22, double r23, double r30, double r31, double r32, double r33, Matrix4d dest) Multiply this matrix by the matrix with the supplied elements and store the result indest
.Matrix4dc.mul
(Matrix3x2dc right, Matrix4d dest) Multiply this matrix by the suppliedright
matrix and store the result indest
.Matrix4dc.mul
(Matrix3x2fc right, Matrix4d 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
.Multiply this matrix by the supplied parameter matrix and store the result indest
.Matrix4dc.mul
(Matrix4x3dc right, Matrix4d dest) Multiply this matrix by the suppliedright
matrix and store the result indest
.Matrix4dc.mul
(Matrix4x3fc right, Matrix4d 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
.Matrix4d.mul3x3
(double r00, double r01, double r02, double r10, double r11, double r12, double r20, double r21, double 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.Matrix4d.mul3x3
(double r00, double r01, double r02, double r10, double r11, double r12, double r20, double r21, double r22, Matrix4d dest) Matrix4dc.mul3x3
(double r00, double r01, double r02, double r10, double r11, double r12, double r20, double r21, double r22, Matrix4d 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
.Matrix4d.mul4x3ComponentWise
(Matrix4dc other) Component-wise multiply the upper 4x3 submatrices ofthis
byother
.Matrix4d.mul4x3ComponentWise
(Matrix4dc other, Matrix4d dest) Matrix4dc.mul4x3ComponentWise
(Matrix4dc other, Matrix4d 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
.Matrix4d.mulAffineR
(Matrix4dc right) Multiply this matrix by the suppliedright
matrix, which is assumed to beaffine
, and store the result inthis
.Matrix4d.mulAffineR
(Matrix4dc right, Matrix4d dest) Matrix4dc.mulAffineR
(Matrix4dc right, Matrix4d dest) Multiply this matrix by the suppliedright
matrix, which is assumed to beaffine
, and store the result indest
.Matrix4d.mulComponentWise
(Matrix4dc other) Component-wise multiplythis
byother
.Matrix4d.mulComponentWise
(Matrix4dc other, Matrix4d dest) Matrix4dc.mulComponentWise
(Matrix4dc other, Matrix4d 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
.Matrix4d.mulLocalAffine
(Matrix4dc left) Pre-multiply this matrix by the suppliedleft
matrix, both of which are assumed to beaffine
, and store the result inthis
.Matrix4d.mulLocalAffine
(Matrix4dc left, Matrix4d dest) Matrix4dc.mulLocalAffine
(Matrix4dc left, Matrix4d dest) Pre-multiply this matrix by the suppliedleft
matrix, both of which are assumed to beaffine
, and store the result indest
.Matrix4d.mulOrthoAffine
(Matrix4dc view) Matrix4d.mulOrthoAffine
(Matrix4dc view, Matrix4d dest) Matrix4dc.mulOrthoAffine
(Matrix4dc view, Matrix4d dest) Multiplythis
orthographic projection matrix by the suppliedaffine
view
matrix and store the result indest
.Matrix4d.mulPerspectiveAffine
(Matrix4dc view) Matrix4d.mulPerspectiveAffine
(Matrix4dc view, Matrix4d dest) Matrix4d.mulPerspectiveAffine
(Matrix4x3dc view, Matrix4d dest) Matrix4dc.mulPerspectiveAffine
(Matrix4dc view, Matrix4d dest) Multiplythis
symmetric perspective projection matrix by the suppliedaffine
view
matrix and store the result indest
.Matrix4dc.mulPerspectiveAffine
(Matrix4x3dc view, Matrix4d dest) Multiplythis
symmetric perspective projection matrix by the suppliedview
matrix and store the result indest
.Matrix4d.mulTranslationAffine
(Matrix4dc right, Matrix4d dest) Matrix4dc.mulTranslationAffine
(Matrix4dc right, Matrix4d 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
.Matrix4d.negateX()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.negateY()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.negateZ()
Multiplythis
by the matrixMultiplythis
by the matrixMatrix4d.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
.Matrix4d.normalize3x3()
Normalize the upper left 3x3 submatrix of this matrix.Matrix4d.normalize3x3
(Matrix4d dest) Matrix4dc.normalize3x3
(Matrix4d dest) Normalize the upper left 3x3 submatrix of this matrix and store the result indest
.Matrix4d.obliqueZ
(double a, double 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
.Matrix4d.ortho
(double left, double right, double bottom, double top, double zNear, double zFar) Apply an orthographic projection transformation for a right-handed coordinate system using OpenGL's NDC z range of[-1..+1]
to this matrix.Matrix4d.ortho
(double left, double right, double bottom, double top, double zNear, double zFar, boolean zZeroToOne) Apply an orthographic projection transformation for a right-handed coordinate system using the given NDC z range to this matrix.Matrix4d.ortho
(double left, double right, double bottom, double top, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4d.ortho
(double left, double right, double bottom, double top, double zNear, double zFar, Matrix4d 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
.Matrix4dc.ortho
(double left, double right, double bottom, double top, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4dc.ortho
(double left, double right, double bottom, double top, double zNear, double zFar, Matrix4d 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
.Matrix4d.ortho2D
(double left, double right, double bottom, double 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
.Matrix4d.ortho2DLH
(double left, double right, double bottom, double 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.Matrix4d.orthoLH
(double left, double right, double bottom, double top, double zNear, double zFar) Apply an orthographic projection transformation for a left-handed coordiante system using OpenGL's NDC z range of[-1..+1]
to this matrix.Matrix4d.orthoLH
(double left, double right, double bottom, double top, double zNear, double zFar, boolean zZeroToOne) Apply an orthographic projection transformation for a left-handed coordiante system using the given NDC z range to this matrix.Matrix4d.orthoLH
(double left, double right, double bottom, double top, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4d.orthoLH
(double left, double right, double bottom, double top, double zNear, double zFar, Matrix4d 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
.Matrix4dc.orthoLH
(double left, double right, double bottom, double top, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4dc.orthoLH
(double left, double right, double bottom, double top, double zNear, double zFar, Matrix4d 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
.Matrix4d.orthoSymmetric
(double width, double height, double zNear, double 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.Matrix4d.orthoSymmetric
(double width, double height, double zNear, double zFar, boolean zZeroToOne) Apply a symmetric orthographic projection transformation for a right-handed coordinate system using the given NDC z range to this matrix.Matrix4d.orthoSymmetric
(double width, double height, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4d.orthoSymmetric
(double width, double height, double zNear, double zFar, Matrix4d 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
.Matrix4dc.orthoSymmetric
(double width, double height, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4dc.orthoSymmetric
(double width, double height, double zNear, double zFar, Matrix4d 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
.Matrix4d.orthoSymmetricLH
(double width, double height, double zNear, double 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.Matrix4d.orthoSymmetricLH
(double width, double height, double zNear, double zFar, boolean zZeroToOne) Apply a symmetric orthographic projection transformation for a left-handed coordinate system using the given NDC z range to this matrix.Matrix4d.orthoSymmetricLH
(double width, double height, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4d.orthoSymmetricLH
(double width, double height, double zNear, double zFar, Matrix4d 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
.Matrix4dc.orthoSymmetricLH
(double width, double height, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4dc.orthoSymmetricLH
(double width, double height, double zNear, double zFar, Matrix4d 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
.Matrix4d.perspective
(double fovy, double aspect, double zNear, double 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.Matrix4d.perspective
(double fovy, double aspect, double zNear, double 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.Matrix4d.perspective
(double fovy, double aspect, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4d.perspective
(double fovy, double aspect, double zNear, double zFar, Matrix4d 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
.Matrix4dc.perspective
(double fovy, double aspect, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4dc.perspective
(double fovy, double aspect, double zNear, double zFar, Matrix4d 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
.Matrix4d.perspectiveFrustumSlice
(double near, double far, Matrix4d dest) Matrix4dc.perspectiveFrustumSlice
(double near, double far, Matrix4d dest) Change the near and far clip plane distances ofthis
perspective frustum transformation matrix and store the result indest
.Matrix4d.perspectiveLH
(double fovy, double aspect, double zNear, double 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.Matrix4d.perspectiveLH
(double fovy, double aspect, double zNear, double 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.Matrix4d.perspectiveLH
(double fovy, double aspect, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4d.perspectiveLH
(double fovy, double aspect, double zNear, double zFar, Matrix4d 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
.Matrix4dc.perspectiveLH
(double fovy, double aspect, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4dc.perspectiveLH
(double fovy, double aspect, double zNear, double zFar, Matrix4d 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
.Matrix4d.perspectiveOffCenter
(double fovy, double offAngleX, double offAngleY, double aspect, double zNear, double 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.Matrix4d.perspectiveOffCenter
(double fovy, double offAngleX, double offAngleY, double aspect, double zNear, double 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.Matrix4d.perspectiveOffCenter
(double fovy, double offAngleX, double offAngleY, double aspect, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4d.perspectiveOffCenter
(double fovy, double offAngleX, double offAngleY, double aspect, double zNear, double zFar, Matrix4d 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
.Matrix4dc.perspectiveOffCenter
(double fovy, double offAngleX, double offAngleY, double aspect, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4dc.perspectiveOffCenter
(double fovy, double offAngleX, double offAngleY, double aspect, double zNear, double zFar, Matrix4d 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
.Matrix4d.perspectiveOffCenterFov
(double angleLeft, double angleRight, double angleDown, double angleUp, double zNear, double 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.Matrix4d.perspectiveOffCenterFov
(double angleLeft, double angleRight, double angleDown, double angleUp, double zNear, double 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.Matrix4d.perspectiveOffCenterFov
(double angleLeft, double angleRight, double angleDown, double angleUp, double zNear, double zFar, boolean zZeroToOne, Matrix4d dest) Matrix4d.perspectiveOffCenterFov
(double angleLeft, double angleRight, double angleDown, double angleUp, double zNear, double zFar, Matrix4d dest) Matrix4dc.perspectiveOffCenterFov
(double angleLeft, double angleRight, double angleDown, double angleUp, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4dc.perspectiveOffCenterFov
(double angleLeft, double angleRight, double angleDown, double angleUp, double zNear, double zFar, Matrix4d 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
.Matrix4d.perspectiveOffCenterFovLH
(double angleLeft, double angleRight, double angleDown, double angleUp, double zNear, double 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.Matrix4d.perspectiveOffCenterFovLH
(double angleLeft, double angleRight, double angleDown, double angleUp, double zNear, double 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.Matrix4d.perspectiveOffCenterFovLH
(double angleLeft, double angleRight, double angleDown, double angleUp, double zNear, double zFar, boolean zZeroToOne, Matrix4d dest) Matrix4d.perspectiveOffCenterFovLH
(double angleLeft, double angleRight, double angleDown, double angleUp, double zNear, double zFar, Matrix4d dest) Matrix4dc.perspectiveOffCenterFovLH
(double angleLeft, double angleRight, double angleDown, double angleUp, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4dc.perspectiveOffCenterFovLH
(double angleLeft, double angleRight, double angleDown, double angleUp, double zNear, double zFar, Matrix4d 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
.Matrix4d.perspectiveRect
(double width, double height, double zNear, double 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.Matrix4d.perspectiveRect
(double width, double height, double zNear, double 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.Matrix4d.perspectiveRect
(double width, double height, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4d.perspectiveRect
(double width, double height, double zNear, double zFar, Matrix4d 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
.Matrix4dc.perspectiveRect
(double width, double height, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4dc.perspectiveRect
(double width, double height, double zNear, double zFar, Matrix4d 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
.Matrix4d.pick
(double x, double y, double width, double 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
.Matrix4d.projectedGridRange
(Matrix4dc projector, double sLower, double sUpper, Matrix4d dest) Matrix4dc.projectedGridRange
(Matrix4dc projector, double sLower, double sUpper, Matrix4d 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
.Matrix4d.reflect
(double a, double b, double c, double 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
.Matrix4d.reflect
(double nx, double ny, double nz, double px, double py, double 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.Matrix4d.reflect
(Quaterniondc orientation, Vector3dc 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.Matrix4d.reflect
(Quaterniondc orientation, Vector3dc point, Matrix4d 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
.Matrix4dc.reflect
(Quaterniondc orientation, Vector3dc point, Matrix4d 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
.Matrix4d.reflection
(double a, double b, double c, double 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
.Matrix4d.reflection
(double nx, double ny, double nz, double px, double py, double 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.Matrix4d.reflection
(Quaterniondc orientation, Vector3dc 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.Matrix4d.reflection
(Vector3dc normal, Vector3dc 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.Matrix4d.rotate
(double ang, double x, double y, double z) Apply rotation to this matrix by rotating the given amount of radians about the given axis specified as x, y and z components.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
.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
.Matrix4d.rotate
(AxisAngle4d axisAngle) Apply a rotation transformation, rotating about the givenAxisAngle4d
, to this matrix.Matrix4d.rotate
(AxisAngle4d axisAngle, Matrix4d dest) Apply a rotation transformation, rotating about the givenAxisAngle4d
and store the result indest
.Matrix4d.rotate
(AxisAngle4f axisAngle) Apply a rotation transformation, rotating about the givenAxisAngle4f
, to this matrix.Matrix4d.rotate
(AxisAngle4f axisAngle, Matrix4d dest) Apply a rotation transformation, rotating about the givenAxisAngle4f
and store the result indest
.Matrix4d.rotate
(Quaterniondc quat) Apply the rotation - and possibly scaling - transformation of the givenQuaterniondc
to this matrix.Matrix4d.rotate
(Quaterniondc quat, Matrix4d dest) Apply the rotation - and possibly scaling - transformation of the givenQuaterniondc
to this matrix and store the result indest
.Matrix4d.rotate
(Quaternionfc quat) Apply the rotation - and possibly scaling - transformation of the givenQuaternionfc
to this matrix.Matrix4d.rotate
(Quaternionfc quat, Matrix4d dest) Apply the rotation - and possibly scaling - 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 given axis specified as x, y and z components and store the result indest
.Apply a rotation transformation, rotating the given radians about the specified axis and store the result indest
.Apply a rotation transformation, rotating the given radians about the specified axis and store the result indest
.Matrix4dc.rotate
(AxisAngle4d axisAngle, Matrix4d dest) Apply a rotation transformation, rotating about the givenAxisAngle4d
and store the result indest
.Matrix4dc.rotate
(AxisAngle4f axisAngle, Matrix4d dest) Apply a rotation transformation, rotating about the givenAxisAngle4f
and store the result indest
.Matrix4dc.rotate
(Quaterniondc quat, Matrix4d dest) Apply the rotation - and possibly scaling - transformation of the givenQuaterniondc
to this matrix and store the result indest
.Matrix4dc.rotate
(Quaternionfc quat, Matrix4d dest) Apply the rotation - and possibly scaling - transformation of the givenQuaternionfc
to this matrix and store the result indest
.Matrix4d.rotateAffine
(double ang, double x, double y, double z) Apply rotation to thisaffine
matrix by rotating the given amount of radians about the specified(x, y, z)
axis.Matrix4d.rotateAffine
(double ang, double x, double y, double z, Matrix4d 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
.Matrix4d.rotateAffine
(Quaterniondc quat) Apply the rotation - and possibly scaling - transformation of the givenQuaterniondc
to this matrix.Matrix4d.rotateAffine
(Quaterniondc quat, Matrix4d dest) Apply the rotation - and possibly scaling - transformation of the givenQuaterniondc
to thisaffine
matrix and store the result indest
.Matrix4d.rotateAffine
(Quaternionfc quat) Apply the rotation - and possibly scaling - transformation of the givenQuaternionfc
to this matrix.Matrix4d.rotateAffine
(Quaternionfc quat, Matrix4d dest) Apply the rotation - and possibly scaling - transformation of the givenQuaternionfc
to thisaffine
matrix and store the result indest
.Matrix4dc.rotateAffine
(double ang, double x, double y, double z, Matrix4d 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
.Matrix4dc.rotateAffine
(Quaterniondc quat, Matrix4d dest) Apply the rotation - and possibly scaling - transformation of the givenQuaterniondc
to thisaffine
matrix and store the result indest
.Matrix4dc.rotateAffine
(Quaternionfc quat, Matrix4d dest) Apply the rotation - and possibly scaling - transformation of the givenQuaternionfc
to thisaffine
matrix and store the result indest
.Matrix4d.rotateAffineXYZ
(double angleX, double angleY, double 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.Matrix4d.rotateAffineXYZ
(double angleX, double angleY, double angleZ, Matrix4d dest) Matrix4dc.rotateAffineXYZ
(double angleX, double angleY, double angleZ, Matrix4d 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
.Matrix4d.rotateAffineYXZ
(double angleY, double angleX, double 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.Matrix4d.rotateAffineYXZ
(double angleY, double angleX, double angleZ, Matrix4d dest) Matrix4dc.rotateAffineYXZ
(double angleY, double angleX, double angleZ, Matrix4d 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
.Matrix4d.rotateAffineZYX
(double angleZ, double angleY, double 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.Matrix4d.rotateAffineZYX
(double angleZ, double angleY, double angleX, Matrix4d dest) Matrix4dc.rotateAffineZYX
(double angleZ, double angleY, double angleX, Matrix4d 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
.Matrix4d.rotateAround
(Quaterniondc quat, double ox, double oy, double oz) Apply the rotation transformation of the givenQuaterniondc
to this matrix while using(ox, oy, oz)
as the rotation origin.Matrix4d.rotateAround
(Quaterniondc quat, double ox, double oy, double oz, Matrix4d dest) Matrix4dc.rotateAround
(Quaterniondc quat, double ox, double oy, double oz, Matrix4d dest) Apply the rotation - and possibly scaling - transformation of the givenQuaterniondc
to this matrix while using(ox, oy, oz)
as the rotation origin, and store the result indest
.Matrix4d.rotateAroundAffine
(Quaterniondc quat, double ox, double oy, double oz, Matrix4d dest) Matrix4dc.rotateAroundAffine
(Quaterniondc quat, double ox, double oy, double oz, Matrix4d dest) Apply the rotation - and possibly scaling - transformation of the givenQuaterniondc
to thisaffine
matrix while using(ox, oy, oz)
as the rotation origin, and store the result indest
.Matrix4d.rotateAroundLocal
(Quaterniondc quat, double ox, double oy, double oz) Pre-multiply the rotation - and possibly scaling - transformation of the givenQuaterniondc
to this matrix while using(ox, oy, oz)
as the rotation origin.Matrix4d.rotateAroundLocal
(Quaterniondc quat, double ox, double oy, double oz, Matrix4d dest) Matrix4dc.rotateAroundLocal
(Quaterniondc quat, double ox, double oy, double oz, Matrix4d dest) Pre-multiply the rotation - and possibly scaling - transformation of the givenQuaterniondc
to this matrix while using(ox, oy, oz)
as the rotation origin, and store the result indest
.Matrix4d.rotateLocal
(double ang, double x, double y, double z) Pre-multiply a rotation to this matrix by rotating the given amount of radians about the specified(x, y, z)
axis.Matrix4d.rotateLocal
(double ang, double x, double y, double z, Matrix4d 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
.Matrix4d.rotateLocal
(Quaterniondc quat) Pre-multiply the rotation - and possibly scaling - transformation of the givenQuaterniondc
to this matrix.Matrix4d.rotateLocal
(Quaterniondc quat, Matrix4d dest) Pre-multiply the rotation - and possibly scaling - transformation of the givenQuaterniondc
to this matrix and store the result indest
.Matrix4d.rotateLocal
(Quaternionfc quat) Pre-multiply the rotation - and possibly scaling - transformation of the givenQuaternionfc
to this matrix.Matrix4d.rotateLocal
(Quaternionfc quat, Matrix4d dest) Pre-multiply the rotation - and possibly scaling - transformation of the givenQuaternionfc
to this matrix and store the result indest
.Matrix4dc.rotateLocal
(double ang, double x, double y, double z, Matrix4d 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
.Matrix4dc.rotateLocal
(Quaterniondc quat, Matrix4d dest) Pre-multiply the rotation - and possibly scaling - transformation of the givenQuaterniondc
to this matrix and store the result indest
.Matrix4dc.rotateLocal
(Quaternionfc quat, Matrix4d dest) Pre-multiply the rotation - and possibly scaling - transformation of the givenQuaternionfc
to this matrix and store the result indest
.Matrix4d.rotateLocalX
(double ang) Pre-multiply a rotation to this matrix by rotating the given amount of radians about the X axis.Matrix4d.rotateLocalX
(double ang, Matrix4d 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
.Matrix4dc.rotateLocalX
(double ang, Matrix4d 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
.Matrix4d.rotateLocalY
(double ang) Pre-multiply a rotation to this matrix by rotating the given amount of radians about the Y axis.Matrix4d.rotateLocalY
(double ang, Matrix4d 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
.Matrix4dc.rotateLocalY
(double ang, Matrix4d 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
.Matrix4d.rotateLocalZ
(double ang) Pre-multiply a rotation to this matrix by rotating the given amount of radians about the Z axis.Matrix4d.rotateLocalZ
(double ang, Matrix4d 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
.Matrix4dc.rotateLocalZ
(double ang, Matrix4d 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
.Matrix4d.rotateTowards
(double dirX, double dirY, double dirZ, double upX, double upY, double upZ) Apply a model transformation to this matrix for a right-handed coordinate system, that aligns the local+Z
axis with(dirX, dirY, dirZ)
.Matrix4d.rotateTowards
(double dirX, double dirY, double dirZ, double upX, double upY, double upZ, Matrix4d 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
.Matrix4d.rotateTowards
(Vector3dc direction, Vector3dc up) Apply a model transformation to this matrix for a right-handed coordinate system, that aligns the local+Z
axis withdirection
.Matrix4d.rotateTowards
(Vector3dc direction, Vector3dc up, Matrix4d dest) Apply a model transformation to this matrix for a right-handed coordinate system, that aligns the local+Z
axis withdirection
and store the result indest
.Matrix4dc.rotateTowards
(double dirX, double dirY, double dirZ, double upX, double upY, double upZ, Matrix4d 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
.Matrix4dc.rotateTowards
(Vector3dc direction, Vector3dc up, Matrix4d dest) Apply a model transformation to this matrix for a right-handed coordinate system, that aligns the local+Z
axis withdirection
and store the result indest
.Matrix4d.rotateTowardsXY
(double dirX, double dirY) Apply rotation about the Z axis to align the local+X
towards(dirX, dirY)
.Matrix4d.rotateTowardsXY
(double dirX, double dirY, Matrix4d dest) Matrix4dc.rotateTowardsXY
(double dirX, double dirY, Matrix4d dest) Apply rotation about the Z axis to align the local+X
towards(dirX, dirY)
and store the result indest
.Matrix4d.rotateTranslation
(double ang, double x, double y, double z, Matrix4d 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
.Matrix4d.rotateTranslation
(Quaterniondc quat, Matrix4d dest) Apply the rotation - and possibly scaling - transformation of the givenQuaterniondc
to this matrix, which is assumed to only contain a translation, and store the result indest
.Matrix4d.rotateTranslation
(Quaternionfc quat, Matrix4d dest) Apply the rotation - and possibly scaling - transformation of the givenQuaternionfc
to this matrix, which is assumed to only contain a translation, and store the result indest
.Matrix4dc.rotateTranslation
(double ang, double x, double y, double z, Matrix4d 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
.Matrix4dc.rotateTranslation
(Quaterniondc quat, Matrix4d dest) Apply the rotation - and possibly scaling - transformation of the givenQuaterniondc
to this matrix, which is assumed to only contain a translation, and store the result indest
.Matrix4dc.rotateTranslation
(Quaternionfc quat, Matrix4d dest) Apply the rotation - and possibly scaling - transformation of the givenQuaternionfc
to this matrix, which is assumed to only contain a translation, and store the result indest
.Matrix4d.rotateX
(double 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
.Matrix4d.rotateXYZ
(double angleX, double angleY, double 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
.Matrix4d.rotateY
(double 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
.Matrix4d.rotateYXZ
(double angleY, double angleX, double 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
.Matrix4d.rotateZ
(double 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
.Matrix4d.rotateZYX
(double angleZ, double angleY, double 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
.Matrix4d.rotation
(double angle, double x, double y, double 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.Set this matrix to a rotation matrix which rotates the given radians about a given axis.Matrix4d.rotation
(AxisAngle4d angleAxis) Set this matrix to a rotation transformation using the givenAxisAngle4d
.Matrix4d.rotation
(AxisAngle4f angleAxis) Set this matrix to a rotation transformation using the givenAxisAngle4f
.Matrix4d.rotation
(Quaterniondc quat) Set this matrix to the rotation - and possibly scaling - transformation of the givenQuaterniondc
.Matrix4d.rotation
(Quaternionfc quat) Set this matrix to the rotation - and possibly scaling - transformation of the givenQuaternionfc
.Matrix4d.rotationAround
(Quaterniondc quat, double ox, double oy, double oz) Set this matrix to a transformation composed of a rotation of the specifiedQuaterniondc
while using(ox, oy, oz)
as the rotation origin.Matrix4d.rotationTowards
(double dirX, double dirY, double dirZ, double upX, double upY, double upZ) Set this matrix to a model transformation for a right-handed coordinate system, that aligns the local-z
axis withdir
.Matrix4d.rotationTowards
(Vector3dc dir, Vector3dc up) Set this matrix to a model transformation for a right-handed coordinate system, that aligns the local-z
axis withdir
.Matrix4d.rotationTowardsXY
(double dirX, double dirY) Set this matrix to a rotation transformation about the Z axis to align the local+X
towards(dirX, dirY)
.Matrix4d.rotationX
(double ang) Set this matrix to a rotation transformation about the X axis.Matrix4d.rotationXYZ
(double angleX, double angleY, double 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.Matrix4d.rotationY
(double ang) Set this matrix to a rotation transformation about the Y axis.Matrix4d.rotationYXZ
(double angleY, double angleX, double 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.Matrix4d.rotationZ
(double ang) Set this matrix to a rotation transformation about the Z axis.Matrix4d.rotationZYX
(double angleZ, double angleY, double 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.Matrix4d.scale
(double xyz) Apply scaling to this matrix by uniformly scaling all base axes by the given xyz factor.Matrix4d.scale
(double x, double y, double z) Apply scaling tothis
matrix by scaling the base axes by the given x, y and z 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 given xyz 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
.Matrix4d.scaleAround
(double factor, double ox, double oy, double oz) Apply scaling to this matrix by scaling all three base axes by the givenfactor
while using(ox, oy, oz)
as the scaling origin.Matrix4d.scaleAround
(double sx, double sy, double sz, double ox, double oy, double 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.Matrix4d.scaleAround
(double sx, double sy, double sz, double ox, double oy, double oz, Matrix4d dest) Matrix4d.scaleAround
(double factor, double ox, double oy, double oz, Matrix4d dest) Matrix4dc.scaleAround
(double sx, double sy, double sz, double ox, double oy, double oz, Matrix4d 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
.Matrix4dc.scaleAround
(double factor, double ox, double oy, double oz, Matrix4d 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
.Matrix4d.scaleAroundLocal
(double factor, double ox, double oy, double 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.Matrix4d.scaleAroundLocal
(double sx, double sy, double sz, double ox, double oy, double 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.Matrix4d.scaleAroundLocal
(double sx, double sy, double sz, double ox, double oy, double oz, Matrix4d dest) Matrix4d.scaleAroundLocal
(double factor, double ox, double oy, double oz, Matrix4d dest) Matrix4dc.scaleAroundLocal
(double sx, double sy, double sz, double ox, double oy, double oz, Matrix4d 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
.Matrix4dc.scaleAroundLocal
(double factor, double ox, double oy, double oz, Matrix4d 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
.Matrix4d.scaleLocal
(double xyz) Pre-multiply scaling to this matrix by scaling the base axes by the given xyz factor.Matrix4d.scaleLocal
(double x, double y, double z) Pre-multiply scaling to this matrix by scaling the base axes by the given x, y and z factors.Matrix4d.scaleLocal
(double x, double y, double z, Matrix4d dest) Matrix4d.scaleLocal
(double xyz, Matrix4d dest) Matrix4dc.scaleLocal
(double x, double y, double z, Matrix4d dest) Pre-multiply scaling tothis
matrix by scaling the base axes by the given x, y and z factors and store the result indest
.Matrix4dc.scaleLocal
(double xyz, Matrix4d dest) Pre-multiply scaling tothis
matrix by scaling all base axes by the givenxyz
factor, and store the result indest
.Matrix4d.scaleXY
(double x, double 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
.Matrix4d.scaling
(double factor) Set this matrix to be a simple scale matrix, which scales all axes uniformly by the given factor.Matrix4d.scaling
(double x, double y, double 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.Matrix4d.set
(double[] m) Set the values in the matrix using a double array that contains the matrix elements in column-major order.Matrix4d.set
(double[] m, int off) Set the values in the matrix using a double array that contains the matrix elements in column-major order.Matrix4d.set
(double m00, double m01, double m02, double m03, double m10, double m11, double m12, double m13, double m20, double m21, double m22, double m23, double m30, double m31, double m32, double m33) Set the values within this matrix to the supplied double values.Matrix4d.set
(float[] m) Set the values in the matrix using a float array that contains the matrix elements in column-major order.Matrix4d.set
(float[] m, int off) Set the values in the matrix using a float array that contains the matrix elements in column-major order.Matrix4d.set
(int column, int row, double value) Set the matrix element at the given column and row to the specified value.Matrix4d.set
(int index, ByteBuffer buffer) Set the values of this matrix by reading 16 double values from the givenByteBuffer
in column-major order, starting at the specified absolute buffer position/index.Matrix4d.set
(int index, DoubleBuffer buffer) Set the values of this matrix by reading 16 double values from the givenDoubleBuffer
in column-major order, starting at the specified absolute buffer position/index.Matrix4d.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.Matrix4d.set
(ByteBuffer buffer) Set the values of this matrix by reading 16 double values from the givenByteBuffer
in column-major order, starting at its current position.Matrix4d.set
(DoubleBuffer buffer) Set the values of this matrix by reading 16 double values from the givenDoubleBuffer
in column-major order, starting at its current position.Matrix4d.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.Matrix4d.set
(AxisAngle4d axisAngle) Set this matrix to be equivalent to the rotation specified by the givenAxisAngle4d
.Matrix4d.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.Matrix4d.set
(Matrix4x3dc m) Store the values of the given matrixm
intothis
matrix and set the other matrix elements to identity.Matrix4d.set
(Matrix4x3fc m) Store the values of the given matrixm
intothis
matrix and set the other matrix elements to identity.Matrix4d.set
(Quaterniondc q) Set this matrix to be equivalent to the rotation - and possibly scaling - specified by the givenQuaterniondc
.Matrix4d.set
(Quaternionfc q) Set this matrix to be equivalent to the rotation - and possibly scaling - specified by the givenQuaternionfc
.Set the four columns of this matrix to the supplied vectors, respectively.Matrix4d.set4x3
(Matrix4x3dc mat) Set the upper 4x3 submatrix of thisMatrix4d
to the givenMatrix4x3dc
and don't change the other elements.Matrix4d.set4x3
(Matrix4x3fc mat) Set the upper 4x3 submatrix of thisMatrix4d
to the givenMatrix4x3fc
and don't change the other elements.Set the column at the givencolumn
index, starting with0
.Matrix4d.setFloats
(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.Matrix4d.setFloats
(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.Matrix4d.setFromAddress
(long address) Set the values of this matrix by reading 16 double values from off-heap memory in column-major order, starting at the given address.Matrix4d.setFromIntrinsic
(double alphaX, double alphaY, double gamma, double u0, double v0, int imgWidth, int imgHeight, double near, double far) Set this matrix to represent a perspective projection equivalent to the given intrinsic camera calibration parameters.Matrix4d.setFrustum
(double left, double right, double bottom, double top, double zNear, double 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]
.Matrix4d.setFrustum
(double left, double right, double bottom, double top, double zNear, double 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.Matrix4d.setFrustumLH
(double left, double right, double bottom, double top, double zNear, double 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]
.Matrix4d.setFrustumLH
(double left, double right, double bottom, double top, double zNear, double 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]
.Matrix4d.setLookAlong
(double dirX, double dirY, double dirZ, double upX, double upY, double upZ) Set this matrix to a rotation transformation to make-z
point alongdir
.Matrix4d.setLookAlong
(Vector3dc dir, Vector3dc up) Set this matrix to a rotation transformation to make-z
point alongdir
.Matrix4d.setLookAt
(double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double 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
.Matrix4d.setLookAtLH
(double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ) Set this matrix to be a "lookat" transformation for a left-handed coordinate system, that aligns+z
withcenter - eye
.Matrix4d.setLookAtLH
(Vector3dc eye, Vector3dc center, Vector3dc up) Set this matrix to be a "lookat" transformation for a left-handed coordinate system, that aligns+z
withcenter - eye
.Matrix4d.setOrtho
(double left, double right, double bottom, double top, double zNear, double 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]
.Matrix4d.setOrtho
(double left, double right, double bottom, double top, double zNear, double zFar, boolean zZeroToOne) Set this matrix to be an orthographic projection transformation for a right-handed coordinate system using the given NDC z range.Matrix4d.setOrtho2D
(double left, double right, double bottom, double top) Set this matrix to be an orthographic projection transformation for a right-handed coordinate system.Matrix4d.setOrtho2DLH
(double left, double right, double bottom, double top) Set this matrix to be an orthographic projection transformation for a left-handed coordinate system.Matrix4d.setOrthoLH
(double left, double right, double bottom, double top, double zNear, double 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]
.Matrix4d.setOrthoLH
(double left, double right, double bottom, double top, double zNear, double zFar, boolean zZeroToOne) Set this matrix to be an orthographic projection transformation for a left-handed coordinate system using the given NDC z range.Matrix4d.setOrthoSymmetric
(double width, double height, double zNear, double 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]
.Matrix4d.setOrthoSymmetric
(double width, double height, double zNear, double 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.Matrix4d.setOrthoSymmetricLH
(double width, double height, double zNear, double 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]
.Matrix4d.setOrthoSymmetricLH
(double width, double height, double zNear, double 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.Matrix4d.setPerspective
(double fovy, double aspect, double zNear, double 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]
.Matrix4d.setPerspective
(double fovy, double aspect, double zNear, double 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.Matrix4d.setPerspectiveLH
(double fovy, double aspect, double zNear, double 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]
.Matrix4d.setPerspectiveLH
(double fovy, double aspect, double zNear, double 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]
.Matrix4d.setPerspectiveOffCenter
(double fovy, double offAngleX, double offAngleY, double aspect, double zNear, double 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]
.Matrix4d.setPerspectiveOffCenter
(double fovy, double offAngleX, double offAngleY, double aspect, double zNear, double 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.Matrix4d.setPerspectiveOffCenterFov
(double angleLeft, double angleRight, double angleDown, double angleUp, double zNear, double 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]
.Matrix4d.setPerspectiveOffCenterFov
(double angleLeft, double angleRight, double angleDown, double angleUp, double zNear, double 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.Matrix4d.setPerspectiveOffCenterFovLH
(double angleLeft, double angleRight, double angleDown, double angleUp, double zNear, double 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]
.Matrix4d.setPerspectiveOffCenterFovLH
(double angleLeft, double angleRight, double angleDown, double angleUp, double zNear, double 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.Matrix4d.setPerspectiveRect
(double width, double height, double zNear, double 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]
.Matrix4d.setPerspectiveRect
(double width, double height, double zNear, double 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.Matrix4d.setRotationXYZ
(double angleX, double angleY, double 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.Matrix4d.setRotationYXZ
(double angleY, double angleX, double 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.Matrix4d.setRotationZYX
(double angleZ, double angleY, double 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
.Matrix4d.setRowColumn
(int row, int column, double value) Set the matrix element at the given row and column to the specified value.Matrix4d.setTranslation
(double x, double y, double z) Set only the translation components(m30, m31, m32)
of this matrix to the given values(x, y, z)
.Matrix4d.setTranslation
(Vector3dc xyz) Set only the translation components(m30, m31, m32)
of this matrix to the given values(xyz.x, xyz.y, xyz.z)
.Matrix4d.setTransposed
(Matrix4dc m) Store the values of the transpose of the given matrixm
intothis
matrix.Matrix4d.shadow
(double lightX, double lightY, double lightZ, double lightW, double a, double b, double c, double 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)
.Matrix4d.shadow
(double lightX, double lightY, double lightZ, double lightW, double a, double b, double c, double d, Matrix4d dest) Matrix4d.shadow
(double lightX, double lightY, double lightZ, double lightW, Matrix4dc planeTransform) 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)
.Matrix4d.shadow
(double lightX, double lightY, double lightZ, double lightW, Matrix4dc planeTransform, Matrix4d 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
.Matrix4dc.shadow
(double lightX, double lightY, double lightZ, double lightW, double a, double b, double c, double d, Matrix4d 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
.Matrix4dc.shadow
(double lightX, double lightY, double lightZ, double lightW, Matrix4dc planeTransform, Matrix4d 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.Matrix4d.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)
Matrix4d.transformAab
(double minX, double minY, double minZ, double maxX, double maxY, double maxZ, Vector3d outMin, Vector3d outMax) Matrix4d.transformAab
(Vector3dc min, Vector3dc max, Vector3d outMin, Vector3d outMax) Matrix4dc.transformAab
(double minX, double minY, double minZ, double maxX, double maxY, double maxZ, Vector3d outMin, Vector3d 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
.Matrix4dc.transformAab
(Vector3dc min, Vector3dc max, Vector3d outMin, Vector3d 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
.Matrix4d.translate
(double x, double y, double 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.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
.Matrix4d.translateLocal
(double x, double y, double z) Pre-multiply a translation to this matrix by translating by the given number of units in x, y and z.Matrix4d.translateLocal
(double x, double y, double z, Matrix4d 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
.Matrix4d.translateLocal
(Vector3dc offset) Pre-multiply a translation to this matrix by translating by the given number of units in x, y and z.Matrix4d.translateLocal
(Vector3dc offset, Matrix4d 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
.Matrix4d.translateLocal
(Vector3fc offset) Pre-multiply a translation to this matrix by translating by the given number of units in x, y and z.Matrix4d.translateLocal
(Vector3fc offset, Matrix4d 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
.Matrix4dc.translateLocal
(double x, double y, double z, Matrix4d 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
.Matrix4dc.translateLocal
(Vector3dc offset, Matrix4d 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
.Matrix4dc.translateLocal
(Vector3fc offset, Matrix4d 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
.Matrix4d.translation
(double x, double y, double z) Set this matrix to be a simple translation matrix.Matrix4d.translation
(Vector3dc offset) Set this matrix to be a simple translation matrix.Matrix4d.translation
(Vector3fc offset) Set this matrix to be a simple translation matrix.Matrix4d.translationRotate
(double tx, double ty, double tz, double qx, double qy, double qz, double 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)
.Matrix4d.translationRotate
(double tx, double ty, double tz, Quaterniondc 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.Matrix4d.translationRotate
(Vector3dc translation, Quaterniondc quat) Setthis
matrix toT * R
, whereT
is the giventranslation
andR
is a rotation transformation specified by the given quaternion.Matrix4d.translationRotateInvert
(double tx, double ty, double tz, double qx, double qy, double qz, double 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)
.Matrix4d.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.Matrix4d.translationRotateScale
(double tx, double ty, double tz, double qx, double qy, double qz, double qw, double 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
.Matrix4d.translationRotateScale
(double tx, double ty, double tz, double qx, double qy, double qz, double qw, double sx, double sy, double 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)
.Matrix4d.translationRotateScale
(Vector3dc translation, Quaterniondc quat, double 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
.Matrix4d.translationRotateScale
(Vector3dc translation, Quaterniondc quat, Vector3dc 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
.Matrix4d.translationRotateScale
(Vector3fc translation, Quaternionfc quat, double 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
.Matrix4d.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
.Matrix4d.translationRotateScaleInvert
(double tx, double ty, double tz, double qx, double qy, double qz, double qw, double sx, double sy, double 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)
.Matrix4d.translationRotateScaleInvert
(Vector3dc translation, Quaterniondc quat, double 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
.Matrix4d.translationRotateScaleInvert
(Vector3dc translation, Quaterniondc quat, Vector3dc 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
.Matrix4d.translationRotateScaleInvert
(Vector3fc translation, Quaternionfc quat, double 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
.Matrix4d.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
.Matrix4d.translationRotateScaleMulAffine
(double tx, double ty, double tz, double qx, double qy, double qz, double qw, double sx, double sy, double sz, Matrix4d 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.Matrix4d.translationRotateScaleMulAffine
(Vector3fc translation, Quaterniondc quat, Vector3fc scale, Matrix4d 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.Matrix4d.translationRotateTowards
(double posX, double posY, double posZ, double dirX, double dirY, double dirZ, double upX, double upY, double 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)
.Matrix4d.translationRotateTowards
(Vector3dc pos, Vector3dc dir, Vector3dc 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
.Matrix4d.transpose()
Transpose this matrix.Transposethis
matrix and store the result intodest
.Matrix4d.transpose3x3()
Transpose only the upper left 3x3 submatrix of this matrix.Matrix4d.transpose3x3
(Matrix4d dest) Matrix4dc.transpose3x3
(Matrix4d dest) Transpose only the upper left 3x3 submatrix of this matrix and store the result indest
.Matrix4d.trapezoidCrop
(double p0x, double p0y, double p1x, double p1y, double p2x, double p2y, double p3x, double 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)]
.Matrix4d.unprojectInvRay
(double winX, double winY, int[] viewport, Vector3d originDest, Vector3d dirDest) Matrix4d.unprojectInvRay
(Vector2dc winCoords, int[] viewport, Vector3d originDest, Vector3d dirDest) Matrix4dc.unprojectInvRay
(double winX, double winY, int[] viewport, Vector3d originDest, Vector3d 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
.Matrix4dc.unprojectInvRay
(Vector2dc winCoords, int[] viewport, Vector3d originDest, Vector3d 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
.Matrix4d.unprojectRay
(double winX, double winY, int[] viewport, Vector3d originDest, Vector3d dirDest) Matrix4d.unprojectRay
(Vector2dc winCoords, int[] viewport, Vector3d originDest, Vector3d dirDest) Matrix4dc.unprojectRay
(double winX, double winY, int[] viewport, Vector3d originDest, Vector3d 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
.Matrix4dc.unprojectRay
(Vector2dc winCoords, int[] viewport, Vector3d originDest, Vector3d 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
.Matrix4d.withLookAtUp
(double upX, double upY, double upZ) Apply a transformation to this matrix to ensure that the local Y axis (as obtained bypositiveY(Vector3d)
) will be coplanar to the plane spanned by the local Z axis (as obtained bypositiveZ(Vector3d)
) and the given vector(upX, upY, upZ)
.Matrix4d.withLookAtUp
(double upX, double upY, double upZ, Matrix4d dest) Matrix4d.withLookAtUp
(Vector3dc up) Apply a transformation to this matrix to ensure that the local Y axis (as obtained bypositiveY(Vector3d)
) will be coplanar to the plane spanned by the local Z axis (as obtained bypositiveZ(Vector3d)
) and the given vectorup
.Matrix4d.withLookAtUp
(Vector3dc up, Matrix4d dest) Matrix4dc.withLookAtUp
(double upX, double upY, double upZ, Matrix4d dest) Apply a transformation to this matrix to ensure that the local Y axis (as obtained byMatrix4dc.positiveY(Vector3d)
) will be coplanar to the plane spanned by the local Z axis (as obtained byMatrix4dc.positiveZ(Vector3d)
) and the given vector(upX, upY, upZ)
, and store the result indest
.Matrix4dc.withLookAtUp
(Vector3dc up, Matrix4d dest) Apply a transformation to this matrix to ensure that the local Y axis (as obtained byMatrix4dc.positiveY(Vector3d)
) will be coplanar to the plane spanned by the local Z axis (as obtained byMatrix4dc.positiveZ(Vector3d)
) and the given vectorup
, and store the result indest
.Matrix4d.zero()
Set all the values within this matrix to 0.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
.Component-wise add the upper 4x3 submatrices ofthis
andother
and store the result indest
.Matrix4d.arcball
(double radius, double centerX, double centerY, double centerZ, double angleX, double angleY, Matrix4d dest) Matrix4dc.arcball
(double radius, double centerX, double centerY, double centerZ, double angleX, double angleY, Matrix4d 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
.Matrix4d.cofactor3x3
(Matrix4d dest) Compute the cofactor matrix of the upper left 3x3 submatrix ofthis
and store it intodest
.Matrix4dc.cofactor3x3
(Matrix4d 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
.Matrix4d.frustum
(double left, double right, double bottom, double top, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4d.frustum
(double left, double right, double bottom, double top, double zNear, double zFar, Matrix4d 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
.Matrix4dc.frustum
(double left, double right, double bottom, double top, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4dc.frustum
(double left, double right, double bottom, double top, double zNear, double zFar, Matrix4d 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
.Matrix4d.frustumLH
(double left, double right, double bottom, double top, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4d.frustumLH
(double left, double right, double bottom, double top, double zNear, double zFar, Matrix4d 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
.Matrix4dc.frustumLH
(double left, double right, double bottom, double top, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4dc.frustumLH
(double left, double right, double bottom, double top, double zNear, double zFar, Matrix4d 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 givenMatrix4d
to a rotation transformation equivalent to thisAxisAngle4d
.Set the givenMatrix4d
to a rotation transformation equivalent to thisAxisAngle4f
.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 intodest
.Get the current values ofthis
matrix and store them into the upper 4x3 submatrix ofdest
.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
.Invertthis
matrix and store the result indest
.Matrix4d.invertAffine
(Matrix4d dest) Matrix4dc.invertAffine
(Matrix4d dest) Invert this matrix by assuming that it is anaffine
transformation (i.e.Matrix4d.invertFrustum
(Matrix4d dest) Matrix4dc.invertFrustum
(Matrix4d 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
.Matrix4d.invertOrtho
(Matrix4d dest) Matrix4dc.invertOrtho
(Matrix4d dest) Invertthis
orthographic projection matrix and store the result into the givendest
.Matrix4d.invertPerspective
(Matrix4d dest) Matrix4dc.invertPerspective
(Matrix4d 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
.Matrix4d.invertPerspectiveView
(Matrix4dc view, Matrix4d dest) Matrix4d.invertPerspectiveView
(Matrix4x3dc view, Matrix4d dest) Matrix4dc.invertPerspectiveView
(Matrix4dc view, Matrix4d 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
.Matrix4dc.invertPerspectiveView
(Matrix4x3dc view, Matrix4d 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
.Matrix4d.lookAlong
(double dirX, double dirY, double dirZ, double upX, double upY, double upZ, Matrix4d 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
.Matrix4dc.lookAlong
(double dirX, double dirY, double dirZ, double upX, double upY, double upZ, Matrix4d 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
.Matrix4d.lookAt
(double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ, Matrix4d 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
.Matrix4dc.lookAt
(double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ, Matrix4d 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
.Matrix4d.lookAtLH
(double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ, Matrix4d 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
.Matrix4dc.lookAtLH
(double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ, Matrix4d 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
.Matrix4d.lookAtPerspective
(double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ, Matrix4d dest) Apply a "lookat" transformation to this matrix for a right-handed coordinate system, that aligns-z
withcenter - eye
and store the result indest
.Matrix4dc.lookAtPerspective
(double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ, Matrix4d dest) Apply a "lookat" transformation to this matrix for a right-handed coordinate system, that aligns-z
withcenter - eye
and store the result indest
.Matrix4d.lookAtPerspectiveLH
(double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ, Matrix4d dest) Apply a "lookat" transformation to this matrix for a left-handed coordinate system, that aligns+z
withcenter - eye
and store the result indest
.Matrix4dc.lookAtPerspectiveLH
(double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ, Matrix4d 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 matrixMatrix4d.mul
(double r00, double r01, double r02, double r03, double r10, double r11, double r12, double r13, double r20, double r21, double r22, double r23, double r30, double r31, double r32, double r33, Matrix4d dest) Matrix4d.mul
(Matrix3x2dc right, Matrix4d dest) Matrix4d.mul
(Matrix3x2fc right, Matrix4d dest) Matrix4d.mul
(Matrix4x3dc right, Matrix4d dest) Matrix4d.mul
(Matrix4x3fc right, Matrix4d dest) Matrix4dc.mul
(double r00, double r01, double r02, double r03, double r10, double r11, double r12, double r13, double r20, double r21, double r22, double r23, double r30, double r31, double r32, double r33, Matrix4d dest) Multiply this matrix by the matrix with the supplied elements and store the result indest
.Matrix4dc.mul
(Matrix3x2dc right, Matrix4d dest) Multiply this matrix by the suppliedright
matrix and store the result indest
.Matrix4dc.mul
(Matrix3x2fc right, Matrix4d 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
.Multiply this matrix by the supplied parameter matrix and store the result indest
.Matrix4dc.mul
(Matrix4x3dc right, Matrix4d dest) Multiply this matrix by the suppliedright
matrix and store the result indest
.Matrix4dc.mul
(Matrix4x3fc right, Matrix4d 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
.Matrix4d.mul3x3
(double r00, double r01, double r02, double r10, double r11, double r12, double r20, double r21, double r22, Matrix4d dest) Matrix4dc.mul3x3
(double r00, double r01, double r02, double r10, double r11, double r12, double r20, double r21, double r22, Matrix4d 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
.Matrix4d.mul4x3ComponentWise
(Matrix4dc other, Matrix4d dest) Matrix4dc.mul4x3ComponentWise
(Matrix4dc other, Matrix4d 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
.Matrix4d.mulAffineR
(Matrix4dc right, Matrix4d dest) Matrix4dc.mulAffineR
(Matrix4dc right, Matrix4d dest) Multiply this matrix by the suppliedright
matrix, which is assumed to beaffine
, and store the result indest
.Matrix4d.mulComponentWise
(Matrix4dc other, Matrix4d dest) Matrix4dc.mulComponentWise
(Matrix4dc other, Matrix4d dest) Component-wise multiplythis
byother
and store the result indest
.Pre-multiply this matrix by the suppliedleft
matrix and store the result indest
.Matrix4d.mulLocalAffine
(Matrix4dc left, Matrix4d dest) Matrix4dc.mulLocalAffine
(Matrix4dc left, Matrix4d dest) Pre-multiply this matrix by the suppliedleft
matrix, both of which are assumed to beaffine
, and store the result indest
.Matrix4d.mulOrthoAffine
(Matrix4dc view, Matrix4d dest) Matrix4dc.mulOrthoAffine
(Matrix4dc view, Matrix4d dest) Multiplythis
orthographic projection matrix by the suppliedaffine
view
matrix and store the result indest
.Matrix4d.mulPerspectiveAffine
(Matrix4dc view, Matrix4d dest) Matrix4d.mulPerspectiveAffine
(Matrix4x3dc view, Matrix4d dest) Matrix4dc.mulPerspectiveAffine
(Matrix4dc view, Matrix4d dest) Multiplythis
symmetric perspective projection matrix by the suppliedaffine
view
matrix and store the result indest
.Matrix4dc.mulPerspectiveAffine
(Matrix4x3dc view, Matrix4d dest) Multiplythis
symmetric perspective projection matrix by the suppliedview
matrix and store the result indest
.Matrix4d.mulTranslationAffine
(Matrix4dc right, Matrix4d dest) Matrix4dc.mulTranslationAffine
(Matrix4dc right, Matrix4d 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
.Matrix4d.normalize3x3
(Matrix4d dest) Matrix4dc.normalize3x3
(Matrix4d 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
.Matrix4d.ortho
(double left, double right, double bottom, double top, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4d.ortho
(double left, double right, double bottom, double top, double zNear, double zFar, Matrix4d 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
.Matrix4dc.ortho
(double left, double right, double bottom, double top, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4dc.ortho
(double left, double right, double bottom, double top, double zNear, double zFar, Matrix4d 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.Matrix4d.orthoLH
(double left, double right, double bottom, double top, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4d.orthoLH
(double left, double right, double bottom, double top, double zNear, double zFar, Matrix4d 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
.Matrix4dc.orthoLH
(double left, double right, double bottom, double top, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4dc.orthoLH
(double left, double right, double bottom, double top, double zNear, double zFar, Matrix4d 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
.Matrix4d.orthoSymmetric
(double width, double height, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4d.orthoSymmetric
(double width, double height, double zNear, double zFar, Matrix4d 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
.Matrix4dc.orthoSymmetric
(double width, double height, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4dc.orthoSymmetric
(double width, double height, double zNear, double zFar, Matrix4d 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
.Matrix4d.orthoSymmetricLH
(double width, double height, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4d.orthoSymmetricLH
(double width, double height, double zNear, double zFar, Matrix4d 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
.Matrix4dc.orthoSymmetricLH
(double width, double height, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4dc.orthoSymmetricLH
(double width, double height, double zNear, double zFar, Matrix4d 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
.Matrix4d.perspective
(double fovy, double aspect, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4d.perspective
(double fovy, double aspect, double zNear, double zFar, Matrix4d 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
.Matrix4dc.perspective
(double fovy, double aspect, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4dc.perspective
(double fovy, double aspect, double zNear, double zFar, Matrix4d 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
.Matrix4d.perspectiveFrustumSlice
(double near, double far, Matrix4d dest) Matrix4dc.perspectiveFrustumSlice
(double near, double far, Matrix4d dest) Change the near and far clip plane distances ofthis
perspective frustum transformation matrix and store the result indest
.Matrix4d.perspectiveLH
(double fovy, double aspect, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4d.perspectiveLH
(double fovy, double aspect, double zNear, double zFar, Matrix4d 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
.Matrix4dc.perspectiveLH
(double fovy, double aspect, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4dc.perspectiveLH
(double fovy, double aspect, double zNear, double zFar, Matrix4d 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
.Matrix4d.perspectiveOffCenter
(double fovy, double offAngleX, double offAngleY, double aspect, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4d.perspectiveOffCenter
(double fovy, double offAngleX, double offAngleY, double aspect, double zNear, double zFar, Matrix4d 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
.Matrix4dc.perspectiveOffCenter
(double fovy, double offAngleX, double offAngleY, double aspect, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4dc.perspectiveOffCenter
(double fovy, double offAngleX, double offAngleY, double aspect, double zNear, double zFar, Matrix4d 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
.Matrix4d.perspectiveOffCenterFov
(double angleLeft, double angleRight, double angleDown, double angleUp, double zNear, double zFar, boolean zZeroToOne, Matrix4d dest) Matrix4d.perspectiveOffCenterFov
(double angleLeft, double angleRight, double angleDown, double angleUp, double zNear, double zFar, Matrix4d dest) Matrix4dc.perspectiveOffCenterFov
(double angleLeft, double angleRight, double angleDown, double angleUp, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4dc.perspectiveOffCenterFov
(double angleLeft, double angleRight, double angleDown, double angleUp, double zNear, double zFar, Matrix4d 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
.Matrix4d.perspectiveOffCenterFovLH
(double angleLeft, double angleRight, double angleDown, double angleUp, double zNear, double zFar, boolean zZeroToOne, Matrix4d dest) Matrix4d.perspectiveOffCenterFovLH
(double angleLeft, double angleRight, double angleDown, double angleUp, double zNear, double zFar, Matrix4d dest) Matrix4dc.perspectiveOffCenterFovLH
(double angleLeft, double angleRight, double angleDown, double angleUp, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4dc.perspectiveOffCenterFovLH
(double angleLeft, double angleRight, double angleDown, double angleUp, double zNear, double zFar, Matrix4d 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
Matrix4d.perspectiveOffCenterViewFromRectangle
(Vector3d eye, Vector3d p, Vector3d x, Vector3d y, double nearFarDist, boolean zeroToOne, Matrix4d projDest, Matrix4d 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
.Matrix4d.perspectiveRect
(double width, double height, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4d.perspectiveRect
(double width, double height, double zNear, double zFar, Matrix4d 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
.Matrix4dc.perspectiveRect
(double width, double height, double zNear, double zFar, boolean zZeroToOne, Matrix4d 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
.Matrix4dc.perspectiveRect
(double width, double height, double zNear, double zFar, Matrix4d 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
.Matrix4d.projectedGridRange
(Matrix4dc projector, double sLower, double sUpper, Matrix4d dest) Matrix4dc.projectedGridRange
(Matrix4dc projector, double sLower, double sUpper, Matrix4d 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
.Matrix4d.reflect
(Quaterniondc orientation, Vector3dc point, Matrix4d 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
.Matrix4dc.reflect
(Quaterniondc orientation, Vector3dc point, Matrix4d 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 a rotation transformation, rotating the given radians about the specified axis and store the result indest
.Apply a rotation transformation, rotating the given radians about the specified axis and store the result indest
.Matrix4d.rotate
(AxisAngle4d axisAngle, Matrix4d dest) Apply a rotation transformation, rotating about the givenAxisAngle4d
and store the result indest
.Matrix4d.rotate
(AxisAngle4f axisAngle, Matrix4d dest) Apply a rotation transformation, rotating about the givenAxisAngle4f
and store the result indest
.Matrix4d.rotate
(Quaterniondc quat, Matrix4d dest) Apply the rotation - and possibly scaling - transformation of the givenQuaterniondc
to this matrix and store the result indest
.Matrix4d.rotate
(Quaternionfc quat, Matrix4d dest) Apply the rotation - and possibly scaling - 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 given axis specified as x, y and z components and store the result indest
.Apply a rotation transformation, rotating the given radians about the specified axis and store the result indest
.Apply a rotation transformation, rotating the given radians about the specified axis and store the result indest
.Matrix4dc.rotate
(AxisAngle4d axisAngle, Matrix4d dest) Apply a rotation transformation, rotating about the givenAxisAngle4d
and store the result indest
.Matrix4dc.rotate
(AxisAngle4f axisAngle, Matrix4d dest) Apply a rotation transformation, rotating about the givenAxisAngle4f
and store the result indest
.Matrix4dc.rotate
(Quaterniondc quat, Matrix4d dest) Apply the rotation - and possibly scaling - transformation of the givenQuaterniondc
to this matrix and store the result indest
.Matrix4dc.rotate
(Quaternionfc quat, Matrix4d dest) Apply the rotation - and possibly scaling - transformation of the givenQuaternionfc
to this matrix and store the result indest
.Matrix4d.rotateAffine
(double ang, double x, double y, double z, Matrix4d 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
.Matrix4d.rotateAffine
(Quaterniondc quat, Matrix4d dest) Apply the rotation - and possibly scaling - transformation of the givenQuaterniondc
to thisaffine
matrix and store the result indest
.Matrix4d.rotateAffine
(Quaternionfc quat, Matrix4d dest) Apply the rotation - and possibly scaling - transformation of the givenQuaternionfc
to thisaffine
matrix and store the result indest
.Matrix4dc.rotateAffine
(double ang, double x, double y, double z, Matrix4d 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
.Matrix4dc.rotateAffine
(Quaterniondc quat, Matrix4d dest) Apply the rotation - and possibly scaling - transformation of the givenQuaterniondc
to thisaffine
matrix and store the result indest
.Matrix4dc.rotateAffine
(Quaternionfc quat, Matrix4d dest) Apply the rotation - and possibly scaling - transformation of the givenQuaternionfc
to thisaffine
matrix and store the result indest
.Matrix4d.rotateAffineXYZ
(double angleX, double angleY, double angleZ, Matrix4d dest) Matrix4dc.rotateAffineXYZ
(double angleX, double angleY, double angleZ, Matrix4d 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
.Matrix4d.rotateAffineYXZ
(double angleY, double angleX, double angleZ, Matrix4d dest) Matrix4dc.rotateAffineYXZ
(double angleY, double angleX, double angleZ, Matrix4d 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
.Matrix4d.rotateAffineZYX
(double angleZ, double angleY, double angleX, Matrix4d dest) Matrix4dc.rotateAffineZYX
(double angleZ, double angleY, double angleX, Matrix4d 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
.Matrix4d.rotateAround
(Quaterniondc quat, double ox, double oy, double oz, Matrix4d dest) Matrix4dc.rotateAround
(Quaterniondc quat, double ox, double oy, double oz, Matrix4d dest) Apply the rotation - and possibly scaling - transformation of the givenQuaterniondc
to this matrix while using(ox, oy, oz)
as the rotation origin, and store the result indest
.Matrix4d.rotateAroundAffine
(Quaterniondc quat, double ox, double oy, double oz, Matrix4d dest) Matrix4dc.rotateAroundAffine
(Quaterniondc quat, double ox, double oy, double oz, Matrix4d dest) Apply the rotation - and possibly scaling - transformation of the givenQuaterniondc
to thisaffine
matrix while using(ox, oy, oz)
as the rotation origin, and store the result indest
.Matrix4d.rotateAroundLocal
(Quaterniondc quat, double ox, double oy, double oz, Matrix4d dest) Matrix4dc.rotateAroundLocal
(Quaterniondc quat, double ox, double oy, double oz, Matrix4d dest) Pre-multiply the rotation - and possibly scaling - transformation of the givenQuaterniondc
to this matrix while using(ox, oy, oz)
as the rotation origin, and store the result indest
.Matrix4d.rotateLocal
(double ang, double x, double y, double z, Matrix4d 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
.Matrix4d.rotateLocal
(Quaterniondc quat, Matrix4d dest) Pre-multiply the rotation - and possibly scaling - transformation of the givenQuaterniondc
to this matrix and store the result indest
.Matrix4d.rotateLocal
(Quaternionfc quat, Matrix4d dest) Pre-multiply the rotation - and possibly scaling - transformation of the givenQuaternionfc
to this matrix and store the result indest
.Matrix4dc.rotateLocal
(double ang, double x, double y, double z, Matrix4d 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
.Matrix4dc.rotateLocal
(Quaterniondc quat, Matrix4d dest) Pre-multiply the rotation - and possibly scaling - transformation of the givenQuaterniondc
to this matrix and store the result indest
.Matrix4dc.rotateLocal
(Quaternionfc quat, Matrix4d dest) Pre-multiply the rotation - and possibly scaling - transformation of the givenQuaternionfc
to this matrix and store the result indest
.Matrix4d.rotateLocalX
(double ang, Matrix4d 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
.Matrix4dc.rotateLocalX
(double ang, Matrix4d 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
.Matrix4d.rotateLocalY
(double ang, Matrix4d 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
.Matrix4dc.rotateLocalY
(double ang, Matrix4d 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
.Matrix4d.rotateLocalZ
(double ang, Matrix4d 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
.Matrix4dc.rotateLocalZ
(double ang, Matrix4d 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
.Matrix4d.rotateTowards
(double dirX, double dirY, double dirZ, double upX, double upY, double upZ, Matrix4d 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
.Matrix4d.rotateTowards
(Vector3dc direction, Vector3dc up, Matrix4d dest) Apply a model transformation to this matrix for a right-handed coordinate system, that aligns the local+Z
axis withdirection
and store the result indest
.Matrix4dc.rotateTowards
(double dirX, double dirY, double dirZ, double upX, double upY, double upZ, Matrix4d 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
.Matrix4dc.rotateTowards
(Vector3dc direction, Vector3dc up, Matrix4d dest) Apply a model transformation to this matrix for a right-handed coordinate system, that aligns the local+Z
axis withdirection
and store the result indest
.Matrix4d.rotateTowardsXY
(double dirX, double dirY, Matrix4d dest) Matrix4dc.rotateTowardsXY
(double dirX, double dirY, Matrix4d dest) Apply rotation about the Z axis to align the local+X
towards(dirX, dirY)
and store the result indest
.Matrix4d.rotateTranslation
(double ang, double x, double y, double z, Matrix4d 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
.Matrix4d.rotateTranslation
(Quaterniondc quat, Matrix4d dest) Apply the rotation - and possibly scaling - transformation of the givenQuaterniondc
to this matrix, which is assumed to only contain a translation, and store the result indest
.Matrix4d.rotateTranslation
(Quaternionfc quat, Matrix4d dest) Apply the rotation - and possibly scaling - transformation of the givenQuaternionfc
to this matrix, which is assumed to only contain a translation, and store the result indest
.Matrix4dc.rotateTranslation
(double ang, double x, double y, double z, Matrix4d 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
.Matrix4dc.rotateTranslation
(Quaterniondc quat, Matrix4d dest) Apply the rotation - and possibly scaling - transformation of the givenQuaterniondc
to this matrix, which is assumed to only contain a translation, and store the result indest
.Matrix4dc.rotateTranslation
(Quaternionfc quat, Matrix4d dest) Apply the rotation - and possibly scaling - transformation 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 given xyz 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
.Matrix4d.scaleAround
(double sx, double sy, double sz, double ox, double oy, double oz, Matrix4d dest) Matrix4d.scaleAround
(double factor, double ox, double oy, double oz, Matrix4d dest) Matrix4dc.scaleAround
(double sx, double sy, double sz, double ox, double oy, double oz, Matrix4d 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
.Matrix4dc.scaleAround
(double factor, double ox, double oy, double oz, Matrix4d 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
.Matrix4d.scaleAroundLocal
(double sx, double sy, double sz, double ox, double oy, double oz, Matrix4d dest) Matrix4d.scaleAroundLocal
(double factor, double ox, double oy, double oz, Matrix4d dest) Matrix4dc.scaleAroundLocal
(double sx, double sy, double sz, double ox, double oy, double oz, Matrix4d 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
.Matrix4dc.scaleAroundLocal
(double factor, double ox, double oy, double oz, Matrix4d 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
.Matrix4d.scaleLocal
(double x, double y, double z, Matrix4d dest) Matrix4d.scaleLocal
(double xyz, Matrix4d dest) Matrix4dc.scaleLocal
(double x, double y, double z, Matrix4d dest) Pre-multiply scaling tothis
matrix by scaling the base axes by the given x, y and z factors and store the result indest
.Matrix4dc.scaleLocal
(double xyz, Matrix4d 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
.Matrix4d.shadow
(double lightX, double lightY, double lightZ, double lightW, double a, double b, double c, double d, Matrix4d dest) Matrix4d.shadow
(double lightX, double lightY, double lightZ, double lightW, Matrix4dc planeTransform, Matrix4d 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
.Matrix4dc.shadow
(double lightX, double lightY, double lightZ, double lightW, double a, double b, double c, double d, Matrix4d 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
.Matrix4dc.shadow
(double lightX, double lightY, double lightZ, double lightW, Matrix4dc planeTransform, Matrix4d 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
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
.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
.Matrix4d.translateLocal
(double x, double y, double z, Matrix4d 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
.Matrix4d.translateLocal
(Vector3dc offset, Matrix4d 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
.Matrix4d.translateLocal
(Vector3fc offset, Matrix4d 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
.Matrix4dc.translateLocal
(double x, double y, double z, Matrix4d 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
.Matrix4dc.translateLocal
(Vector3dc offset, Matrix4d 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
.Matrix4dc.translateLocal
(Vector3fc offset, Matrix4d 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
.Matrix4d.translationRotateScaleMulAffine
(double tx, double ty, double tz, double qx, double qy, double qz, double qw, double sx, double sy, double sz, Matrix4d 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.Matrix4d.translationRotateScaleMulAffine
(Vector3fc translation, Quaterniondc quat, Vector3fc scale, Matrix4d 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.Transposethis
matrix and store the result intodest
.Matrix4d.transpose3x3
(Matrix4d dest) Matrix4dc.transpose3x3
(Matrix4d dest) Transpose only the upper left 3x3 submatrix of this matrix and store the result indest
.Matrix4d.withLookAtUp
(double upX, double upY, double upZ, Matrix4d dest) Matrix4d.withLookAtUp
(Vector3dc up, Matrix4d dest) Matrix4dc.withLookAtUp
(double upX, double upY, double upZ, Matrix4d dest) Apply a transformation to this matrix to ensure that the local Y axis (as obtained byMatrix4dc.positiveY(Vector3d)
) will be coplanar to the plane spanned by the local Z axis (as obtained byMatrix4dc.positiveZ(Vector3d)
) and the given vector(upX, upY, upZ)
, and store the result indest
.Matrix4dc.withLookAtUp
(Vector3dc up, Matrix4d dest) Apply a transformation to this matrix to ensure that the local Y axis (as obtained byMatrix4dc.positiveY(Vector3d)
) will be coplanar to the plane spanned by the local Z axis (as obtained byMatrix4dc.positiveZ(Vector3d)
) and the given vectorup
, and store the result indest
.