Component-wise add this
and other
.
Component-wise add this
and other
and store the result in dest
.
Component-wise add the upper 4x3 submatrices of this
and other
.
Component-wise add the upper 4x3 submatrices of this
and other
.
Component-wise add the upper 4x3 submatrices of this
and other
and store the result in dest
.
Component-wise add the upper 4x3 submatrices of this
and other
and store the result in dest
.
Compute the extents of the coordinate system before this
affine
transformation was applied
and store the resulting corner coordinates in
corner
and the span vectors in
xDir
,
yDir
and
zDir
.
Matrix4d.arcball(double radius,
double centerX,
double centerY,
double centerZ,
double angleX,
double angleY)
Apply an arcball view transformation to this matrix with the given radius
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 given radius
and center
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 given radius
and center (centerX, centerY, centerZ)
position of the arcball and the specified X and Y rotation angles, and store the result in dest
.
Apply an arcball view transformation to this matrix with the given radius
and center
position of the arcball and the specified X and Y rotation angles, and store the result in dest
.
Matrix4d.assume(int properties)
Assume the given properties about this matrix.
Set this matrix to a cylindrical billboard transformation that rotates the local +Z axis of a given object with position objPos
towards
a target position at targetPos
while constraining a cylindrical rotation around the given up
vector.
Set this matrix to a spherical billboard transformation that rotates the local +Z axis of a given object with position objPos
towards
a target position at targetPos
using a shortest arc rotation by not preserving any up vector of the object.
Set this matrix to a spherical billboard transformation that rotates the local +Z axis of a given object with position objPos
towards
a target position at targetPos
.
Compute the cofactor matrix of the upper left 3x3 submatrix of this
.
Compute the cofactor matrix of the upper left 3x3 submatrix of this
and store it into dest
.
Compute the cofactor matrix of the upper left 3x3 submatrix of this
and store it into dest
.
Compute and set the matrix properties returned by
properties()
based
on the current matrix element values.
Component-wise add the upper 4x3 submatrices of this
and other
by first multiplying each component of other
's 4x3 submatrix by otherFactor
and
adding that result to this
.
Component-wise add the upper 4x3 submatrices of this
and other
by first multiplying each component of other
's 4x3 submatrix by otherFactor
,
adding that to this
and storing the final result in dest
.
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 in dest
.
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 in dest
.
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 in dest
.
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 in dest
.
Compute the axis-aligned bounding box of the frustum described by this
matrix and store the minimum corner
coordinates in the given min
and the maximum corner coordinates in the given max
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 in dest
.
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 in dest
.
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 in dest
.
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 in dest
.
Get the current values of this
matrix and store them into
dest
.
Get the current values of this
matrix and store them into
dest
.
Get the current values of this
matrix and store them into
dest
.
Get the current values of this
matrix and store them into the upper 4x3 submatrix of dest
.
Get the current values of this
matrix and store them into the upper 4x3 submatrix of dest
.
Set the given destination matrix to the rotation represented by this
.
Set the given destination matrix to the rotation represented by this
.
Reset this matrix to the identity.
Invert this
matrix and store the result in dest
.
Invert this matrix by assuming that it is an
affine
transformation (i.e.
Invert this matrix by assuming that it is an
affine
transformation (i.e.
If
this
is an arbitrary perspective projection matrix obtained via one of the
frustum()
methods
or via
setFrustum()
,
then this method builds the inverse of
this
.
If
this
is an arbitrary perspective projection matrix obtained via one of the
frustum()
methods,
then this method builds the inverse of
this
and stores it into the given
dest
.
Invert this
orthographic projection matrix.
Invert this
orthographic projection matrix and store the result into the given dest
.
If
this
is a perspective projection matrix obtained via one of the
perspective()
methods
or via
setPerspective()
, that is, if
this
is a symmetrical perspective frustum transformation,
then this method builds the inverse of
this
.
If
this
is a perspective projection matrix obtained via one of the
perspective()
methods,
that is, if
this
is a symmetrical perspective frustum transformation,
then this method builds the inverse of
this
and stores it into the given
dest
.
If
this
is a perspective projection matrix obtained via one of the
perspective()
methods,
that is, if
this
is a symmetrical perspective frustum transformation
and the given
view
matrix is
affine
and has unit scaling (for example by being obtained via
lookAt()
),
then this method builds the inverse of
this * view
and stores it into the given
dest
.
If
this
is a perspective projection matrix obtained via one of the
perspective()
methods,
that is, if
this
is a symmetrical perspective frustum transformation
and the given
view
matrix has unit scaling,
then this method builds the inverse of
this * view
and stores it into the given
dest
.
Linearly interpolate this
and other
using the given interpolation factor t
and store the result in this
.
Linearly interpolate this
and other
using the given interpolation factor t
and store the result in dest
.
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 along dir
.
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 along dir
and store the result in dest
.
Apply a rotation transformation to this matrix to make -z
point along dir
.
Apply a rotation transformation to this matrix to make -z
point along dir
and store the result in dest
.
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 along dir
and store the result in dest
.
Apply a rotation transformation to this matrix to make -z
point along dir
and store the result in dest
.
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
with center - 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
with center - eye
and store the result in dest
.
Apply a "lookat" transformation to this matrix for a right-handed coordinate system,
that aligns -z
with center - eye
.
Apply a "lookat" transformation to this matrix for a right-handed coordinate system,
that aligns -z
with center - eye
and store the result in dest
.
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
with center - eye
and store the result in dest
.
Apply a "lookat" transformation to this matrix for a right-handed coordinate system,
that aligns -z
with center - eye
and store the result in dest
.
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
with center - 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
with center - eye
and store the result in dest
.
Apply a "lookat" transformation to this matrix for a left-handed coordinate system,
that aligns +z
with center - eye
.
Apply a "lookat" transformation to this matrix for a left-handed coordinate system,
that aligns +z
with center - eye
and store the result in dest
.
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
with center - eye
and store the result in dest
.
Apply a "lookat" transformation to this matrix for a left-handed coordinate system,
that aligns +z
with center - eye
and store the result in dest
.
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
with center - eye
and store the result in dest
.
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
with center - eye
and store the result in dest
.
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
with center - eye
and store the result in dest
.
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
with center - eye
and store the result in dest
.
Set the value of the matrix element at column 0 and row 0.
Set the value of the matrix element at column 0 and row 1.
Set the value of the matrix element at column 0 and row 2.
Set the value of the matrix element at column 0 and row 3.
Set the value of the matrix element at column 1 and row 0.
Set the value of the matrix element at column 1 and row 1.
Set the value of the matrix element at column 1 and row 2.
Set the value of the matrix element at column 1 and row 3.
Set the value of the matrix element at column 2 and row 0.
Set the value of the matrix element at column 2 and row 1.
Set the value of the matrix element at column 2 and row 2.
Set the value of the matrix element at column 2 and row 3.
Set the value of the matrix element at column 3 and row 0.
Set the value of the matrix element at column 3 and row 1.
Set the value of the matrix element at column 3 and row 2.
Set the value of the matrix element at column 3 and row 3.
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
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)
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)
Multiply this matrix by the supplied right
matrix and store the result in this
.
Multiply this matrix by the supplied right
matrix and store the result in this
.
Multiply this matrix by the supplied right
matrix.
Multiply this matrix by the supplied parameter matrix.
Multiply this matrix by the supplied right
matrix.
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 in dest
.
Multiply this matrix by the supplied right
matrix and store the result in dest
.
Multiply this matrix by the supplied right
matrix and store the result in dest
.
Multiply this matrix by the supplied right
matrix and store the result in dest
.
Multiply this matrix by the supplied parameter matrix and store the result in dest
.
Multiply this matrix by the supplied right
matrix and store the result in dest
.
Multiply this matrix by the supplied right
matrix and store the result in dest
.
Multiply this matrix by the supplied right
matrix.
Multiply this matrix by the supplied right
matrix and store the result in dest
.
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 in dest
.
Component-wise multiply the upper 4x3 submatrices of this
by other
.
Component-wise multiply the upper 4x3 submatrices of this
by other
and store the result in dest
.
Multiply this matrix by the supplied
right
matrix, both of which are assumed to be
affine
, and store the result in
this
.
Multiply this matrix by the supplied
right
matrix, both of which are assumed to be
affine
, and store the result in
dest
.
Multiply this matrix by the supplied
right
matrix, which is assumed to be
affine
, and store the result in
this
.
Multiply this matrix by the supplied
right
matrix, which is assumed to be
affine
, and store the result in
dest
.
Component-wise multiply this
by other
.
Component-wise multiply this
by other
and store the result in dest
.
Pre-multiply this matrix by the supplied left
matrix and store the result in this
.
Pre-multiply this matrix by the supplied left
matrix and store the result in dest
.
Pre-multiply this matrix by the supplied
left
matrix, both of which are assumed to be
affine
, and store the result in
this
.
Pre-multiply this matrix by the supplied
left
matrix, both of which are assumed to be
affine
, and store the result in
dest
.
Multiply
this
orthographic projection matrix by the supplied
affine
view
matrix.
Multiply
this
orthographic projection matrix by the supplied
affine
view
matrix
and store the result in
dest
.
Multiply
this
symmetric perspective projection matrix by the supplied
affine
view
matrix.
Multiply
this
symmetric perspective projection matrix by the supplied
affine
view
matrix and store the result in
dest
.
Multiply this
symmetric perspective projection matrix by the supplied view
matrix and store the result in dest
.
Multiply this matrix, which is assumed to only contain a translation, by the supplied
right
matrix, which is assumed to be
affine
, and store the result in
dest
.
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Compute a normal matrix from the upper left 3x3 submatrix of this
and store it into the upper left 3x3 submatrix of this
.
Compute a normal matrix from the upper left 3x3 submatrix of this
and store it into the upper left 3x3 submatrix of dest
.
Compute a normal matrix from the upper left 3x3 submatrix of this
and store it into the upper left 3x3 submatrix of dest
.
Normalize the upper left 3x3 submatrix of this matrix.
Normalize the upper left 3x3 submatrix of this matrix and store the result in dest
.
Apply an oblique projection transformation to this matrix with the given values for a
and
b
.
Apply an oblique projection transformation to this matrix with the given values for a
and
b
and store the result in dest
.
Apply an oblique projection transformation to this matrix with the given values for a
and
b
and store the result in dest
.
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 in dest
.
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 in dest
.
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 in dest
.
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 in dest
.
Matrix4d.ortho2D(double left,
double right,
double bottom,
double top)
Apply an orthographic projection transformation for a right-handed coordinate system to this matrix.
Matrix4d.ortho2D(double left,
double right,
double bottom,
double top,
Matrix4d dest)
Apply an orthographic projection transformation for a right-handed coordinate system
to this matrix and store the result in dest
.
Matrix4dc.ortho2D(double left,
double right,
double bottom,
double top,
Matrix4d dest)
Apply an orthographic projection transformation for a right-handed coordinate system
to this matrix and store the result in dest
.
Matrix4d.ortho2DLH(double left,
double right,
double bottom,
double top)
Apply an orthographic projection transformation for a left-handed coordinate system to this matrix.
Matrix4d.ortho2DLH(double left,
double right,
double bottom,
double top,
Matrix4d dest)
Apply an orthographic projection transformation for a left-handed coordinate system to this matrix and store the result in dest
.
Matrix4dc.ortho2DLH(double left,
double right,
double bottom,
double top,
Matrix4d dest)
Apply an orthographic projection transformation for a left-handed coordinate system to this matrix and store the result in dest
.
Build an ortographic projection transformation that fits the view-projection transformation represented by this
into the given affine view
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 in dest
.
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 in dest
.
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 in dest
.
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 in dest
.
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 in 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 in dest
.
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 in 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 in dest
.
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.
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 in 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 in 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 in 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 in dest
.
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 in 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 in dest
.
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 in 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 in dest
.
Change the near and far clip plane distances of this
perspective frustum transformation matrix
and store the result in dest
.
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 in 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 in dest
.
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 in 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 in dest
.
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 in 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 in dest
.
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 in 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 in dest
.
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)
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 in 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 in dest
.
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)
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 in 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 in dest
.
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 in 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 in dest
.
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 in 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 in dest
.
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.
Matrix4d.pick(double x,
double y,
double width,
double height,
int[] viewport,
Matrix4d dest)
Matrix4dc.pick(double x,
double y,
double width,
double height,
int[] viewport,
Matrix4d dest)
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
in 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 be
this
, and store that range matrix into
dest
.
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 equation x*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(double nx,
double ny,
double nz,
double px,
double py,
double pz,
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.
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.
Matrix4dc.reflect(double nx,
double ny,
double nz,
double px,
double py,
double pz,
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 in dest
.
Apply a mirror/reflection transformation to this matrix that reflects about the given plane
specified via the equation x*a + y*b + z*c + d = 0
and store the result in 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 in 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 in dest
.
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 equation x*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.
Set this matrix to a mirror/reflection transformation that reflects about a plane
specified via the plane orientation and a point on the plane.
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.
Matrix4d.rotate(double ang,
double x,
double y,
double z,
Matrix4d dest)
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 in dest
.
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 in dest
.
Apply a rotation transformation, rotating about the given
AxisAngle4d
, to this matrix.
Apply a rotation transformation, rotating about the given
AxisAngle4d
and store the result in
dest
.
Apply a rotation transformation, rotating about the given
AxisAngle4f
, to this matrix.
Apply a rotation transformation, rotating about the given
AxisAngle4f
and store the result in
dest
.
Apply the rotation - and possibly scaling - transformation of the given
Quaterniondc
to this matrix.
Apply the rotation - and possibly scaling - transformation of the given
Quaterniondc
to this matrix and store
the result in
dest
.
Apply the rotation - and possibly scaling - transformation of the given
Quaternionfc
to this matrix.
Apply the rotation - and possibly scaling - transformation of the given
Quaternionfc
to this matrix and store
the result in
dest
.
Matrix4dc.rotate(double ang,
double x,
double y,
double z,
Matrix4d dest)
Apply rotation to this matrix by rotating the given amount of radians
about the given axis specified as x, y and z components and store the result in dest
.
Apply a rotation transformation, rotating the given radians about the specified axis and store the result in dest
.
Apply a rotation transformation, rotating the given radians about the specified axis and store the result in dest
.
Apply a rotation transformation, rotating about the given
AxisAngle4d
and store the result in
dest
.
Apply a rotation transformation, rotating about the given
AxisAngle4f
and store the result in
dest
.
Apply the rotation - and possibly scaling - transformation of the given
Quaterniondc
to this matrix and store
the result in
dest
.
Apply the rotation - and possibly scaling - transformation of the given
Quaternionfc
to this matrix and store
the result in
dest
.
Matrix4d.rotateAffine(double ang,
double x,
double y,
double z)
Apply rotation to this
affine
matrix by rotating the given amount of radians
about the specified
(x, y, z)
axis.
Apply rotation to this
affine
matrix by rotating the given amount of radians
about the specified
(x, y, z)
axis and store the result in
dest
.
Apply the rotation - and possibly scaling - transformation of the given
Quaterniondc
to this matrix.
Apply the rotation - and possibly scaling - transformation of the given
Quaterniondc
to this
affine
matrix and store
the result in
dest
.
Apply the rotation - and possibly scaling - transformation of the given
Quaternionfc
to this matrix.
Apply the rotation - and possibly scaling - transformation of the given
Quaternionfc
to this
affine
matrix and store
the result in
dest
.
Apply rotation to this
affine
matrix by rotating the given amount of radians
about the specified
(x, y, z)
axis and store the result in
dest
.
Apply the rotation - and possibly scaling - transformation of the given
Quaterniondc
to this
affine
matrix and store
the result in
dest
.
Apply the rotation - and possibly scaling - transformation of the given
Quaternionfc
to this
affine
matrix and store
the result in
dest
.
Apply rotation of angleX
radians about the X axis, followed by a rotation of angleY
radians about the Y axis and
followed by a rotation of angleZ
radians about the Z axis.
Apply rotation of angleX
radians about the X axis, followed by a rotation of angleY
radians about the Y axis and
followed by a rotation of angleZ
radians about the Z axis and store the result in dest
.
Apply rotation of angleY
radians about the Y axis, followed by a rotation of angleX
radians about the X axis and
followed by a rotation of angleZ
radians about the Z axis.
Apply rotation of angleY
radians about the Y axis, followed by a rotation of angleX
radians about the X axis and
followed by a rotation of angleZ
radians about the Z axis and store the result in dest
.
Apply rotation of angleZ
radians about the Z axis, followed by a rotation of angleY
radians about the Y axis and
followed by a rotation of angleX
radians about the X axis.
Apply rotation of angleZ
radians about the Z axis, followed by a rotation of angleY
radians about the Y axis and
followed by a rotation of angleX
radians about the X axis and store the result in dest
.
Apply the rotation transformation of the given
Quaterniondc
to this matrix while using
(ox, oy, oz)
as the rotation origin.
Apply the rotation - and possibly scaling - transformation of the given
Quaterniondc
to this matrix while using
(ox, oy, oz)
as the rotation origin,
and store the result in
dest
.
Apply the rotation - and possibly scaling - transformation of the given
Quaterniondc
to this
affine
matrix while using
(ox, oy, oz)
as the rotation origin, and store the result in
dest
.
Pre-multiply the rotation - and possibly scaling - transformation of the given
Quaterniondc
to this matrix while using
(ox, oy, oz)
as the rotation origin.
Pre-multiply the rotation - and possibly scaling - transformation of the given
Quaterniondc
to this matrix while using
(ox, oy, oz)
as the rotation origin, and store the result in
dest
.
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.
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 in dest
.
Pre-multiply the rotation - and possibly scaling - transformation of the given
Quaterniondc
to this matrix.
Pre-multiply the rotation - and possibly scaling - transformation of the given
Quaterniondc
to this matrix and store
the result in
dest
.
Pre-multiply the rotation - and possibly scaling - transformation of the given
Quaternionfc
to this matrix.
Pre-multiply the rotation - and possibly scaling - transformation of the given
Quaternionfc
to this matrix and store
the result in
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 in dest
.
Pre-multiply the rotation - and possibly scaling - transformation of the given
Quaterniondc
to this matrix and store
the result in
dest
.
Pre-multiply the rotation - and possibly scaling - transformation of the given
Quaternionfc
to this matrix and store
the result in
dest
.
Pre-multiply a rotation to this matrix by rotating the given amount of radians about the X axis.
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 in 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 in dest
.
Pre-multiply a rotation to this matrix by rotating the given amount of radians about the Y axis.
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 in 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 in dest
.
Pre-multiply a rotation to this matrix by rotating the given amount of radians about the Z axis.
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 in 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 in dest
.
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 with dir
and store the result in dest
.
Apply a model transformation to this matrix for a right-handed coordinate system,
that aligns the local +Z
axis with direction
.
Apply a model transformation to this matrix for a right-handed coordinate system,
that aligns the local +Z
axis with direction
and store the result in dest
.
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 with dir
and store the result in dest
.
Apply a model transformation to this matrix for a right-handed coordinate system,
that aligns the local +Z
axis with direction
and store the result in dest
.
Apply rotation about the Z axis to align the local +X
towards (dirX, dirY)
.
Apply rotation about the Z axis to align the local +X
towards (dirX, dirY)
and store the result in 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 in dest
.
Apply the rotation - and possibly scaling - transformation of the given
Quaterniondc
to this matrix, which is assumed to only contain a translation, and store
the result in
dest
.
Apply the rotation - and possibly scaling - transformation of the given
Quaternionfc
to this matrix, which is assumed to only contain a translation, and store
the result in
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 in dest
.
Apply the rotation - and possibly scaling - transformation of the given
Quaterniondc
to this matrix, which is assumed to only contain a translation, and store
the result in
dest
.
Apply the rotation - and possibly scaling - transformation of the given
Quaternionfc
to this matrix, which is assumed to only contain a translation, and store
the result in
dest
.
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 in dest
.
Matrix4d.rotateXYZ(double angleX,
double angleY,
double angleZ)
Apply rotation of angleX
radians about the X axis, followed by a rotation of angleY
radians about the Y axis and
followed by a rotation of angleZ
radians about the Z axis.
Apply rotation of angles.x
radians about the X axis, followed by a rotation of angles.y
radians about the Y axis and
followed by a rotation of angles.z
radians about the Z axis.
Apply rotation of angleX
radians about the X axis, followed by a rotation of angleY
radians about the Y axis and
followed by a rotation of angleZ
radians about the Z axis and store the result in dest
.
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 in dest
.
Matrix4d.rotateYXZ(double angleY,
double angleX,
double angleZ)
Apply rotation of angleY
radians about the Y axis, followed by a rotation of angleX
radians about the X axis and
followed by a rotation of angleZ
radians about the Z axis.
Apply rotation of angles.y
radians about the Y axis, followed by a rotation of angles.x
radians about the X axis and
followed by a rotation of angles.z
radians about the Z axis.
Apply rotation of angleY
radians about the Y axis, followed by a rotation of angleX
radians about the X axis and
followed by a rotation of angleZ
radians about the Z axis and store the result in dest
.
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 in dest
.
Matrix4d.rotateZYX(double angleZ,
double angleY,
double angleX)
Apply rotation of angleZ
radians about the Z axis, followed by a rotation of angleY
radians about the Y axis and
followed by a rotation of angleX
radians about the X axis.
Apply rotation of angles.z
radians about the Z axis, followed by a rotation of angles.y
radians about the Y axis and
followed by a rotation of angles.x
radians about the X axis.
Apply rotation of angleZ
radians about the Z axis, followed by a rotation of angleY
radians about the Y axis and
followed by a rotation of angleX
radians about the X axis and store the result in dest
.
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.
Set this matrix to a rotation transformation using the given
AxisAngle4d
.
Set this matrix to a rotation transformation using the given
AxisAngle4f
.
Set this matrix to the rotation - and possibly scaling - transformation of the given
Quaterniondc
.
Set this matrix to the rotation - and possibly scaling - transformation of the given
Quaternionfc
.
Set this matrix to a transformation composed of a rotation of the specified
Quaterniondc
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 with dir
.
Set this matrix to a model transformation for a right-handed coordinate system,
that aligns the local -z
axis with dir
.
Set this matrix to a rotation transformation about the Z axis to align the local +X
towards (dirX, dirY)
.
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 of angleX
radians about the X axis, followed by a rotation
of angleY
radians about the Y axis and followed by a rotation of angleZ
radians about the Z axis.
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 of angleY
radians about the Y axis, followed by a rotation
of angleX
radians about the X axis and followed by a rotation of angleZ
radians about the Z axis.
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 of angleZ
radians about the Z axis, followed by a rotation
of angleY
radians about the Y axis and followed by a rotation of angleX
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 to this
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 given xyz.x
,
xyz.y
and xyz.z
factors, respectively.
Apply scaling to this
matrix by scaling the base axes by the given x,
y and z factors and store the result in dest
.
Apply scaling to this matrix by uniformly scaling all base axes by the given xyz factor
and store the result in dest
.
Apply scaling to this
matrix by scaling the base axes by the given xyz.x
,
xyz.y
and xyz.z
factors, respectively and store the result in dest
.
Matrix4d.scaleAround(double factor,
double ox,
double oy,
double oz)
Apply scaling to this matrix by scaling all three base axes by the given factor
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)
Matrix4dc.scaleAround(double sx,
double sy,
double sz,
double ox,
double oy,
double oz,
Matrix4d dest)
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,
and store the result in dest
.
Apply scaling to this matrix by scaling all three base axes by the given factor
while using (ox, oy, oz)
as the scaling origin,
and store the result in dest
.
Pre-multiply scaling to this matrix by scaling all three base axes by the given factor
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.
Pre-multiply scaling to this
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 in dest
.
Pre-multiply scaling to this matrix by scaling all three base axes by the given factor
while using (ox, oy, oz)
as the scaling origin,
and store the result in dest
.
Pre-multiply scaling to this matrix by scaling the base axes by the given xyz factor.
Pre-multiply scaling to this matrix by scaling the base axes by the given x,
y and z factors.
Pre-multiply scaling to this
matrix by scaling the base axes by the given x,
y and z factors and store the result in dest
.
Pre-multiply scaling to this
matrix by scaling all base axes by the given xyz
factor,
and store the result in dest
.
Matrix4d.scaleXY(double x,
double y)
Apply scaling to this matrix by scaling the X axis by x
and the Y axis by y
.
Apply scaling to this matrix by by scaling the X axis by x
and the Y axis by y
and store the result in dest
.
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 by
xyz.x
, xyz.y
and xyz.z
, respectively.
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.
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.
Set the values of this matrix by reading 16 double values from the given
ByteBuffer
in column-major order,
starting at the specified absolute buffer position/index.
Set the values of this matrix by reading 16 double values from the given
DoubleBuffer
in column-major order,
starting at the specified absolute buffer position/index.
Set the values of this matrix by reading 16 float values from the given
FloatBuffer
in column-major order,
starting at the specified absolute buffer position/index.
Set the values of this matrix by reading 16 double values from the given
ByteBuffer
in column-major order,
starting at its current position.
Set the values of this matrix by reading 16 double values from the given
DoubleBuffer
in column-major order,
starting at its current position.
Set the values of this matrix by reading 16 float values from the given
FloatBuffer
in column-major order,
starting at its current position.
Set this matrix to be equivalent to the rotation specified by the given
AxisAngle4d
.
Set this matrix to be equivalent to the rotation specified by the given
AxisAngle4f
.
Set the upper left 3x3 submatrix of this
Matrix4d
to the given
Matrix3dc
and the rest to identity.
Store the values of the given matrix m
into this
matrix.
Store the values of the given matrix m
into this
matrix.
Store the values of the given matrix m
into this
matrix
and set the other matrix elements to identity.
Store the values of the given matrix m
into this
matrix
and set the other matrix elements to identity.
Set this matrix to be equivalent to the rotation - and possibly scaling - specified by the given
Quaterniondc
.
Set this matrix to be equivalent to the rotation - and possibly scaling - specified by the given
Quaternionfc
.
Set the four columns of this matrix to the supplied vectors, respectively.
Set the upper left 3x3 submatrix of this
Matrix4d
to the given
Matrix3dc
and don't change the other elements.
Set the upper left 3x3 submatrix of this
Matrix4d
to that of the given
Matrix4dc
and don't change the other elements.
Set the upper 4x3 submatrix of this
Matrix4d
to the upper 4x3 submatrix of the given
Matrix4dc
and don't change the other elements.
Set the upper 4x3 submatrix of this
Matrix4d
to the given
Matrix4x3dc
and don't change the other elements.
Set the upper 4x3 submatrix of this
Matrix4d
to the given
Matrix4x3fc
and don't change the other elements.
Set the column at the given column
index, starting with 0
.
Set the values of this matrix by reading 16 float values from the given
ByteBuffer
in column-major order,
starting at the specified absolute buffer position/index.
Set the values of this matrix by reading 16 float values from the given
ByteBuffer
in column-major order,
starting at its current position.
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 along dir
.
Set this matrix to a rotation transformation to make -z
point along dir
.
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
with center - eye
.
Set this matrix to be a "lookat" transformation for a right-handed coordinate system, that aligns
-z
with center - 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
with center - eye
.
Set this matrix to be a "lookat" transformation for a left-handed coordinate system, that aligns
+z
with center - 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.
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.
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.
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.
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.
Set only the upper left 3x3 submatrix of this matrix to a rotation of angleX
radians about the X axis, followed by a rotation
of angleY
radians about the Y axis and followed by a rotation of angleZ
radians about the Z axis.
Set only the upper left 3x3 submatrix of this matrix to a rotation of angleY
radians about the Y axis, followed by a rotation
of angleX
radians about the X axis and followed by a rotation of angleZ
radians about the Z axis.
Set only the upper left 3x3 submatrix of this matrix to a rotation of angleZ
radians about the Z axis, followed by a rotation
of angleY
radians about the Y axis and followed by a rotation of angleX
radians about the X axis.
Set the row at the given row
index, starting with 0
.
Set the matrix element at the given row and column to the specified value.
Set only the translation components (m30, m31, m32)
of this matrix to the given values (x, y, z)
.
Set only the translation components (m30, m31, m32)
of this matrix to the given values (xyz.x, xyz.y, xyz.z)
.
Store the values of the transpose of the given matrix m
into this
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 equation
x*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 equation
y = 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 equation
x*a + y*b + z*c + d = 0
as if casting a shadow from a given light position/direction light
.
Apply a projection transformation to this matrix that projects onto the plane with the general plane equation
y = 0
as if casting a shadow from a given light position/direction light
.
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 equation
x*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 in dest
.
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 equation
y = 0
as if casting a shadow from a given light position/direction (lightX, lightY, lightZ, lightW)
and store the result in dest
.
Apply a projection transformation to this matrix that projects onto the plane specified via the general plane equation
x*a + y*b + z*c + d = 0
as if casting a shadow from a given light position/direction light
and store the result in dest
.
Apply a projection transformation to this matrix that projects onto the plane with the general plane equation
y = 0
as if casting a shadow from a given light position/direction light
and store the result in dest
.
Component-wise subtract subtrahend
from this
.
Component-wise subtract subtrahend
from this
and store the result in dest
.
Component-wise subtract the upper 4x3 submatrices of subtrahend
from this
.
Component-wise subtract the upper 4x3 submatrices of subtrahend
from this
and store the result in dest
.
Exchange the values of this
matrix with the given other
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)
Transform the axis-aligned box given as the minimum corner
(minX, minY, minZ)
and maximum corner
(maxX, maxY, maxZ)
by
this
affine
matrix and compute the axis-aligned box of the result whose minimum corner is stored in
outMin
and maximum corner stored in
outMax
.
Transform the axis-aligned box given as the minimum corner
min
and maximum corner
max
by
this
affine
matrix and compute the axis-aligned box of the result whose minimum corner is stored in
outMin
and maximum corner stored in
outMax
.
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 in dest
.
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 in dest
.
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 in dest
.
Apply a translation to this matrix by translating by the given number of
units in x, y and z and store the result in dest
.
Apply a translation to this matrix by translating by the given number of
units in x, y and z and store the result in dest
.
Apply a translation to this matrix by translating by the given number of
units in x, y and z and store the result in dest
.
Pre-multiply a translation to this matrix by translating by the given number of
units in x, y and z.
Pre-multiply a translation to this matrix by translating by the given number of
units in x, y and z and store the result in dest
.
Pre-multiply a translation to this matrix by translating by the given number of
units in x, y and z.
Pre-multiply a translation to this matrix by translating by the given number of
units in x, y and z and store the result in dest
.
Pre-multiply a translation to this matrix by translating by the given number of
units in x, y and z.
Pre-multiply a translation to this matrix by translating by the given number of
units in x, y and z and store the result in 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 in 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 in 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 in dest
.
Set this matrix to be a simple translation matrix.
Set this matrix to be a simple translation matrix.
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)
Set this
matrix to T * R
, where T
is a translation by the given (tx, ty, tz)
and
R
is a rotation - and possibly scaling - transformation specified by the quaternion (qx, qy, qz, qw)
.
Set this
matrix to T * R
, where T
is a translation by the given (tx, ty, tz)
and
R
is a rotation - and possibly scaling - transformation specified by the given quaternion.
Set this
matrix to T * R
, where T
is the given translation
and
R
is a rotation transformation specified by the given quaternion.
Set this
matrix to (T * R)-1
, where T
is a translation by the given (tx, ty, tz)
and
R
is a rotation transformation specified by the quaternion (qx, qy, qz, qw)
.
Set this
matrix to (T * R)-1
, where T
is the given translation
and
R
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)
Set this
matrix to T * R * S
, where T
is a translation by the given (tx, ty, tz)
,
R
is a rotation transformation specified by the quaternion (qx, qy, qz, qw)
, and S
is a scaling transformation
which scales all three axes by scale
.
Matrix4d.translationRotateScale(double tx,
double ty,
double tz,
double qx,
double qy,
double qz,
double qw,
double sx,
double sy,
double sz)
Set this
matrix to T * R * S
, where T
is a translation by the given (tx, ty, tz)
,
R
is a rotation transformation specified by the quaternion (qx, qy, qz, qw)
, and S
is a scaling transformation
which scales the three axes x, y and z by (sx, sy, sz)
.
Set this
matrix to T * R * S
, where T
is the given translation
,
R
is a rotation transformation specified by the given quaternion, and S
is a scaling transformation
which scales all three axes by scale
.
Set this
matrix to T * R * S
, where T
is the given translation
,
R
is a rotation transformation specified by the given quaternion, and S
is a scaling transformation
which scales the axes by scale
.
Set this
matrix to T * R * S
, where T
is the given translation
,
R
is a rotation transformation specified by the given quaternion, and S
is a scaling transformation
which scales all three axes by scale
.
Set this
matrix to T * R * S
, where T
is the given translation
,
R
is a rotation transformation specified by the given quaternion, and S
is a scaling transformation
which scales the axes by scale
.
Matrix4d.translationRotateScaleInvert(double tx,
double ty,
double tz,
double qx,
double qy,
double qz,
double qw,
double sx,
double sy,
double sz)
Set this
matrix to (T * R * S)-1
, where T
is a translation by the given (tx, ty, tz)
,
R
is a rotation transformation specified by the quaternion (qx, qy, qz, qw)
, and S
is a scaling transformation
which scales the three axes x, y and z by (sx, sy, sz)
.
Set this
matrix to (T * R * S)-1
, where T
is the given translation
,
R
is a rotation transformation specified by the given quaternion, and S
is a scaling transformation
which scales all three axes by scale
.
Set this
matrix to (T * R * S)-1
, where T
is the given translation
,
R
is a rotation transformation specified by the given quaternion, and S
is a scaling transformation
which scales the axes by scale
.
Set this
matrix to (T * R * S)-1
, where T
is the given translation
,
R
is a rotation transformation specified by the given quaternion, and S
is a scaling transformation
which scales all three axes by scale
.
Set this
matrix to (T * R * S)-1
, where T
is the given translation
,
R
is a rotation transformation specified by the given quaternion, and S
is a scaling transformation
which scales the axes by scale
.
Matrix4d.translationRotateScaleMulAffine(double tx,
double ty,
double tz,
double qx,
double qy,
double qz,
double qw,
double sx,
double sy,
double sz,
Matrix4d m)
Set
this
matrix to
T * R * S * M
, where
T
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)
and
M
is an
affine
matrix.
Set
this
matrix to
T * R * S * M
, where
T
is the given
translation
,
R
is a rotation - and possibly scaling - transformation specified by the given quaternion,
S
is a scaling transformation
which scales the axes by
scale
and
M
is an
affine
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)
.
Set this matrix to a model transformation for a right-handed coordinate system,
that translates to the given pos
and aligns the local -z
axis with dir
.
Transpose this
matrix and store the result into dest
.
Transpose only the upper left 3x3 submatrix of this matrix.
Transpose only the upper left 3x3 submatrix of this matrix and store the result in dest
.
Matrix4d.trapezoidCrop(double p0x,
double p0y,
double p1x,
double p1y,
double p2x,
double p2y,
double p3x,
double p3y)
Set this
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)]
.
Unproject the given 2D window coordinates (winX, winY)
by this
matrix using the specified viewport
and compute the origin and the direction of the resulting ray which starts at NDC z = -1.0
and goes through NDC z = +1.0
.
Unproject the given window coordinates winCoords
by this
matrix using the specified viewport
and compute the origin and the direction of the resulting ray which starts at NDC z = -1.0
and goes through NDC z = +1.0
.
Unproject the given 2D window coordinates (winX, winY)
by this
matrix using the specified viewport
and compute the origin and the direction of the resulting ray which starts at NDC z = -1.0
and goes through NDC z = +1.0
.
Unproject the given 2D window coordinates winCoords
by this
matrix using the specified viewport
and compute the origin and the direction of the resulting ray which starts at NDC z = -1.0
and goes through NDC z = +1.0
.
Apply a transformation to this matrix to ensure that the local Y axis (as obtained by
positiveY(Vector3d)
)
will be coplanar to the plane spanned by the local Z axis (as obtained by
positiveZ(Vector3d)
) and the
given vector
(upX, upY, upZ)
.
Apply a transformation to this matrix to ensure that the local Y axis (as obtained by
positiveY(Vector3d)
)
will be coplanar to the plane spanned by the local Z axis (as obtained by
positiveZ(Vector3d)
) and the
given vector
up
.
Set all the values within this matrix to 0.
Component-wise add this
and other
and store the result in dest
.
Component-wise add the upper 4x3 submatrices of this
and other
and store the result in dest
.
Component-wise add the upper 4x3 submatrices of this
and other
and store the result in dest
.
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 given radius
and center (centerX, centerY, centerZ)
position of the arcball and the specified X and Y rotation angles, and store the result in dest
.
Apply an arcball view transformation to this matrix with the given radius
and center
position of the arcball and the specified X and Y rotation angles, and store the result in dest
.
Compute the cofactor matrix of the upper left 3x3 submatrix of this
and store it into dest
.
Compute the cofactor matrix of the upper left 3x3 submatrix of this
and store it into dest
.
Component-wise add the upper 4x3 submatrices of this
and other
by first multiplying each component of other
's 4x3 submatrix by otherFactor
,
adding that to this
and storing the final result in dest
.
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 in dest
.
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 in dest
.
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 in dest
.
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 in dest
.
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 in dest
.
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 in dest
.
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 in dest
.
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 in dest
.
Get the current values of this
matrix and store them into
dest
.
Get the current values of this
matrix and store them into
dest
.
Get the current values of this
matrix and store them into
dest
.
Get the current values of this
matrix and store them into the upper 4x3 submatrix of dest
.
Get the current values of this
matrix and store them into the upper 4x3 submatrix of dest
.
Set the given destination matrix to the rotation represented by this
.
Set the given destination matrix to the rotation represented by this
.
Invert this
matrix and store the result in dest
.
Invert this matrix by assuming that it is an
affine
transformation (i.e.
If
this
is an arbitrary perspective projection matrix obtained via one of the
frustum()
methods,
then this method builds the inverse of
this
and stores it into the given
dest
.
Invert this
orthographic projection matrix and store the result into the given dest
.
If
this
is a perspective projection matrix obtained via one of the
perspective()
methods,
that is, if
this
is a symmetrical perspective frustum transformation,
then this method builds the inverse of
this
and stores it into the given
dest
.
If
this
is a perspective projection matrix obtained via one of the
perspective()
methods,
that is, if
this
is a symmetrical perspective frustum transformation
and the given
view
matrix is
affine
and has unit scaling (for example by being obtained via
lookAt()
),
then this method builds the inverse of
this * view
and stores it into the given
dest
.
If
this
is a perspective projection matrix obtained via one of the
perspective()
methods,
that is, if
this
is a symmetrical perspective frustum transformation
and the given
view
matrix has unit scaling,
then this method builds the inverse of
this * view
and stores it into the given
dest
.
Linearly interpolate this
and other
using the given interpolation factor t
and store the result in dest
.
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 along dir
and store the result in dest
.
Apply a rotation transformation to this matrix to make -z
point along dir
and store the result in dest
.
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 along dir
and store the result in dest
.
Apply a rotation transformation to this matrix to make -z
point along dir
and store the result in dest
.
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
with center - eye
and store the result in dest
.
Apply a "lookat" transformation to this matrix for a right-handed coordinate system,
that aligns -z
with center - eye
and store the result in dest
.
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
with center - eye
and store the result in dest
.
Apply a "lookat" transformation to this matrix for a right-handed coordinate system,
that aligns -z
with center - eye
and store the result in dest
.
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
with center - eye
and store the result in dest
.
Apply a "lookat" transformation to this matrix for a left-handed coordinate system,
that aligns +z
with center - eye
and store the result in dest
.
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
with center - eye
and store the result in dest
.
Apply a "lookat" transformation to this matrix for a left-handed coordinate system,
that aligns +z
with center - eye
and store the result in dest
.
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
with center - eye
and store the result in dest
.
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
with center - eye
and store the result in dest
.
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
with center - eye
and store the result in dest
.
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
with center - eye
and store the result in dest
.
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
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)
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 in dest
.
Multiply this matrix by the supplied right
matrix and store the result in dest
.
Multiply this matrix by the supplied right
matrix and store the result in dest
.
Multiply this matrix by the supplied right
matrix and store the result in dest
.
Multiply this matrix by the supplied parameter matrix and store the result in dest
.
Multiply this matrix by the supplied right
matrix and store the result in dest
.
Multiply this matrix by the supplied right
matrix and store the result in dest
.
Multiply this matrix by the supplied right
matrix and store the result in dest
.
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 in dest
.
Component-wise multiply the upper 4x3 submatrices of this
by other
and store the result in dest
.
Multiply this matrix by the supplied
right
matrix, both of which are assumed to be
affine
, and store the result in
dest
.
Multiply this matrix by the supplied
right
matrix, which is assumed to be
affine
, and store the result in
dest
.
Component-wise multiply this
by other
and store the result in dest
.
Pre-multiply this matrix by the supplied left
matrix and store the result in dest
.
Pre-multiply this matrix by the supplied
left
matrix, both of which are assumed to be
affine
, and store the result in
dest
.
Multiply
this
orthographic projection matrix by the supplied
affine
view
matrix
and store the result in
dest
.
Multiply
this
symmetric perspective projection matrix by the supplied
affine
view
matrix and store the result in
dest
.
Multiply this
symmetric perspective projection matrix by the supplied view
matrix and store the result in dest
.
Multiply this matrix, which is assumed to only contain a translation, by the supplied
right
matrix, which is assumed to be
affine
, and store the result in
dest
.
Multiply this
by the matrix
Multiply this
by the matrix
Multiply this
by the matrix
Compute a normal matrix from the upper left 3x3 submatrix of this
and store it into the upper left 3x3 submatrix of dest
.
Compute a normal matrix from the upper left 3x3 submatrix of this
and store it into the upper left 3x3 submatrix of dest
.
Normalize the upper left 3x3 submatrix of this matrix and store the result in dest
.
Apply an oblique projection transformation to this matrix with the given values for a
and
b
and store the result in dest
.
Apply an oblique projection transformation to this matrix with the given values for a
and
b
and store the result in dest
.
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 in dest
.
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 in dest
.
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 in dest
.
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 in dest
.
Matrix4d.ortho2D(double left,
double right,
double bottom,
double top,
Matrix4d dest)
Apply an orthographic projection transformation for a right-handed coordinate system
to this matrix and store the result in dest
.
Matrix4dc.ortho2D(double left,
double right,
double bottom,
double top,
Matrix4d dest)
Apply an orthographic projection transformation for a right-handed coordinate system
to this matrix and store the result in dest
.
Matrix4d.ortho2DLH(double left,
double right,
double bottom,
double top,
Matrix4d dest)
Apply an orthographic projection transformation for a left-handed coordinate system to this matrix and store the result in dest
.
Matrix4dc.ortho2DLH(double left,
double right,
double bottom,
double top,
Matrix4d dest)
Apply an orthographic projection transformation for a left-handed coordinate system to this matrix and store the result in dest
.
Build an ortographic projection transformation that fits the view-projection transformation represented by this
into the given affine view
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 in dest
.
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 in dest
.
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 in dest
.
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 in dest
.
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 in 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 in dest
.
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 in 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 in 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 in 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 in 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 in 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 in dest
.
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 in 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 in dest
.
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 in 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 in dest
.
Change the near and far clip plane distances of this
perspective frustum transformation matrix
and store the result in dest
.
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 in 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 in dest
.
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 in 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 in dest
.
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 in 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 in dest
.
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 in 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 in dest
.
Matrix4d.perspectiveOffCenterFov(double angleLeft,
double angleRight,
double angleDown,
double angleUp,
double zNear,
double zFar,
boolean zZeroToOne,
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 in 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 in dest
.
Matrix4d.perspectiveOffCenterFovLH(double angleLeft,
double angleRight,
double angleDown,
double angleUp,
double zNear,
double zFar,
boolean zZeroToOne,
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 in 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 in dest
.
static void
Create a view and off-center perspective projection matrix from a given eye
position, a given bottom left corner position p
of the near plane rectangle
and the extents of the near plane rectangle along its local x
and y
axes, and store the resulting matrices
in projDest
and viewDest
.
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 in 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 in dest
.
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 in 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 in dest
.
Matrix4d.pick(double x,
double y,
double width,
double height,
int[] viewport,
Matrix4d dest)
Matrix4dc.pick(double x,
double y,
double width,
double height,
int[] viewport,
Matrix4d dest)
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
in 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 be
this
, and store that range matrix into
dest
.
Matrix4d.reflect(double nx,
double ny,
double nz,
double px,
double py,
double pz,
Matrix4d dest)
Matrix4dc.reflect(double nx,
double ny,
double nz,
double px,
double py,
double pz,
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 in dest
.
Apply a mirror/reflection transformation to this matrix that reflects about the given plane
specified via the equation x*a + y*b + z*c + d = 0
and store the result in 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 in 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 in dest
.
Matrix4d.rotate(double ang,
double x,
double y,
double z,
Matrix4d dest)
Apply a rotation transformation, rotating the given radians about the specified axis and store the result in dest
.
Apply a rotation transformation, rotating the given radians about the specified axis and store the result in dest
.
Apply a rotation transformation, rotating about the given
AxisAngle4d
and store the result in
dest
.
Apply a rotation transformation, rotating about the given
AxisAngle4f
and store the result in
dest
.
Apply the rotation - and possibly scaling - transformation of the given
Quaterniondc
to this matrix and store
the result in
dest
.
Apply the rotation - and possibly scaling - transformation of the given
Quaternionfc
to this matrix and store
the result in
dest
.
Matrix4dc.rotate(double ang,
double x,
double y,
double z,
Matrix4d dest)
Apply rotation to this matrix by rotating the given amount of radians
about the given axis specified as x, y and z components and store the result in dest
.
Apply a rotation transformation, rotating the given radians about the specified axis and store the result in dest
.
Apply a rotation transformation, rotating the given radians about the specified axis and store the result in dest
.
Apply a rotation transformation, rotating about the given
AxisAngle4d
and store the result in
dest
.
Apply a rotation transformation, rotating about the given
AxisAngle4f
and store the result in
dest
.
Apply the rotation - and possibly scaling - transformation of the given
Quaterniondc
to this matrix and store
the result in
dest
.
Apply the rotation - and possibly scaling - transformation of the given
Quaternionfc
to this matrix and store
the result in
dest
.
Apply rotation to this
affine
matrix by rotating the given amount of radians
about the specified
(x, y, z)
axis and store the result in
dest
.
Apply the rotation - and possibly scaling - transformation of the given
Quaterniondc
to this
affine
matrix and store
the result in
dest
.
Apply the rotation - and possibly scaling - transformation of the given
Quaternionfc
to this
affine
matrix and store
the result in
dest
.
Apply rotation to this
affine
matrix by rotating the given amount of radians
about the specified
(x, y, z)
axis and store the result in
dest
.
Apply the rotation - and possibly scaling - transformation of the given
Quaterniondc
to this
affine
matrix and store
the result in
dest
.
Apply the rotation - and possibly scaling - transformation of the given
Quaternionfc
to this
affine
matrix and store
the result in
dest
.
Apply rotation of angleX
radians about the X axis, followed by a rotation of angleY
radians about the Y axis and
followed by a rotation of angleZ
radians about the Z axis and store the result in dest
.
Apply rotation of angleY
radians about the Y axis, followed by a rotation of angleX
radians about the X axis and
followed by a rotation of angleZ
radians about the Z axis and store the result in dest
.
Apply rotation of angleZ
radians about the Z axis, followed by a rotation of angleY
radians about the Y axis and
followed by a rotation of angleX
radians about the X axis and store the result in dest
.
Apply the rotation - and possibly scaling - transformation of the given
Quaterniondc
to this matrix while using
(ox, oy, oz)
as the rotation origin,
and store the result in
dest
.
Apply the rotation - and possibly scaling - transformation of the given
Quaterniondc
to this
affine
matrix while using
(ox, oy, oz)
as the rotation origin, and store the result in
dest
.
Pre-multiply the rotation - and possibly scaling - transformation of the given
Quaterniondc
to this matrix while using
(ox, oy, oz)
as the rotation origin, and store the result in
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 in dest
.
Pre-multiply the rotation - and possibly scaling - transformation of the given
Quaterniondc
to this matrix and store
the result in
dest
.
Pre-multiply the rotation - and possibly scaling - transformation of the given
Quaternionfc
to this matrix and store
the result in
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 in dest
.
Pre-multiply the rotation - and possibly scaling - transformation of the given
Quaterniondc
to this matrix and store
the result in
dest
.
Pre-multiply the rotation - and possibly scaling - transformation of the given
Quaternionfc
to this matrix and store
the result in
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 in 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 in 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 in 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 in 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 in 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 in dest
.
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 with dir
and store the result in dest
.
Apply a model transformation to this matrix for a right-handed coordinate system,
that aligns the local +Z
axis with direction
and store the result in dest
.
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 with dir
and store the result in dest
.
Apply a model transformation to this matrix for a right-handed coordinate system,
that aligns the local +Z
axis with direction
and store the result in dest
.
Apply rotation about the Z axis to align the local +X
towards (dirX, dirY)
and store the result in 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 in dest
.
Apply the rotation - and possibly scaling - transformation of the given
Quaterniondc
to this matrix, which is assumed to only contain a translation, and store
the result in
dest
.
Apply the rotation - and possibly scaling - transformation of the given
Quaternionfc
to this matrix, which is assumed to only contain a translation, and store
the result in
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 in dest
.
Apply the rotation - and possibly scaling - transformation of the given
Quaterniondc
to this matrix, which is assumed to only contain a translation, and store
the result in
dest
.
Apply the rotation - and possibly scaling - transformation of the given
Quaternionfc
to this matrix, which is assumed to only contain a translation, and store
the result in
dest
.
Apply rotation about the X axis to this matrix by rotating the given amount of radians
and store the result in dest
.
Apply rotation of angleX
radians about the X axis, followed by a rotation of angleY
radians about the Y axis and
followed by a rotation of angleZ
radians about the Z axis and store the result in dest
.
Apply rotation about the Y axis to this matrix by rotating the given amount of radians
and store the result in dest
.
Apply rotation of angleY
radians about the Y axis, followed by a rotation of angleX
radians about the X axis and
followed by a rotation of angleZ
radians about the Z axis and store the result in dest
.
Apply rotation about the Z axis to this matrix by rotating the given amount of radians
and store the result in dest
.
Apply rotation of angleZ
radians about the Z axis, followed by a rotation of angleY
radians about the Y axis and
followed by a rotation of angleX
radians about the X axis and store the result in dest
.
Apply scaling to this
matrix by scaling the base axes by the given x,
y and z factors and store the result in dest
.
Apply scaling to this matrix by uniformly scaling all base axes by the given xyz factor
and store the result in dest
.
Apply scaling to this
matrix by scaling the base axes by the given xyz.x
,
xyz.y
and xyz.z
factors, respectively and store the result in dest
.
Matrix4d.scaleAround(double sx,
double sy,
double sz,
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 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,
and store the result in dest
.
Apply scaling to this matrix by scaling all three base axes by the given factor
while using (ox, oy, oz)
as the scaling origin,
and store the result in dest
.
Pre-multiply scaling to this
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 in dest
.
Pre-multiply scaling to this matrix by scaling all three base axes by the given factor
while using (ox, oy, oz)
as the scaling origin,
and store the result in dest
.
Pre-multiply scaling to this
matrix by scaling the base axes by the given x,
y and z factors and store the result in dest
.
Pre-multiply scaling to this
matrix by scaling all base axes by the given xyz
factor,
and store the result in dest
.
Apply scaling to this matrix by by scaling the X axis by x
and the Y axis by y
and store the result in dest
.
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 equation
y = 0
as if casting a shadow from a given light position/direction light
.
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 equation
x*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 in dest
.
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 equation
y = 0
as if casting a shadow from a given light position/direction (lightX, lightY, lightZ, lightW)
and store the result in dest
.
Apply a projection transformation to this matrix that projects onto the plane specified via the general plane equation
x*a + y*b + z*c + d = 0
as if casting a shadow from a given light position/direction light
and store the result in dest
.
Apply a projection transformation to this matrix that projects onto the plane with the general plane equation
y = 0
as if casting a shadow from a given light position/direction light
and store the result in dest
.
Component-wise subtract subtrahend
from this
and store the result in dest
.
Component-wise subtract the upper 4x3 submatrices of subtrahend
from this
and store the result in dest
.
Exchange the values of this
matrix with the given other
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 in dest
.
Apply a translation to this matrix by translating by the given number of
units in x, y and z and store the result in dest
.
Apply a translation to this matrix by translating by the given number of
units in x, y and z and store the result in dest
.
Apply a translation to this matrix by translating by the given number of
units in x, y and z and store the result in dest
.
Apply a translation to this matrix by translating by the given number of
units in x, y and z and store the result in dest
.
Apply a translation to this matrix by translating by the given number of
units in x, y and z and store the result in 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 in 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 in 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 in 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 in 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 in 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 in dest
.
Matrix4d.translationRotateScaleMulAffine(double tx,
double ty,
double tz,
double qx,
double qy,
double qz,
double qw,
double sx,
double sy,
double sz,
Matrix4d m)
Set
this
matrix to
T * R * S * M
, where
T
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)
and
M
is an
affine
matrix.
Set
this
matrix to
T * R * S * M
, where
T
is the given
translation
,
R
is a rotation - and possibly scaling - transformation specified by the given quaternion,
S
is a scaling transformation
which scales the axes by
scale
and
M
is an
affine
matrix.
Transpose this
matrix and store the result into dest
.
Transpose only the upper left 3x3 submatrix of this matrix and store the result in dest
.