Class Matrix3d
- All Implemented Interfaces:
Externalizable
,Serializable
,Cloneable
,Matrix3dc
- Direct Known Subclasses:
Matrix3dStack
m00 m10 m20
m01 m11 m21
m02 m12 m22
- Author:
- Richard Greenlees, Kai Burjack
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionMatrix3d()
Matrix3d
(double m00, double m01, double m02, double m10, double m11, double m12, double m20, double m21, double m22) Create a newMatrix3d
and initialize its elements with the given values.Matrix3d
(DoubleBuffer buffer) Create a newMatrix3d
by reading its 9 double components from the givenDoubleBuffer
at the buffer's current position.Create a newMatrix3d
and initialize it with the values from the given matrix.Create a newMatrix3d
and initialize it with the values from the given matrix.Create a newMatrix3d
and initialize its three columns using the supplied vectors. -
Method Summary
Modifier and TypeMethodDescriptionComponent-wise addthis
andother
.Component-wise addthis
andother
and store the result indest
.clone()
cofactor()
Compute the cofactor matrix ofthis
.Compute the cofactor matrix ofthis
and store it intodest
.double
Return the determinant of this matrix.boolean
boolean
Compare the matrix elements ofthis
matrix with the given matrix using the givendelta
and return whether all of them are equal within a maximum difference ofdelta
.double[]
get
(double[] arr) Store this matrix into the supplied double array in column-major order.double[]
get
(double[] arr, int offset) Store this matrix into the supplied double array in column-major order at the given offset.float[]
get
(float[] arr) Store the elements of this matrix as float values in column-major order into the supplied float array.float[]
get
(float[] arr, int offset) Store the elements of this matrix as float values in column-major order into the supplied float array at the given offset.double
get
(int column, int row) Get the matrix element value at the given column and row.get
(int index, ByteBuffer buffer) Store this matrix in column-major order into the suppliedByteBuffer
starting at the specified absolute buffer position/index.get
(int index, DoubleBuffer buffer) Store this matrix into the suppliedDoubleBuffer
starting at the specified absolute buffer position/index using column-major order.get
(int index, FloatBuffer buffer) Store this matrix in column-major order into the suppliedFloatBuffer
starting at the specified absolute buffer position/index.get
(ByteBuffer buffer) Store this matrix in column-major order into the suppliedByteBuffer
at the current bufferposition
.get
(DoubleBuffer buffer) Store this matrix into the suppliedDoubleBuffer
at the current bufferposition
using column-major order.get
(FloatBuffer buffer) Store this matrix in column-major order into the suppliedFloatBuffer
at the current bufferposition
.Get the current values ofthis
matrix and store them intodest
.Get the column at the givencolumn
index, starting with0
.getEulerAnglesXYZ
(Vector3d dest) Extract the Euler angles from the rotation represented bythis
matrix and store the extracted Euler angles indest
.getEulerAnglesZYX
(Vector3d dest) Extract the Euler angles from the rotation represented bythis
matrix and store the extracted Euler angles indest
.getFloats
(int index, ByteBuffer buffer) Store the elements of this matrix as float values in column-major order into the suppliedByteBuffer
starting at the specified absolute buffer position/index.getFloats
(ByteBuffer buffer) Store the elements of this matrix as float values in column-major order into the suppliedByteBuffer
at the current bufferposition
.Get the current values ofthis
matrix and store the represented rotation into the givenQuaterniond
.Get the current values ofthis
matrix and store the represented rotation into the givenQuaternionf
.getRotation
(AxisAngle4f dest) Get the current values ofthis
matrix and store the represented rotation into the givenAxisAngle4f
.Get the row at the givenrow
index, starting with0
.double
getRowColumn
(int row, int column) Get the matrix element value at the given row and column.Get the scaling factors ofthis
matrix for the three base axes.getToAddress
(long address) Store this matrix in column-major order at the given off-heap address.getTransposed
(int index, ByteBuffer buffer) Store this matrix in row-major order into the suppliedByteBuffer
starting at the specified absolute buffer position/index.getTransposed
(int index, DoubleBuffer buffer) Store this matrix in row-major order into the suppliedDoubleBuffer
starting at the specified absolute buffer position/index.getTransposed
(int index, FloatBuffer buffer) Store this matrix in row-major order into the suppliedFloatBuffer
starting at the specified absolute buffer position/index.getTransposed
(ByteBuffer buffer) Store this matrix in row-major order into the suppliedByteBuffer
at the current bufferposition
.getTransposed
(DoubleBuffer buffer) Store this matrix in row-major order into the suppliedDoubleBuffer
at the current bufferposition
.getTransposed
(FloatBuffer buffer) Store this matrix in row-major order into the suppliedFloatBuffer
at the current bufferposition
.getTransposedFloats
(int index, ByteBuffer buffer) Store this matrix in row-major order into the suppliedByteBuffer
starting at the specified absolute buffer position/index.getTransposedFloats
(ByteBuffer buffer) Store this matrix as float values in row-major order into the suppliedByteBuffer
at the current bufferposition
.Get the current values ofthis
matrix and store the represented rotation into the givenQuaterniond
.Get the current values ofthis
matrix and store the represented rotation into the givenQuaternionf
.int
hashCode()
identity()
Set this matrix to the identity.invert()
Invert this matrix.Invertthis
matrix and store the result indest
.boolean
isFinite()
Linearly interpolatethis
andother
using the given interpolation factort
and store the result inthis
.Linearly interpolatethis
andother
using the given interpolation factort
and store the result indest
.lookAlong
(double dirX, double dirY, double dirZ, double upX, double upY, double upZ) Apply a rotation transformation to this matrix to make-z
point alongdir
.Apply a rotation transformation to this matrix to make-z
point alongdir
and store the result indest
.Apply a rotation transformation to this matrix to make-z
point alongdir
.Apply a rotation transformation to this matrix to make-z
point alongdir
and store the result indest
.double
m00()
Return the value of the matrix element at column 0 and row 0.m00
(double m00) Set the value of the matrix element at column 0 and row 0.double
m01()
Return the value of the matrix element at column 0 and row 1.m01
(double m01) Set the value of the matrix element at column 0 and row 1.double
m02()
Return the value of the matrix element at column 0 and row 2.m02
(double m02) Set the value of the matrix element at column 0 and row 2.double
m10()
Return the value of the matrix element at column 1 and row 0.m10
(double m10) Set the value of the matrix element at column 1 and row 0.double
m11()
Return the value of the matrix element at column 1 and row 1.m11
(double m11) Set the value of the matrix element at column 1 and row 1.double
m12()
Return the value of the matrix element at column 1 and row 2.m12
(double m12) Set the value of the matrix element at column 1 and row 2.double
m20()
Return the value of the matrix element at column 2 and row 0.m20
(double m20) Set the value of the matrix element at column 2 and row 0.double
m21()
Return the value of the matrix element at column 2 and row 1.m21
(double m21) Set the value of the matrix element at column 2 and row 1.double
m22()
Return the value of the matrix element at column 2 and row 2.m22
(double m22) Set the value of the matrix element at column 2 and row 2.Multiplythis
by the matrixMultiplythis
by the matrixmapnXnYZ()
Multiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixmapnXnZY()
Multiplythis
by the matrixMultiplythis
by the matrixmapnXYnZ()
Multiplythis
by the matrixMultiplythis
by the matrixmapnXZnY()
Multiplythis
by the matrixMultiplythis
by the matrixmapnXZY()
Multiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixmapnYnXZ()
Multiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixmapnYnZX()
Multiplythis
by the matrixMultiplythis
by the matrixmapnYXnZ()
Multiplythis
by the matrixMultiplythis
by the matrixmapnYXZ()
Multiplythis
by the matrixMultiplythis
by the matrixmapnYZnX()
Multiplythis
by the matrixMultiplythis
by the matrixmapnYZX()
Multiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixmapnZnXY()
Multiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixMultiplythis
by the matrixmapnZnYX()
Multiplythis
by the matrixMultiplythis
by the matrixmapnZXnY()
Multiplythis
by the matrixMultiplythis
by the matrixmapnZXY()
Multiplythis
by the matrixMultiplythis
by the matrixmapnZYnX()
Multiplythis
by the matrixMultiplythis
by the matrixmapnZYX()
Multiplythis
by the matrixMultiplythis
by the matrixmapXnYnZ()
Multiplythis
by the matrixMultiplythis
by the matrixmapXnZnY()
Multiplythis
by the matrixMultiplythis
by the matrixmapXnZY()
Multiplythis
by the matrixMultiplythis
by the matrixmapXZnY()
Multiplythis
by the matrixMultiplythis
by the matrixmapXZY()
Multiplythis
by the matrixMultiplythis
by the matrixmapYnXnZ()
Multiplythis
by the matrixMultiplythis
by the matrixmapYnXZ()
Multiplythis
by the matrixMultiplythis
by the matrixmapYnZnX()
Multiplythis
by the matrixMultiplythis
by the matrixmapYnZX()
Multiplythis
by the matrixMultiplythis
by the matrixmapYXnZ()
Multiplythis
by the matrixMultiplythis
by the matrixmapYXZ()
Multiplythis
by the matrixMultiplythis
by the matrixmapYZnX()
Multiplythis
by the matrixMultiplythis
by the matrixmapYZX()
Multiplythis
by the matrixMultiplythis
by the matrixmapZnXnY()
Multiplythis
by the matrixMultiplythis
by the matrixmapZnXY()
Multiplythis
by the matrixMultiplythis
by the matrixmapZnYnX()
Multiplythis
by the matrixMultiplythis
by the matrixmapZnYX()
Multiplythis
by the matrixMultiplythis
by the matrixmapZXnY()
Multiplythis
by the matrixMultiplythis
by the matrixmapZXY()
Multiplythis
by the matrixMultiplythis
by the matrixmapZYnX()
Multiplythis
by the matrixMultiplythis
by the matrixmapZYX()
Multiplythis
by the matrixMultiplythis
by the matrixMultiply this matrix by the supplied matrix.Multiply this matrix by the supplied matrix and store the result indest
.Multiply this matrix by the supplied matrix.Multiply this matrix by the supplied matrix and store the result indest
.mulComponentWise
(Matrix3dc other) Component-wise multiplythis
byother
.mulComponentWise
(Matrix3dc other, Matrix3d dest) Component-wise multiplythis
byother
and store the result indest
.Pre-multiply this matrix by the suppliedleft
matrix and store the result inthis
.Pre-multiply this matrix by the suppliedleft
matrix and store the result indest
.negateX()
Multiplythis
by the matrixMultiplythis
by the matrixnegateY()
Multiplythis
by the matrixMultiplythis
by the matrixnegateZ()
Multiplythis
by the matrixMultiplythis
by the matrixnormal()
Setthis
matrix to its own normal matrix.Compute a normal matrix fromthis
matrix and store it intodest
.Obtain the direction of+X
before the transformation represented bythis
orthogonal matrix is applied.Obtain the direction of+Y
before the transformation represented bythis
orthogonal matrix is applied.Obtain the direction of+Z
before the transformation represented bythis
orthogonal matrix is applied.obliqueZ
(double a, double b) Apply an oblique projection transformation to this matrix with the given values fora
andb
.Apply an oblique projection transformation to this matrix with the given values fora
andb
and store the result indest
.Obtain the direction of+X
before the transformation represented bythis
matrix is applied.Obtain the direction of+Y
before the transformation represented bythis
matrix is applied.Obtain the direction of+Z
before the transformation represented bythis
matrix is applied.double
quadraticFormProduct
(double x, double y, double z) Compute(x, y, z)^T * this * (x, y, z)
.double
Computev^T * this * v
.double
Computev^T * this * v
.void
reflect
(double nx, double ny, double nz) Apply a mirror/reflection transformation to this matrix that reflects through the given plane specified via the plane normal.Apply a mirror/reflection transformation to this matrix that reflects through the given plane specified via the plane normal(nx, ny, nz)
, and store the result indest
.reflect
(Quaterniondc orientation) Apply a mirror/reflection transformation to this matrix that reflects about a plane specified via the plane orientation.reflect
(Quaterniondc orientation, Matrix3d dest) Apply a mirror/reflection transformation to this matrix that reflects through a plane specified via the plane orientation, and store the result indest
.Apply a mirror/reflection transformation to this matrix that reflects through the given plane specified via the plane normal.Apply a mirror/reflection transformation to this matrix that reflects through the given plane specified via the plane normal, and store the result indest
.reflection
(double nx, double ny, double nz) Set this matrix to a mirror/reflection transformation that reflects through the given plane specified via the plane normal.reflection
(Quaterniondc orientation) Set this matrix to a mirror/reflection transformation that reflects through a plane specified via the plane orientation.reflection
(Vector3dc normal) Set this matrix to a mirror/reflection transformation that reflects through the given plane specified via the plane normal.rotate
(double ang, double x, double y, double z) Apply rotation to this matrix by rotating the given amount of radians about the given axis specified as x, y and z components.Apply rotation to this matrix by rotating the given amount of radians about the given axis specified as x, y and z components, and store the result indest
.Apply a rotation transformation, rotating the given radians about the specified axis, to this matrix.Apply a rotation transformation, rotating the given radians about the specified axis and store the result indest
.Apply a rotation transformation, rotating the given radians about the specified axis, to this matrix.Apply a rotation transformation, rotating the given radians about the specified axis and store the result indest
.rotate
(AxisAngle4d axisAngle) Apply a rotation transformation, rotating about the givenAxisAngle4d
, to this matrix.rotate
(AxisAngle4d axisAngle, Matrix3d dest) Apply a rotation transformation, rotating about the givenAxisAngle4d
and store the result indest
.rotate
(AxisAngle4f axisAngle) Apply a rotation transformation, rotating about the givenAxisAngle4f
, to this matrix.rotate
(AxisAngle4f axisAngle, Matrix3d dest) Apply a rotation transformation, rotating about the givenAxisAngle4f
and store the result indest
.rotate
(Quaterniondc quat) Apply the rotation - and possibly scaling - transformation of the givenQuaterniondc
to this matrix.rotate
(Quaterniondc quat, Matrix3d dest) Apply the rotation - and possibly scaling - transformation of the givenQuaterniondc
to this matrix and store the result indest
.rotate
(Quaternionfc quat) Apply the rotation - and possibly scaling - transformation of the givenQuaternionfc
to this matrix.rotate
(Quaternionfc quat, Matrix3d dest) Apply the rotation - and possibly scaling - transformation of the givenQuaternionfc
to this matrix and store the result indest
.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.rotateLocal
(double ang, double x, double y, double z, Matrix3d dest) Pre-multiply a rotation to this matrix by rotating the given amount of radians about the specified(x, y, z)
axis and store the result indest
.rotateLocal
(Quaterniondc quat) Pre-multiply the rotation - and possibly scaling - transformation of the givenQuaterniondc
to this matrix.rotateLocal
(Quaterniondc quat, Matrix3d dest) Pre-multiply the rotation - and possibly scaling - transformation of the givenQuaterniondc
to this matrix and store the result indest
.rotateLocal
(Quaternionfc quat) Pre-multiply the rotation - and possibly scaling - transformation of the givenQuaternionfc
to this matrix.rotateLocal
(Quaternionfc quat, Matrix3d dest) Pre-multiply the rotation - and possibly scaling - transformation of the givenQuaternionfc
to this matrix and store the result indest
.rotateLocalX
(double ang) Pre-multiply a rotation to this matrix by rotating the given amount of radians about the X axis.rotateLocalX
(double ang, Matrix3d dest) Pre-multiply a rotation around the X axis to this matrix by rotating the given amount of radians about the X axis and store the result indest
.rotateLocalY
(double ang) Pre-multiply a rotation to this matrix by rotating the given amount of radians about the Y axis.rotateLocalY
(double ang, Matrix3d dest) Pre-multiply a rotation around the Y axis to this matrix by rotating the given amount of radians about the Y axis and store the result indest
.rotateLocalZ
(double ang) Pre-multiply a rotation to this matrix by rotating the given amount of radians about the Z axis.rotateLocalZ
(double ang, Matrix3d dest) Pre-multiply a rotation around the Z axis to this matrix by rotating the given amount of radians about the Z axis and store the result indest
.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 withdirection
.rotateTowards
(double dirX, double dirY, double dirZ, double upX, double upY, double upZ, Matrix3d dest) Apply a model transformation to this matrix for a right-handed coordinate system, that aligns the local+Z
axis withdir
and store the result indest
.rotateTowards
(Vector3dc direction, Vector3dc up) Apply a model transformation to this matrix for a right-handed coordinate system, that aligns the local+Z
axis withdirection
.rotateTowards
(Vector3dc direction, Vector3dc up, Matrix3d dest) Apply a model transformation to this matrix for a right-handed coordinate system, that aligns the local+Z
axis withdirection
and store the result indest
.rotateX
(double ang) Apply rotation about the X axis to this matrix by rotating the given amount of radians.Apply rotation about the X axis to this matrix by rotating the given amount of radians and store the result indest
.rotateXYZ
(double angleX, double angleY, double angleZ) Apply rotation ofangleX
radians about the X axis, followed by a rotation ofangleY
radians about the Y axis and followed by a rotation ofangleZ
radians about the Z axis.Apply rotation ofangleX
radians about the X axis, followed by a rotation ofangleY
radians about the Y axis and followed by a rotation ofangleZ
radians about the Z axis and store the result indest
.rotateY
(double ang) Apply rotation about the Y axis to this matrix by rotating the given amount of radians.Apply rotation about the Y axis to this matrix by rotating the given amount of radians and store the result indest
.rotateYXZ
(double angleY, double angleX, double angleZ) Apply rotation ofangleY
radians about the Y axis, followed by a rotation ofangleX
radians about the X axis and followed by a rotation ofangleZ
radians about the Z axis.Apply rotation ofangleY
radians about the Y axis, followed by a rotation ofangleX
radians about the X axis and followed by a rotation ofangleZ
radians about the Z axis and store the result indest
.Apply rotation ofangles.y
radians about the Y axis, followed by a rotation ofangles.x
radians about the X axis and followed by a rotation ofangles.z
radians about the Z axis.rotateZ
(double ang) Apply rotation about the Z axis to this matrix by rotating the given amount of radians.Apply rotation about the Z axis to this matrix by rotating the given amount of radians and store the result indest
.rotateZYX
(double angleZ, double angleY, double angleX) Apply rotation ofangleZ
radians about the Z axis, followed by a rotation ofangleY
radians about the Y axis and followed by a rotation ofangleX
radians about the X axis.Apply rotation ofangleZ
radians about the Z axis, followed by a rotation ofangleY
radians about the Y axis and followed by a rotation ofangleX
radians about the X axis and store the result indest
.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.rotation
(AxisAngle4d axisAngle) Set this matrix to a rotation transformation using the givenAxisAngle4d
.rotation
(AxisAngle4f axisAngle) Set this matrix to a rotation transformation using the givenAxisAngle4f
.rotation
(Quaterniondc quat) Set this matrix to the rotation - and possibly scaling - transformation of the givenQuaterniondc
.rotation
(Quaternionfc quat) Set this matrix to the rotation - and possibly scaling - transformation of the givenQuaternionfc
.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 withcenter - eye
.rotationTowards
(Vector3dc dir, Vector3dc up) Set this matrix to a model transformation for a right-handed coordinate system, that aligns the local-z
axis withcenter - eye
.rotationX
(double ang) Set this matrix to a rotation transformation about the X axis.rotationXYZ
(double angleX, double angleY, double angleZ) Set this matrix to a rotation ofangleX
radians about the X axis, followed by a rotation ofangleY
radians about the Y axis and followed by a rotation ofangleZ
radians about the Z axis.rotationY
(double ang) Set this matrix to a rotation transformation about the Y axis.rotationYXZ
(double angleY, double angleX, double angleZ) Set this matrix to a rotation ofangleY
radians about the Y axis, followed by a rotation ofangleX
radians about the X axis and followed by a rotation ofangleZ
radians about the Z axis.rotationZ
(double ang) Set this matrix to a rotation transformation about the Z axis.rotationZYX
(double angleZ, double angleY, double angleX) Set this matrix to a rotation ofangleZ
radians about the Z axis, followed by a rotation ofangleY
radians about the Y axis and followed by a rotation ofangleX
radians about the X axis.scale
(double xyz) Apply scaling to this matrix by uniformly scaling all base axes by the givenxyz
factor.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 x, y and z factors and store the result indest
.Apply scaling to this matrix by uniformly scaling all base axes by the givenxyz
factor and store the result indest
.Apply scaling to this matrix by scaling the base axes by the givenxyz.x
,xyz.y
andxyz.z
factors, respectively.Apply scaling tothis
matrix by scaling the base axes by the givenxyz.x
,xyz.y
andxyz.z
factors, respectively and store the result indest
.scaleLocal
(double x, double y, double z) Pre-multiply scaling to this matrix by scaling the base axes by the given x, y and z factors.scaleLocal
(double x, double y, double z, Matrix3d dest) Pre-multiply scaling tothis
matrix by scaling the base axes by the given x, y and z factors and store the result indest
.scaling
(double factor) Set this matrix to be a simple scale matrix, which scales all axes uniformly by the given factor.scaling
(double x, double y, double z) Set this matrix to be a simple scale matrix.Set this matrix to be a simple scale matrix which scales the base axes byxyz.x
,xyz.y
andxyz.z
respectively.set
(double[] m) Set the values in this matrix based on the supplied double array.set
(double m00, double m01, double m02, double m10, double m11, double m12, double m20, double m21, double m22) Set the values within this matrix to the supplied double values.set
(float[] m) Set the values in this matrix based on the supplied double array.set
(int column, int row, double value) Set the matrix element at the given column and row to the specified value.set
(int index, ByteBuffer buffer) Set the values of this matrix by reading 9 double values from the givenByteBuffer
in column-major order, starting at the specified absolute buffer position/index.set
(int index, DoubleBuffer buffer) Set the values of this matrix by reading 9 double values from the givenDoubleBuffer
in column-major order, starting at the specified absolute buffer position/index.set
(int index, FloatBuffer buffer) Set the values of this matrix by reading 9 float values from the givenFloatBuffer
in column-major order, starting at the specified absolute buffer position/index.set
(ByteBuffer buffer) Set the values of this matrix by reading 9 double values from the givenByteBuffer
in column-major order, starting at its current position.set
(DoubleBuffer buffer) Set the values of this matrix by reading 9 double values from the givenDoubleBuffer
in column-major order, starting at its current position.set
(FloatBuffer buffer) Set the values of this matrix by reading 9 float values from the givenFloatBuffer
in column-major order, starting at its current position.set
(AxisAngle4d axisAngle) Set this matrix to be equivalent to the rotation specified by the givenAxisAngle4d
.set
(AxisAngle4f axisAngle) Set this matrix to be equivalent to the rotation specified by the givenAxisAngle4f
.Set the values in this matrix to the ones in m.Set the values in this matrix to the ones in m.Set the elements of this matrix to the upper left 3x3 of the givenMatrix4dc
.Set the elements of this matrix to the upper left 3x3 of the givenMatrix4fc
.set
(Matrix4x3dc m) Set the elements of this matrix to the left 3x3 submatrix ofm
.set
(Quaterniondc q) Set this matrix to a rotation - and possibly scaling - equivalent to the given quaternion.set
(Quaternionfc q) Set this matrix to a rotation - and possibly scaling - equivalent to the given quaternion.Set the three columns of this matrix to the supplied vectors, respectively.setColumn
(int column, double x, double y, double z) Set the column at the givencolumn
index, starting with0
.Set the column at the givencolumn
index, starting with0
.setFloats
(int index, ByteBuffer buffer) Set the values of this matrix by reading 9 float values from the givenByteBuffer
in column-major order, starting at the specified absolute buffer position/index.setFloats
(ByteBuffer buffer) Set the values of this matrix by reading 9 float values from the givenByteBuffer
in column-major order, starting at its current position.setFromAddress
(long address) Set the values of this matrix by reading 9 double values from off-heap memory in column-major order, starting at the given address.setLookAlong
(double dirX, double dirY, double dirZ, double upX, double upY, double upZ) Set this matrix to a rotation transformation to make-z
point alongdir
.setLookAlong
(Vector3dc dir, Vector3dc up) Set this matrix to a rotation transformation to make-z
point alongdir
.setRow
(int row, double x, double y, double z) Set the row at the givenrow
index, starting with0
.Set the row at the givenrow
index, starting with0
.setRowColumn
(int row, int column, double value) Set the matrix element at the given row and column to the specified value.setSkewSymmetric
(double a, double b, double c) Set this matrix to a skew-symmetric matrix using the following layout:Store the values of the transpose of the given matrixm
intothis
matrix.Store the values of the transpose of the given matrixm
intothis
matrix.Component-wise subtractsubtrahend
fromthis
.Component-wise subtractsubtrahend
fromthis
and store the result indest
.Exchange the values ofthis
matrix with the givenother
matrix.toString()
Return a string representation of this matrix.toString
(NumberFormat formatter) Return a string representation of this matrix by formatting the matrix elements with the givenNumberFormat
.Transform the vector(x, y, z)
by this matrix and store the result indest
.Transform the given vector by this matrix.Transform the given vector by this matrix and store the result indest
.Transform the given vector by this matrix.Transform the given vector by this matrix and store the result indest
.transformTranspose
(double x, double y, double z, Vector3d dest) Transform the vector(x, y, z)
by the transpose of this matrix and store the result indest
.Transform the given vector by the transpose of this matrix.transformTranspose
(Vector3dc v, Vector3d dest) Transform the given vector by the transpose of this matrix and store the result indest
.Transpose this matrix.Transposethis
matrix and store the result indest
.void
zero()
Set all the values within this matrix to 0.
-
Field Details
-
m00
public double m00 -
m01
public double m01 -
m02
public double m02 -
m10
public double m10 -
m11
public double m11 -
m12
public double m12 -
m20
public double m20 -
m21
public double m21 -
m22
public double m22
-
-
Constructor Details
-
Matrix3d
public Matrix3d() -
Matrix3d
Create a newMatrix3d
by setting its uppper left 2x2 submatrix to the values of the givenMatrix2dc
and the rest to identity.- Parameters:
mat
- theMatrix2dc
-
Matrix3d
Create a newMatrix3d
by setting its uppper left 2x2 submatrix to the values of the givenMatrix2fc
and the rest to identity.- Parameters:
mat
- theMatrix2fc
-
Matrix3d
Create a newMatrix3d
and initialize it with the values from the given matrix.- Parameters:
mat
- the matrix to initialize this matrix with
-
Matrix3d
Create a newMatrix3d
and initialize it with the values from the given matrix.- Parameters:
mat
- the matrix to initialize this matrix with
-
Matrix3d
- Parameters:
mat
- theMatrix4fc
to copy the values from
-
Matrix3d
- Parameters:
mat
- theMatrix4dc
to copy the values from
-
Matrix3d
public Matrix3d(double m00, double m01, double m02, double m10, double m11, double m12, double m20, double m21, double m22) Create a newMatrix3d
and initialize its elements with the given values.- Parameters:
m00
- the value of m00m01
- the value of m01m02
- the value of m02m10
- the value of m10m11
- the value of m11m12
- the value of m12m20
- the value of m20m21
- the value of m21m22
- the value of m22
-
Matrix3d
Create a newMatrix3d
by reading its 9 double components from the givenDoubleBuffer
at the buffer's current position.That DoubleBuffer is expected to hold the values in column-major order.
The buffer's position will not be changed by this method.
- Parameters:
buffer
- theDoubleBuffer
to read the matrix values from
-
Matrix3d
Create a newMatrix3d
and initialize its three columns using the supplied vectors.- Parameters:
col0
- the first columncol1
- the second columncol2
- the third column
-
-
Method Details
-
m00
public double m00()Description copied from interface:Matrix3dc
Return the value of the matrix element at column 0 and row 0. -
m01
public double m01()Description copied from interface:Matrix3dc
Return the value of the matrix element at column 0 and row 1. -
m02
public double m02()Description copied from interface:Matrix3dc
Return the value of the matrix element at column 0 and row 2. -
m10
public double m10()Description copied from interface:Matrix3dc
Return the value of the matrix element at column 1 and row 0. -
m11
public double m11()Description copied from interface:Matrix3dc
Return the value of the matrix element at column 1 and row 1. -
m12
public double m12()Description copied from interface:Matrix3dc
Return the value of the matrix element at column 1 and row 2. -
m20
public double m20()Description copied from interface:Matrix3dc
Return the value of the matrix element at column 2 and row 0. -
m21
public double m21()Description copied from interface:Matrix3dc
Return the value of the matrix element at column 2 and row 1. -
m22
public double m22()Description copied from interface:Matrix3dc
Return the value of the matrix element at column 2 and row 2. -
m00
Set the value of the matrix element at column 0 and row 0.- Parameters:
m00
- the new value- Returns:
- this
-
m01
Set the value of the matrix element at column 0 and row 1.- Parameters:
m01
- the new value- Returns:
- this
-
m02
Set the value of the matrix element at column 0 and row 2.- Parameters:
m02
- the new value- Returns:
- this
-
m10
Set the value of the matrix element at column 1 and row 0.- Parameters:
m10
- the new value- Returns:
- this
-
m11
Set the value of the matrix element at column 1 and row 1.- Parameters:
m11
- the new value- Returns:
- this
-
m12
Set the value of the matrix element at column 1 and row 2.- Parameters:
m12
- the new value- Returns:
- this
-
m20
Set the value of the matrix element at column 2 and row 0.- Parameters:
m20
- the new value- Returns:
- this
-
m21
Set the value of the matrix element at column 2 and row 1.- Parameters:
m21
- the new value- Returns:
- this
-
m22
Set the value of the matrix element at column 2 and row 2.- Parameters:
m22
- the new value- Returns:
- this
-
set
Set the values in this matrix to the ones in m.- Parameters:
m
- the matrix whose values will be copied- Returns:
- this
-
setTransposed
Store the values of the transpose of the given matrixm
intothis
matrix.- Parameters:
m
- the matrix to copy the transposed values from- Returns:
- this
-
set
Set the values in this matrix to the ones in m.- Parameters:
m
- the matrix whose values will be copied- Returns:
- this
-
setTransposed
Store the values of the transpose of the given matrixm
intothis
matrix.- Parameters:
m
- the matrix to copy the transposed values from- Returns:
- this
-
set
Set the elements of this matrix to the left 3x3 submatrix ofm
.- Parameters:
m
- the matrix to copy the elements from- Returns:
- this
-
set
Set the elements of this matrix to the upper left 3x3 of the givenMatrix4fc
.- Parameters:
mat
- theMatrix4fc
to copy the values from- Returns:
- this
-
set
Set the elements of this matrix to the upper left 3x3 of the givenMatrix4dc
.- Parameters:
mat
- theMatrix4dc
to copy the values from- Returns:
- this
-
set
- Parameters:
mat
- theMatrix2fc
- Returns:
- this
- See Also:
-
set
- Parameters:
mat
- theMatrix2dc
- Returns:
- this
- See Also:
-
set
Set this matrix to be equivalent to the rotation specified by the givenAxisAngle4f
.- Parameters:
axisAngle
- theAxisAngle4f
- Returns:
- this
-
set
Set this matrix to be equivalent to the rotation specified by the givenAxisAngle4d
.- Parameters:
axisAngle
- theAxisAngle4d
- Returns:
- this
-
set
Set this matrix to a rotation - and possibly scaling - equivalent to the given quaternion.This method is equivalent to calling:
rotation(q)
Reference: http://www.euclideanspace.com/
- Parameters:
q
- the quaternion- Returns:
- this
- See Also:
-
set
Set this matrix to a rotation - and possibly scaling - equivalent to the given quaternion.This method is equivalent to calling:
rotation(q)
Reference: http://www.euclideanspace.com/
- Parameters:
q
- the quaternion- Returns:
- this
- See Also:
-
mul
Multiply this matrix by the supplied matrix. This matrix will be the left one.If
M
isthis
matrix andR
theright
matrix, then the new matrix will beM * R
. So when transforming a vectorv
with the new matrix by usingM * R * v
, the transformation of the right matrix will be applied first!- Parameters:
right
- the right operand- Returns:
- this
-
mul
Description copied from interface:Matrix3dc
Multiply this matrix by the supplied matrix and store the result indest
. This matrix will be the left one.If
M
isthis
matrix andR
theright
matrix, then the new matrix will beM * R
. So when transforming a vectorv
with the new matrix by usingM * R * v
, the transformation of the right matrix will be applied first! -
mulLocal
Pre-multiply this matrix by the suppliedleft
matrix and store the result inthis
.If
M
isthis
matrix andL
theleft
matrix, then the new matrix will beL * M
. So when transforming a vectorv
with the new matrix by usingL * M * v
, the transformation ofthis
matrix will be applied first!- Parameters:
left
- the left operand of the matrix multiplication- Returns:
- this
-
mulLocal
Description copied from interface:Matrix3dc
Pre-multiply this matrix by the suppliedleft
matrix and store the result indest
.If
M
isthis
matrix andL
theleft
matrix, then the new matrix will beL * M
. So when transforming a vectorv
with the new matrix by usingL * M * v
, the transformation ofthis
matrix will be applied first! -
mul
Multiply this matrix by the supplied matrix. This matrix will be the left one.If
M
isthis
matrix andR
theright
matrix, then the new matrix will beM * R
. So when transforming a vectorv
with the new matrix by usingM * R * v
, the transformation of the right matrix will be applied first!- Parameters:
right
- the right operand- Returns:
- this
-
mul
Description copied from interface:Matrix3dc
Multiply this matrix by the supplied matrix and store the result indest
. This matrix will be the left one.If
M
isthis
matrix andR
theright
matrix, then the new matrix will beM * R
. So when transforming a vectorv
with the new matrix by usingM * R * v
, the transformation of the right matrix will be applied first! -
set
public Matrix3d set(double m00, double m01, double m02, double m10, double m11, double m12, double m20, double m21, double m22) Set the values within this matrix to the supplied double values. The result looks like this:m00, m10, m20
m01, m11, m21
m02, m12, m22- Parameters:
m00
- the new value of m00m01
- the new value of m01m02
- the new value of m02m10
- the new value of m10m11
- the new value of m11m12
- the new value of m12m20
- the new value of m20m21
- the new value of m21m22
- the new value of m22- Returns:
- this
-
set
Set the values in this matrix based on the supplied double array. The result looks like this:0, 3, 6
1, 4, 7
2, 5, 8
Only uses the first 9 values, all others are ignored.
- Parameters:
m
- the array to read the matrix values from- Returns:
- this
-
set
Set the values in this matrix based on the supplied double array. The result looks like this:0, 3, 6
1, 4, 7
2, 5, 8
Only uses the first 9 values, all others are ignored
- Parameters:
m
- the array to read the matrix values from- Returns:
- this
-
determinant
public double determinant()Description copied from interface:Matrix3dc
Return the determinant of this matrix.- Specified by:
determinant
in interfaceMatrix3dc
- Returns:
- the determinant
-
invert
Invert this matrix.- Returns:
- this
-
invert
Description copied from interface:Matrix3dc
Invertthis
matrix and store the result indest
. -
transpose
Transpose this matrix.- Returns:
- this
-
transpose
Description copied from interface:Matrix3dc
Transposethis
matrix and store the result indest
. -
toString
Return a string representation of this matrix.This method creates a new
DecimalFormat
on every invocation with the format string "0.000E0;-
". -
toString
Return a string representation of this matrix by formatting the matrix elements with the givenNumberFormat
.- Parameters:
formatter
- theNumberFormat
used to format the matrix values with- Returns:
- the string representation
-
get
Get the current values ofthis
matrix and store them intodest
.This is the reverse method of
set(Matrix3dc)
and allows to obtain intermediate calculation results when chaining multiple transformations. -
getRotation
Description copied from interface:Matrix3dc
Get the current values ofthis
matrix and store the represented rotation into the givenAxisAngle4f
.- Specified by:
getRotation
in interfaceMatrix3dc
- Parameters:
dest
- the destinationAxisAngle4f
- Returns:
- the passed in destination
- See Also:
-
getUnnormalizedRotation
Description copied from interface:Matrix3dc
Get the current values ofthis
matrix and store the represented rotation into the givenQuaternionf
.This method assumes that the three column vectors of this matrix are not normalized and thus allows to ignore any additional scaling factor that is applied to the matrix.
- Specified by:
getUnnormalizedRotation
in interfaceMatrix3dc
- Parameters:
dest
- the destinationQuaternionf
- Returns:
- the passed in destination
- See Also:
-
getNormalizedRotation
Description copied from interface:Matrix3dc
Get the current values ofthis
matrix and store the represented rotation into the givenQuaternionf
.This method assumes that the three column vectors of this matrix are normalized.
- Specified by:
getNormalizedRotation
in interfaceMatrix3dc
- Parameters:
dest
- the destinationQuaternionf
- Returns:
- the passed in destination
- See Also:
-
getUnnormalizedRotation
Description copied from interface:Matrix3dc
Get the current values ofthis
matrix and store the represented rotation into the givenQuaterniond
.This method assumes that the three column vectors of this matrix are not normalized and thus allows to ignore any additional scaling factor that is applied to the matrix.
- Specified by:
getUnnormalizedRotation
in interfaceMatrix3dc
- Parameters:
dest
- the destinationQuaterniond
- Returns:
- the passed in destination
- See Also:
-
getNormalizedRotation
Description copied from interface:Matrix3dc
Get the current values ofthis
matrix and store the represented rotation into the givenQuaterniond
.This method assumes that the three column vectors of this matrix are normalized.
- Specified by:
getNormalizedRotation
in interfaceMatrix3dc
- Parameters:
dest
- the destinationQuaterniond
- Returns:
- the passed in destination
- See Also:
-
get
Description copied from interface:Matrix3dc
Store this matrix into the suppliedDoubleBuffer
at the current bufferposition
using column-major order.This method will not increment the position of the given DoubleBuffer.
In order to specify the offset into the DoubleBuffer} at which the matrix is stored, use
Matrix3dc.get(int, DoubleBuffer)
, taking the absolute position as parameter. -
get
Description copied from interface:Matrix3dc
Store this matrix into the suppliedDoubleBuffer
starting at the specified absolute buffer position/index using column-major order.This method will not increment the position of the given
DoubleBuffer
.- Specified by:
get
in interfaceMatrix3dc
- Parameters:
index
- the absolute position into theDoubleBuffer
buffer
- will receive the values of this matrix in column-major order- Returns:
- the passed in buffer
-
get
Description copied from interface:Matrix3dc
Store this matrix in column-major order into the suppliedFloatBuffer
at the current bufferposition
.This method will not increment the position of the given FloatBuffer.
In order to specify the offset into the FloatBuffer at which the matrix is stored, use
Matrix3dc.get(int, FloatBuffer)
, taking the absolute position as parameter.Please note that due to this matrix storing double values those values will potentially lose precision when they are converted to float values before being put into the given FloatBuffer.
-
get
Description copied from interface:Matrix3dc
Store this matrix in column-major order into the suppliedFloatBuffer
starting at the specified absolute buffer position/index.This method will not increment the position of the given FloatBuffer.
Please note that due to this matrix storing double values those values will potentially lose precision when they are converted to float values before being put into the given FloatBuffer.
-
get
Description copied from interface:Matrix3dc
Store this matrix in column-major order into the suppliedByteBuffer
at the current bufferposition
.This method will not increment the position of the given ByteBuffer.
In order to specify the offset into the ByteBuffer at which the matrix is stored, use
Matrix3dc.get(int, ByteBuffer)
, taking the absolute position as parameter. -
get
Description copied from interface:Matrix3dc
Store this matrix in column-major order into the suppliedByteBuffer
starting at the specified absolute buffer position/index.This method will not increment the position of the given ByteBuffer.
-
getFloats
Description copied from interface:Matrix3dc
Store the elements of this matrix as float values in column-major order into the suppliedByteBuffer
at the current bufferposition
.This method will not increment the position of the given ByteBuffer.
Please note that due to this matrix storing double values those values will potentially lose precision when they are converted to float values before being put into the given ByteBuffer.
In order to specify the offset into the ByteBuffer at which the matrix is stored, use
Matrix3dc.getFloats(int, ByteBuffer)
, taking the absolute position as parameter. -
getFloats
Description copied from interface:Matrix3dc
Store the elements of this matrix as float values in column-major order into the suppliedByteBuffer
starting at the specified absolute buffer position/index.This method will not increment the position of the given ByteBuffer.
Please note that due to this matrix storing double values those values will potentially lose precision when they are converted to float values before being put into the given ByteBuffer.
-
getTransposed
Description copied from interface:Matrix3dc
Store this matrix in row-major order into the suppliedDoubleBuffer
at the current bufferposition
.This method will not increment the position of the given DoubleBuffer.
In order to specify the offset into the DoubleBuffer at which the matrix is stored, use
Matrix3dc.getTransposed(int, DoubleBuffer)
, taking the absolute position as parameter.- Specified by:
getTransposed
in interfaceMatrix3dc
- Parameters:
buffer
- will receive the values of this matrix in row-major order at its current position- Returns:
- the passed in buffer
- See Also:
-
getTransposed
Description copied from interface:Matrix3dc
Store this matrix in row-major order into the suppliedDoubleBuffer
starting at the specified absolute buffer position/index.This method will not increment the position of the given DoubleBuffer.
- Specified by:
getTransposed
in interfaceMatrix3dc
- Parameters:
index
- the absolute position into the DoubleBufferbuffer
- will receive the values of this matrix in row-major order- Returns:
- the passed in buffer
-
getTransposed
Description copied from interface:Matrix3dc
Store this matrix in row-major order into the suppliedFloatBuffer
at the current bufferposition
.This method will not increment the position of the given FloatBuffer.
Please note that due to this matrix storing double values those values will potentially lose precision when they are converted to float values before being put into the given FloatBuffer.
In order to specify the offset into the FloatBuffer at which the matrix is stored, use
Matrix3dc.getTransposed(int, FloatBuffer)
, taking the absolute position as parameter.- Specified by:
getTransposed
in interfaceMatrix3dc
- Parameters:
buffer
- will receive the values of this matrix in row-major order at its current position- Returns:
- the passed in buffer
- See Also:
-
getTransposed
Description copied from interface:Matrix3dc
Store this matrix in row-major order into the suppliedFloatBuffer
starting at the specified absolute buffer position/index.This method will not increment the position of the given FloatBuffer.
Please note that due to this matrix storing double values those values will potentially lose precision when they are converted to float values before being put into the given FloatBuffer.
- Specified by:
getTransposed
in interfaceMatrix3dc
- Parameters:
index
- the absolute position into the FloatBufferbuffer
- will receive the values of this matrix in row-major order- Returns:
- the passed in buffer
-
getTransposed
Description copied from interface:Matrix3dc
Store this matrix in row-major order into the suppliedByteBuffer
at the current bufferposition
.This method will not increment the position of the given ByteBuffer.
In order to specify the offset into the ByteBuffer at which the matrix is stored, use
Matrix3dc.getTransposed(int, ByteBuffer)
, taking the absolute position as parameter.- Specified by:
getTransposed
in interfaceMatrix3dc
- Parameters:
buffer
- will receive the values of this matrix in row-major order at its current position- Returns:
- the passed in buffer
- See Also:
-
getTransposed
Description copied from interface:Matrix3dc
Store this matrix in row-major order into the suppliedByteBuffer
starting at the specified absolute buffer position/index.This method will not increment the position of the given ByteBuffer.
- Specified by:
getTransposed
in interfaceMatrix3dc
- Parameters:
index
- the absolute position into the ByteBufferbuffer
- will receive the values of this matrix in row-major order- Returns:
- the passed in buffer
-
getTransposedFloats
Description copied from interface:Matrix3dc
Store this matrix as float values in row-major order into the suppliedByteBuffer
at the current bufferposition
.This method will not increment the position of the given ByteBuffer.
Please note that due to this matrix storing double values those values will potentially lose precision when they are converted to float values before being put into the given FloatBuffer.
In order to specify the offset into the ByteBuffer at which the matrix is stored, use
Matrix3dc.getTransposedFloats(int, ByteBuffer)
, taking the absolute position as parameter.- Specified by:
getTransposedFloats
in interfaceMatrix3dc
- Parameters:
buffer
- will receive the values of this matrix as float values in row-major order at its current position- Returns:
- the passed in buffer
- See Also:
-
getTransposedFloats
Description copied from interface:Matrix3dc
Store this matrix in row-major order into the suppliedByteBuffer
starting at the specified absolute buffer position/index.This method will not increment the position of the given ByteBuffer.
Please note that due to this matrix storing double values those values will potentially lose precision when they are converted to float values before being put into the given FloatBuffer.
- Specified by:
getTransposedFloats
in interfaceMatrix3dc
- Parameters:
index
- the absolute position into the ByteBufferbuffer
- will receive the values of this matrix as float values in row-major order- Returns:
- the passed in buffer
-
getToAddress
Description copied from interface:Matrix3dc
Store this matrix in column-major order at the given off-heap address.This method will throw an
UnsupportedOperationException
when JOML is used with `-Djoml.nounsafe`.This method is unsafe as it can result in a crash of the JVM process when the specified address range does not belong to this process.
- Specified by:
getToAddress
in interfaceMatrix3dc
- Parameters:
address
- the off-heap address where to store this matrix- Returns:
- this
-
get
public double[] get(double[] arr, int offset) Description copied from interface:Matrix3dc
Store this matrix into the supplied double array in column-major order at the given offset. -
get
public double[] get(double[] arr) Description copied from interface:Matrix3dc
Store this matrix into the supplied double array in column-major order.In order to specify an explicit offset into the array, use the method
Matrix3dc.get(double[], int)
. -
get
public float[] get(float[] arr, int offset) Description copied from interface:Matrix3dc
Store the elements of this matrix as float values in column-major order into the supplied float array at the given offset.Please note that due to this matrix storing double values those values will potentially lose precision when they are converted to float values before being put into the given float array.
-
get
public float[] get(float[] arr) Description copied from interface:Matrix3dc
Store the elements of this matrix as float values in column-major order into the supplied float array.Please note that due to this matrix storing double values those values will potentially lose precision when they are converted to float values before being put into the given float array.
In order to specify an explicit offset into the array, use the method
Matrix3dc.get(float[], int)
. -
set
Set the values of this matrix by reading 9 double values from the givenDoubleBuffer
in column-major order, starting at its current position.The DoubleBuffer is expected to contain the values in column-major order.
The position of the DoubleBuffer will not be changed by this method.
- Parameters:
buffer
- the DoubleBuffer to read the matrix values from in column-major order- Returns:
- this
-
set
Set the values of this matrix by reading 9 float values from the givenFloatBuffer
in column-major order, starting at its current position.The FloatBuffer is expected to contain the values in column-major order.
The position of the FloatBuffer will not be changed by this method.
- Parameters:
buffer
- the FloatBuffer to read the matrix values from in column-major order- Returns:
- this
-
set
Set the values of this matrix by reading 9 double values from the givenByteBuffer
in column-major order, starting at its current position.The ByteBuffer is expected to contain the values in column-major order.
The position of the ByteBuffer will not be changed by this method.
- Parameters:
buffer
- the ByteBuffer to read the matrix values from in column-major order- Returns:
- this
-
setFloats
Set the values of this matrix by reading 9 float values from the givenByteBuffer
in column-major order, starting at its current position.The ByteBuffer is expected to contain the values in column-major order.
The position of the ByteBuffer will not be changed by this method.
- Parameters:
buffer
- the ByteBuffer to read the matrix values from in column-major order- Returns:
- this
-
set
Set the values of this matrix by reading 9 double values from the givenDoubleBuffer
in column-major order, starting at the specified absolute buffer position/index.The DoubleBuffer is expected to contain the values in column-major order.
The position of the DoubleBuffer will not be changed by this method.
- Parameters:
index
- the absolute position into the DoubleBufferbuffer
- the DoubleBuffer to read the matrix values from in column-major order- Returns:
- this
-
set
Set the values of this matrix by reading 9 float values from the givenFloatBuffer
in column-major order, starting at the specified absolute buffer position/index.The FloatBuffer is expected to contain the values in column-major order.
The position of the FloatBuffer will not be changed by this method.
- Parameters:
index
- the absolute position into the FloatBufferbuffer
- the FloatBuffer to read the matrix values from in column-major order- Returns:
- this
-
set
Set the values of this matrix by reading 9 double values from the givenByteBuffer
in column-major order, starting at the specified absolute buffer position/index.The ByteBuffer is expected to contain the values in column-major order.
The position of the ByteBuffer will not be changed by this method.
- Parameters:
index
- the absolute position into the ByteBufferbuffer
- the ByteBuffer to read the matrix values from in column-major order- Returns:
- this
-
setFloats
Set the values of this matrix by reading 9 float values from the givenByteBuffer
in column-major order, starting at the specified absolute buffer position/index.The ByteBuffer is expected to contain the values in column-major order.
The position of the ByteBuffer will not be changed by this method.
- Parameters:
index
- the absolute position into the ByteBufferbuffer
- the ByteBuffer to read the matrix values from in column-major order- Returns:
- this
-
setFromAddress
Set the values of this matrix by reading 9 double values from off-heap memory in column-major order, starting at the given address.This method will throw an
UnsupportedOperationException
when JOML is used with `-Djoml.nounsafe`.This method is unsafe as it can result in a crash of the JVM process when the specified address range does not belong to this process.
- Parameters:
address
- the off-heap memory address to read the matrix values from in column-major order- Returns:
- this
-
set
Set the three columns of this matrix to the supplied vectors, respectively.- Parameters:
col0
- the first columncol1
- the second columncol2
- the third column- Returns:
- this
-
zero
Set all the values within this matrix to 0.- Returns:
- this
-
identity
Set this matrix to the identity.- Returns:
- this
-
scaling
Set this matrix to be a simple scale matrix, which scales all axes uniformly by the given factor.The resulting matrix can be multiplied against another transformation matrix to obtain an additional scaling.
In order to post-multiply a scaling transformation directly to a matrix, use
scale()
instead.- Parameters:
factor
- the scale factor in x, y and z- Returns:
- this
- See Also:
-
scaling
Set this matrix to be a simple scale matrix.- Parameters:
x
- the scale in xy
- the scale in yz
- the scale in z- Returns:
- this
-
scaling
Set this matrix to be a simple scale matrix which scales the base axes byxyz.x
,xyz.y
andxyz.z
respectively.The resulting matrix can be multiplied against another transformation matrix to obtain an additional scaling.
In order to post-multiply a scaling transformation directly to a matrix use
scale()
instead.- Parameters:
xyz
- the scale in x, y and z respectively- Returns:
- this
- See Also:
-
scale
Description copied from interface:Matrix3dc
Apply scaling tothis
matrix by scaling the base axes by the givenxyz.x
,xyz.y
andxyz.z
factors, respectively and store the result indest
.If
M
isthis
matrix andS
the scaling matrix, then the new matrix will beM * S
. So when transforming a vectorv
with the new matrix by usingM * S * v
, the scaling will be applied first! -
scale
Apply scaling to this matrix by scaling the base axes by the givenxyz.x
,xyz.y
andxyz.z
factors, respectively.If
M
isthis
matrix andS
the scaling matrix, then the new matrix will beM * S
. So when transforming a vectorv
with the new matrix by usingM * S * v
, the scaling will be applied first!- Parameters:
xyz
- the factors of the x, y and z component, respectively- Returns:
- this
-
scale
Description copied from interface:Matrix3dc
Apply scaling to this matrix by scaling the base axes by the given x, y and z factors and store the result indest
.If
M
isthis
matrix andS
the scaling matrix, then the new matrix will beM * S
. So when transforming a vectorv
with the new matrix by usingM * S * v
, the scaling will be applied first! -
scale
Apply scaling to this matrix by scaling the base axes by the given x, y and z factors.If
M
isthis
matrix andS
the scaling matrix, then the new matrix will beM * S
. So when transforming a vectorv
with the new matrix by usingM * S * v
, the scaling will be applied first!- Parameters:
x
- the factor of the x componenty
- the factor of the y componentz
- the factor of the z component- Returns:
- this
-
scale
Description copied from interface:Matrix3dc
Apply scaling to this matrix by uniformly scaling all base axes by the givenxyz
factor and store the result indest
.If
M
isthis
matrix andS
the scaling matrix, then the new matrix will beM * S
. So when transforming a vectorv
with the new matrix by usingM * S * v
, the scaling will be applied first! -
scale
Apply scaling to this matrix by uniformly scaling all base axes by the givenxyz
factor.If
M
isthis
matrix andS
the scaling matrix, then the new matrix will beM * S
. So when transforming a vectorv
with the new matrix by usingM * S * v
, the scaling will be applied first!- Parameters:
xyz
- the factor for all components- Returns:
- this
- See Also:
-
scaleLocal
Description copied from interface:Matrix3dc
Pre-multiply scaling tothis
matrix by scaling the base axes by the given x, y and z factors and store the result indest
.If
M
isthis
matrix andS
the scaling matrix, then the new matrix will beS * M
. So when transforming a vectorv
with the new matrix by usingS * M * v
, the scaling will be applied last!- Specified by:
scaleLocal
in interfaceMatrix3dc
- Parameters:
x
- the factor of the x componenty
- the factor of the y componentz
- the factor of the z componentdest
- will hold the result- Returns:
- dest
-
scaleLocal
Pre-multiply scaling to this matrix by scaling the base axes by the given x, y and z factors.If
M
isthis
matrix andS
the scaling matrix, then the new matrix will beS * M
. So when transforming a vectorv
with the new matrix by usingS * M * v
, the scaling will be applied last!- Parameters:
x
- the factor of the x componenty
- the factor of the y componentz
- the factor of the z component- Returns:
- this
-
rotation
Set this matrix to a rotation matrix which rotates the given radians about a given axis.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
The resulting matrix can be multiplied against another transformation matrix to obtain an additional rotation.
In order to post-multiply a rotation transformation directly to a matrix, use
rotate()
instead.- Parameters:
angle
- the angle in radiansaxis
- the axis to rotate about (needs to benormalized
)- Returns:
- this
- See Also:
-
rotation
Set this matrix to a rotation matrix which rotates the given radians about a given axis.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
The resulting matrix can be multiplied against another transformation matrix to obtain an additional rotation.
In order to post-multiply a rotation transformation directly to a matrix, use
rotate()
instead.- Parameters:
angle
- the angle in radiansaxis
- the axis to rotate about (needs to benormalized
)- Returns:
- this
- See Also:
-
rotation
Set this matrix to a rotation transformation using the givenAxisAngle4f
.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
The resulting matrix can be multiplied against another transformation matrix to obtain an additional rotation.
In order to apply the rotation transformation to an existing transformation, use
rotate()
instead.Reference: http://en.wikipedia.org
- Parameters:
axisAngle
- theAxisAngle4f
(needs to benormalized
)- Returns:
- this
- See Also:
-
rotation
Set this matrix to a rotation transformation using the givenAxisAngle4d
.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
The resulting matrix can be multiplied against another transformation matrix to obtain an additional rotation.
In order to apply the rotation transformation to an existing transformation, use
rotate()
instead.Reference: http://en.wikipedia.org
- Parameters:
axisAngle
- theAxisAngle4d
(needs to benormalized
)- Returns:
- this
- See Also:
-
rotation
Set this matrix to a rotation matrix which rotates the given radians about a given axis.The axis described by the three components needs to be a unit vector.
When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
The resulting matrix can be multiplied against another transformation matrix to obtain an additional rotation.
In order to apply the rotation transformation to an existing transformation, use
rotate()
instead.Reference: http://en.wikipedia.org
- Parameters:
angle
- the angle in radiansx
- the x-component of the rotation axisy
- the y-component of the rotation axisz
- the z-component of the rotation axis- Returns:
- this
- See Also:
-
rotationX
Set this matrix to a rotation transformation about the X axis.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
Reference: http://en.wikipedia.org
- Parameters:
ang
- the angle in radians- Returns:
- this
-
rotationY
Set this matrix to a rotation transformation about the Y axis.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
Reference: http://en.wikipedia.org
- Parameters:
ang
- the angle in radians- Returns:
- this
-
rotationZ
Set this matrix to a rotation transformation about the Z axis.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
Reference: http://en.wikipedia.org
- Parameters:
ang
- the angle in radians- Returns:
- this
-
rotationXYZ
Set this matrix to a rotation ofangleX
radians about the X axis, followed by a rotation ofangleY
radians about the Y axis and followed by a rotation ofangleZ
radians about the Z axis.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
This method is equivalent to calling:
rotationX(angleX).rotateY(angleY).rotateZ(angleZ)
- Parameters:
angleX
- the angle to rotate about XangleY
- the angle to rotate about YangleZ
- the angle to rotate about Z- Returns:
- this
-
rotationZYX
Set this matrix to a rotation ofangleZ
radians about the Z axis, followed by a rotation ofangleY
radians about the Y axis and followed by a rotation ofangleX
radians about the X axis.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
This method is equivalent to calling:
rotationZ(angleZ).rotateY(angleY).rotateX(angleX)
- Parameters:
angleZ
- the angle to rotate about ZangleY
- the angle to rotate about YangleX
- the angle to rotate about X- Returns:
- this
-
rotationYXZ
Set this matrix to a rotation ofangleY
radians about the Y axis, followed by a rotation ofangleX
radians about the X axis and followed by a rotation ofangleZ
radians about the Z axis.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
This method is equivalent to calling:
rotationY(angleY).rotateX(angleX).rotateZ(angleZ)
- Parameters:
angleY
- the angle to rotate about YangleX
- the angle to rotate about XangleZ
- the angle to rotate about Z- Returns:
- this
-
rotation
Set this matrix to the rotation - and possibly scaling - transformation of the givenQuaterniondc
.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
The resulting matrix can be multiplied against another transformation matrix to obtain an additional rotation.
In order to apply the rotation transformation to an existing transformation, use
rotate()
instead.Reference: http://en.wikipedia.org
- Parameters:
quat
- theQuaterniondc
- Returns:
- this
- See Also:
-
rotation
Set this matrix to the rotation - and possibly scaling - transformation of the givenQuaternionfc
.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
The resulting matrix can be multiplied against another transformation matrix to obtain an additional rotation.
In order to apply the rotation transformation to an existing transformation, use
rotate()
instead.Reference: http://en.wikipedia.org
- Parameters:
quat
- theQuaternionfc
- Returns:
- this
- See Also:
-
transform
Description copied from interface:Matrix3dc
Transform the given vector by this matrix. -
transform
Description copied from interface:Matrix3dc
Transform the given vector by this matrix and store the result indest
. -
transform
Description copied from interface:Matrix3dc
Transform the given vector by this matrix. -
transform
Description copied from interface:Matrix3dc
Transform the given vector by this matrix and store the result indest
. -
transform
Description copied from interface:Matrix3dc
Transform the vector(x, y, z)
by this matrix and store the result indest
. -
transformTranspose
Description copied from interface:Matrix3dc
Transform the given vector by the transpose of this matrix.- Specified by:
transformTranspose
in interfaceMatrix3dc
- Parameters:
v
- the vector to transform- Returns:
- v
-
transformTranspose
Description copied from interface:Matrix3dc
Transform the given vector by the transpose of this matrix and store the result indest
.- Specified by:
transformTranspose
in interfaceMatrix3dc
- Parameters:
v
- the vector to transformdest
- will hold the result- Returns:
- dest
-
transformTranspose
Description copied from interface:Matrix3dc
Transform the vector(x, y, z)
by the transpose of this matrix and store the result indest
.- Specified by:
transformTranspose
in interfaceMatrix3dc
- Parameters:
x
- the x coordinate of the vector to transformy
- the y coordinate of the vector to transformz
- the z coordinate of the vector to transformdest
- will hold the result- Returns:
- dest
-
writeExternal
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
-
rotateX
Description copied from interface:Matrix3dc
Apply rotation about the X axis to this matrix by rotating the given amount of radians and store the result indest
.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
M
isthis
matrix andR
the rotation matrix, then the new matrix will beM * R
. So when transforming a vectorv
with the new matrix by usingM * R * v
, the rotation will be applied first!Reference: http://en.wikipedia.org
-
rotateX
Apply rotation about the X axis to this matrix by rotating the given amount of radians.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
M
isthis
matrix andR
the rotation matrix, then the new matrix will beM * R
. So when transforming a vectorv
with the new matrix by usingM * R * v
, the rotation will be applied first!Reference: http://en.wikipedia.org
- Parameters:
ang
- the angle in radians- Returns:
- this
-
rotateY
Description copied from interface:Matrix3dc
Apply rotation about the Y axis to this matrix by rotating the given amount of radians and store the result indest
.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
M
isthis
matrix andR
the rotation matrix, then the new matrix will beM * R
. So when transforming a vectorv
with the new matrix by usingM * R * v
, the rotation will be applied first!Reference: http://en.wikipedia.org
-
rotateY
Apply rotation about the Y axis to this matrix by rotating the given amount of radians.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
M
isthis
matrix andR
the rotation matrix, then the new matrix will beM * R
. So when transforming a vectorv
with the new matrix by usingM * R * v
, the rotation will be applied first!Reference: http://en.wikipedia.org
- Parameters:
ang
- the angle in radians- Returns:
- this
-
rotateZ
Description copied from interface:Matrix3dc
Apply rotation about the Z axis to this matrix by rotating the given amount of radians and store the result indest
.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
M
isthis
matrix andR
the rotation matrix, then the new matrix will beM * R
. So when transforming a vectorv
with the new matrix by usingM * R * v
, the rotation will be applied first!Reference: http://en.wikipedia.org
-
rotateZ
Apply rotation about the Z axis to this matrix by rotating the given amount of radians.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
M
isthis
matrix andR
the rotation matrix, then the new matrix will beM * R
. So when transforming a vectorv
with the new matrix by usingM * R * v
, the rotation will be applied first!Reference: http://en.wikipedia.org
- Parameters:
ang
- the angle in radians- Returns:
- this
-
rotateXYZ
Apply rotation ofangleX
radians about the X axis, followed by a rotation ofangleY
radians about the Y axis and followed by a rotation ofangleZ
radians about the Z axis.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
M
isthis
matrix andR
the rotation matrix, then the new matrix will beM * R
. So when transforming a vectorv
with the new matrix by usingM * R * v
, the rotation will be applied first!This method is equivalent to calling:
rotateX(angleX).rotateY(angleY).rotateZ(angleZ)
- Parameters:
angleX
- the angle to rotate about XangleY
- the angle to rotate about YangleZ
- the angle to rotate about Z- Returns:
- this
-
rotateXYZ
Description copied from interface:Matrix3dc
Apply rotation ofangleX
radians about the X axis, followed by a rotation ofangleY
radians about the Y axis and followed by a rotation ofangleZ
radians about the Z axis and store the result indest
.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
M
isthis
matrix andR
the rotation matrix, then the new matrix will beM * R
. So when transforming a vectorv
with the new matrix by usingM * R * v
, the rotation will be applied first!This method is equivalent to calling:
rotateX(angleX, dest).rotateY(angleY).rotateZ(angleZ)
-
rotateZYX
Apply rotation ofangleZ
radians about the Z axis, followed by a rotation ofangleY
radians about the Y axis and followed by a rotation ofangleX
radians about the X axis.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
M
isthis
matrix andR
the rotation matrix, then the new matrix will beM * R
. So when transforming a vectorv
with the new matrix by usingM * R * v
, the rotation will be applied first!This method is equivalent to calling:
rotateZ(angleZ).rotateY(angleY).rotateX(angleX)
- Parameters:
angleZ
- the angle to rotate about ZangleY
- the angle to rotate about YangleX
- the angle to rotate about X- Returns:
- this
-
rotateZYX
Description copied from interface:Matrix3dc
Apply rotation ofangleZ
radians about the Z axis, followed by a rotation ofangleY
radians about the Y axis and followed by a rotation ofangleX
radians about the X axis and store the result indest
.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
M
isthis
matrix andR
the rotation matrix, then the new matrix will beM * R
. So when transforming a vectorv
with the new matrix by usingM * R * v
, the rotation will be applied first!This method is equivalent to calling:
rotateZ(angleZ, dest).rotateY(angleY).rotateX(angleX)
-
rotateYXZ
Apply rotation ofangles.y
radians about the Y axis, followed by a rotation ofangles.x
radians about the X axis and followed by a rotation ofangles.z
radians about the Z axis.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
M
isthis
matrix andR
the rotation matrix, then the new matrix will beM * R
. So when transforming a vectorv
with the new matrix by usingM * R * v
, the rotation will be applied first!This method is equivalent to calling:
rotateY(angles.y).rotateX(angles.x).rotateZ(angles.z)
- Parameters:
angles
- the Euler angles- Returns:
- this
-
rotateYXZ
Apply rotation ofangleY
radians about the Y axis, followed by a rotation ofangleX
radians about the X axis and followed by a rotation ofangleZ
radians about the Z axis.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
M
isthis
matrix andR
the rotation matrix, then the new matrix will beM * R
. So when transforming a vectorv
with the new matrix by usingM * R * v
, the rotation will be applied first!This method is equivalent to calling:
rotateY(angleY).rotateX(angleX).rotateZ(angleZ)
- Parameters:
angleY
- the angle to rotate about YangleX
- the angle to rotate about XangleZ
- the angle to rotate about Z- Returns:
- this
-
rotateYXZ
Description copied from interface:Matrix3dc
Apply rotation ofangleY
radians about the Y axis, followed by a rotation ofangleX
radians about the X axis and followed by a rotation ofangleZ
radians about the Z axis and store the result indest
.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
M
isthis
matrix andR
the rotation matrix, then the new matrix will beM * R
. So when transforming a vectorv
with the new matrix by usingM * R * v
, the rotation will be applied first!This method is equivalent to calling:
rotateY(angleY, dest).rotateX(angleX).rotateZ(angleZ)
-
rotate
Apply rotation to this matrix by rotating the given amount of radians about the given axis specified as x, y and z components.The axis described by the three components needs to be a unit vector.
When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
M
isthis
matrix andR
the rotation matrix, then the new matrix will beM * R
. So when transforming a vectorv
with the new matrix by usingM * R * v
, the rotation will be applied first!Reference: http://en.wikipedia.org
- Parameters:
ang
- the angle in radiansx
- the x component of the axisy
- the y component of the axisz
- the z component of the axis- Returns:
- this
-
rotate
Description copied from interface:Matrix3dc
Apply rotation to this matrix by rotating the given amount of radians about the given axis specified as x, y and z components, and store the result indest
.The axis described by the three components needs to be a unit vector.
When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
M
isthis
matrix andR
the rotation matrix, then the new matrix will beM * R
. So when transforming a vectorv
with the new matrix by usingM * R * v
, the rotation will be applied first!Reference: http://en.wikipedia.org
-
rotateLocal
Pre-multiply a rotation to this matrix by rotating the given amount of radians about the specified(x, y, z)
axis and store the result indest
.The axis described by the three components needs to be a unit vector.
When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
M
isthis
matrix andR
the rotation matrix, then the new matrix will beR * M
. So when transforming a vectorv
with the new matrix by usingR * M * v
, the rotation will be applied last!In order to set the matrix to a rotation matrix without pre-multiplying the rotation transformation, use
rotation()
.Reference: http://en.wikipedia.org
- Specified by:
rotateLocal
in interfaceMatrix3dc
- Parameters:
ang
- the angle in radiansx
- the x component of the axisy
- the y component of the axisz
- the z component of the axisdest
- will hold the result- Returns:
- dest
- See Also:
-
rotateLocal
Pre-multiply a rotation to this matrix by rotating the given amount of radians about the specified(x, y, z)
axis.The axis described by the three components needs to be a unit vector.
When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
M
isthis
matrix andR
the rotation matrix, then the new matrix will beR * M
. So when transforming a vectorv
with the new matrix by usingR * M * v
, the rotation will be applied last!In order to set the matrix to a rotation matrix without pre-multiplying the rotation transformation, use
rotation()
.Reference: http://en.wikipedia.org
- Parameters:
ang
- the angle in radiansx
- the x component of the axisy
- the y component of the axisz
- the z component of the axis- Returns:
- this
- See Also:
-
rotateLocalX
Pre-multiply a rotation around the X axis to this matrix by rotating the given amount of radians about the X axis and store the result indest
.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
M
isthis
matrix andR
the rotation matrix, then the new matrix will beR * M
. So when transforming a vectorv
with the new matrix by usingR * M * v
, the rotation will be applied last!In order to set the matrix to a rotation matrix without pre-multiplying the rotation transformation, use
rotationX()
.Reference: http://en.wikipedia.org
- Specified by:
rotateLocalX
in interfaceMatrix3dc
- Parameters:
ang
- the angle in radians to rotate about the X axisdest
- will hold the result- Returns:
- dest
- See Also:
-
rotateLocalX
Pre-multiply a rotation to this matrix by rotating the given amount of radians about the X axis.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
M
isthis
matrix andR
the rotation matrix, then the new matrix will beR * M
. So when transforming a vectorv
with the new matrix by usingR * M * v
, the rotation will be applied last!In order to set the matrix to a rotation matrix without pre-multiplying the rotation transformation, use
rotationX()
.Reference: http://en.wikipedia.org
- Parameters:
ang
- the angle in radians to rotate about the X axis- Returns:
- this
- See Also:
-
rotateLocalY
Pre-multiply a rotation around the Y axis to this matrix by rotating the given amount of radians about the Y axis and store the result indest
.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
M
isthis
matrix andR
the rotation matrix, then the new matrix will beR * M
. So when transforming a vectorv
with the new matrix by usingR * M * v
, the rotation will be applied last!In order to set the matrix to a rotation matrix without pre-multiplying the rotation transformation, use
rotationY()
.Reference: http://en.wikipedia.org
- Specified by:
rotateLocalY
in interfaceMatrix3dc
- Parameters:
ang
- the angle in radians to rotate about the Y axisdest
- will hold the result- Returns:
- dest
- See Also:
-
rotateLocalY
Pre-multiply a rotation to this matrix by rotating the given amount of radians about the Y axis.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
M
isthis
matrix andR
the rotation matrix, then the new matrix will beR * M
. So when transforming a vectorv
with the new matrix by usingR * M * v
, the rotation will be applied last!In order to set the matrix to a rotation matrix without pre-multiplying the rotation transformation, use
rotationY()
.Reference: http://en.wikipedia.org
- Parameters:
ang
- the angle in radians to rotate about the Y axis- Returns:
- this
- See Also:
-
rotateLocalZ
Pre-multiply a rotation around the Z axis to this matrix by rotating the given amount of radians about the Z axis and store the result indest
.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
M
isthis
matrix andR
the rotation matrix, then the new matrix will beR * M
. So when transforming a vectorv
with the new matrix by usingR * M * v
, the rotation will be applied last!In order to set the matrix to a rotation matrix without pre-multiplying the rotation transformation, use
rotationZ()
.Reference: http://en.wikipedia.org
- Specified by:
rotateLocalZ
in interfaceMatrix3dc
- Parameters:
ang
- the angle in radians to rotate about the Z axisdest
- will hold the result- Returns:
- dest
- See Also:
-
rotateLocalZ
Pre-multiply a rotation to this matrix by rotating the given amount of radians about the Z axis.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
M
isthis
matrix andR
the rotation matrix, then the new matrix will beR * M
. So when transforming a vectorv
with the new matrix by usingR * M * v
, the rotation will be applied last!In order to set the matrix to a rotation matrix without pre-multiplying the rotation transformation, use
rotationY()
.Reference: http://en.wikipedia.org
- Parameters:
ang
- the angle in radians to rotate about the Z axis- Returns:
- this
- See Also:
-
rotateLocal
Pre-multiply the rotation - and possibly scaling - transformation of the givenQuaterniondc
to this matrix and store the result indest
.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
M
isthis
matrix andQ
the rotation matrix obtained from the given quaternion, then the new matrix will beQ * M
. So when transforming a vectorv
with the new matrix by usingQ * M * v
, the quaternion rotation will be applied last!In order to set the matrix to a rotation transformation without pre-multiplying, use
rotation(Quaterniondc)
.Reference: http://en.wikipedia.org
- Specified by:
rotateLocal
in interfaceMatrix3dc
- Parameters:
quat
- theQuaterniondc
dest
- will hold the result- Returns:
- dest
- See Also:
-
rotateLocal
Pre-multiply the rotation - and possibly scaling - transformation of the givenQuaterniondc
to this matrix.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
M
isthis
matrix andQ
the rotation matrix obtained from the given quaternion, then the new matrix will beQ * M
. So when transforming a vectorv
with the new matrix by usingQ * M * v
, the quaternion rotation will be applied last!In order to set the matrix to a rotation transformation without pre-multiplying, use
rotation(Quaterniondc)
.Reference: http://en.wikipedia.org
- Parameters:
quat
- theQuaterniondc
- Returns:
- this
- See Also:
-
rotateLocal
Pre-multiply the rotation - and possibly scaling - transformation of the givenQuaternionfc
to this matrix and store the result indest
.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
M
isthis
matrix andQ
the rotation matrix obtained from the given quaternion, then the new matrix will beQ * M
. So when transforming a vectorv
with the new matrix by usingQ * M * v
, the quaternion rotation will be applied last!In order to set the matrix to a rotation transformation without pre-multiplying, use
rotation(Quaternionfc)
.Reference: http://en.wikipedia.org
- Specified by:
rotateLocal
in interfaceMatrix3dc
- Parameters:
quat
- theQuaternionfc
dest
- will hold the result- Returns:
- dest
- See Also:
-
rotateLocal
Pre-multiply the rotation - and possibly scaling - transformation of the givenQuaternionfc
to this matrix.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
M
isthis
matrix andQ
the rotation matrix obtained from the given quaternion, then the new matrix will beQ * M
. So when transforming a vectorv
with the new matrix by usingQ * M * v
, the quaternion rotation will be applied last!In order to set the matrix to a rotation transformation without pre-multiplying, use
rotation(Quaternionfc)
.Reference: http://en.wikipedia.org
- Parameters:
quat
- theQuaternionfc
- Returns:
- this
- See Also:
-
rotate
Apply the rotation - and possibly scaling - transformation of the givenQuaterniondc
to this matrix.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
M
isthis
matrix andQ
the rotation matrix obtained from the given quaternion, then the new matrix will beM * Q
. So when transforming a vectorv
with the new matrix by usingM * Q * v
, the quaternion rotation will be applied first!In order to set the matrix to a rotation transformation without post-multiplying, use
rotation(Quaterniondc)
.Reference: http://en.wikipedia.org
- Parameters:
quat
- theQuaterniondc
- Returns:
- this
- See Also:
-
rotate
Apply the rotation - and possibly scaling - transformation of the givenQuaterniondc
to this matrix and store the result indest
.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
M
isthis
matrix andQ
the rotation matrix obtained from the given quaternion, then the new matrix will beM * Q
. So when transforming a vectorv
with the new matrix by usingM * Q * v
, the quaternion rotation will be applied first!In order to set the matrix to a rotation transformation without post-multiplying, use
rotation(Quaterniondc)
.Reference: http://en.wikipedia.org
- Specified by:
rotate
in interfaceMatrix3dc
- Parameters:
quat
- theQuaterniondc
dest
- will hold the result- Returns:
- dest
- See Also:
-
rotate
Apply the rotation - and possibly scaling - transformation of the givenQuaternionfc
to this matrix.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
M
isthis
matrix andQ
the rotation matrix obtained from the given quaternion, then the new matrix will beM * Q
. So when transforming a vectorv
with the new matrix by usingM * Q * v
, the quaternion rotation will be applied first!In order to set the matrix to a rotation transformation without post-multiplying, use
rotation(Quaternionfc)
.Reference: http://en.wikipedia.org
- Parameters:
quat
- theQuaternionfc
- Returns:
- this
- See Also:
-
rotate
Apply the rotation - and possibly scaling - transformation of the givenQuaternionfc
to this matrix and store the result indest
.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
M
isthis
matrix andQ
the rotation matrix obtained from the given quaternion, then the new matrix will beM * Q
. So when transforming a vectorv
with the new matrix by usingM * Q * v
, the quaternion rotation will be applied first!In order to set the matrix to a rotation transformation without post-multiplying, use
rotation(Quaternionfc)
.Reference: http://en.wikipedia.org
- Specified by:
rotate
in interfaceMatrix3dc
- Parameters:
quat
- theQuaternionfc
dest
- will hold the result- Returns:
- dest
- See Also:
-
rotate
Apply a rotation transformation, rotating about the givenAxisAngle4f
, to this matrix.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
M
isthis
matrix andA
the rotation matrix obtained from the givenAxisAngle4f
, then the new matrix will beM * A
. So when transforming a vectorv
with the new matrix by usingM * A * v
, theAxisAngle4f
rotation will be applied first!In order to set the matrix to a rotation transformation without post-multiplying, use
rotation(AxisAngle4f)
.Reference: http://en.wikipedia.org
- Parameters:
axisAngle
- theAxisAngle4f
(needs to benormalized
)- Returns:
- this
- See Also:
-
rotate
Apply a rotation transformation, rotating about the givenAxisAngle4f
and store the result indest
.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
M
isthis
matrix andA
the rotation matrix obtained from the givenAxisAngle4f
, then the new matrix will beM * A
. So when transforming a vectorv
with the new matrix by usingM * A * v
, theAxisAngle4f
rotation will be applied first!In order to set the matrix to a rotation transformation without post-multiplying, use
rotation(AxisAngle4f)
.Reference: http://en.wikipedia.org
- Specified by:
rotate
in interfaceMatrix3dc
- Parameters:
axisAngle
- theAxisAngle4f
(needs to benormalized
)dest
- will hold the result- Returns:
- dest
- See Also:
-
rotate
Apply a rotation transformation, rotating about the givenAxisAngle4d
, to this matrix.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
M
isthis
matrix andA
the rotation matrix obtained from the givenAxisAngle4d
, then the new matrix will beM * A
. So when transforming a vectorv
with the new matrix by usingM * A * v
, theAxisAngle4d
rotation will be applied first!In order to set the matrix to a rotation transformation without post-multiplying, use
rotation(AxisAngle4d)
.Reference: http://en.wikipedia.org
- Parameters:
axisAngle
- theAxisAngle4d
(needs to benormalized
)- Returns:
- this
- See Also:
-
rotate
Apply a rotation transformation, rotating about the givenAxisAngle4d
and store the result indest
.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
M
isthis
matrix andA
the rotation matrix obtained from the givenAxisAngle4d
, then the new matrix will beM * A
. So when transforming a vectorv
with the new matrix by usingM * A * v
, theAxisAngle4d
rotation will be applied first!In order to set the matrix to a rotation transformation without post-multiplying, use
rotation(AxisAngle4d)
.Reference: http://en.wikipedia.org
- Specified by:
rotate
in interfaceMatrix3dc
- Parameters:
axisAngle
- theAxisAngle4d
(needs to benormalized
)dest
- will hold the result- Returns:
- dest
- See Also:
-
rotate
Apply a rotation transformation, rotating the given radians about the specified axis, to this matrix.The axis described by the
axis
vector needs to be a unit vector.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
M
isthis
matrix andA
the rotation matrix obtained from the given angle and axis, then the new matrix will beM * A
. So when transforming a vectorv
with the new matrix by usingM * A * v
, the axis-angle rotation will be applied first!In order to set the matrix to a rotation transformation without post-multiplying, use
rotation(double, Vector3dc)
.Reference: http://en.wikipedia.org
- Parameters:
angle
- the angle in radiansaxis
- the rotation axis (needs to benormalized
)- Returns:
- this
- See Also:
-
rotate
Apply a rotation transformation, rotating the given radians about the specified axis and store the result indest
.The axis described by the
axis
vector needs to be a unit vector.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
M
isthis
matrix andA
the rotation matrix obtained from the given axis and angle, then the new matrix will beM * A
. So when transforming a vectorv
with the new matrix by usingM * A * v
, the axis-angle rotation will be applied first!In order to set the matrix to a rotation transformation without post-multiplying, use
rotation(double, Vector3dc)
.Reference: http://en.wikipedia.org
- Specified by:
rotate
in interfaceMatrix3dc
- Parameters:
angle
- the angle in radiansaxis
- the rotation axis (needs to benormalized
)dest
- will hold the result- Returns:
- dest
- See Also:
-
rotate
Apply a rotation transformation, rotating the given radians about the specified axis, to this matrix.The axis described by the
axis
vector needs to be a unit vector.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
M
isthis
matrix andA
the rotation matrix obtained from the given angle and axis, then the new matrix will beM * A
. So when transforming a vectorv
with the new matrix by usingM * A * v
, the axis-angle rotation will be applied first!In order to set the matrix to a rotation transformation without post-multiplying, use
rotation(double, Vector3fc)
.Reference: http://en.wikipedia.org
- Parameters:
angle
- the angle in radiansaxis
- the rotation axis (needs to benormalized
)- Returns:
- this
- See Also:
-
rotate
Apply a rotation transformation, rotating the given radians about the specified axis and store the result indest
.The axis described by the
axis
vector needs to be a unit vector.When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise.
If
M
isthis
matrix andA
the rotation matrix obtained from the given axis and angle, then the new matrix will beM * A
. So when transforming a vectorv
with the new matrix by usingM * A * v
, the axis-angle rotation will be applied first!In order to set the matrix to a rotation transformation without post-multiplying, use
rotation(double, Vector3fc)
.Reference: http://en.wikipedia.org
- Specified by:
rotate
in interfaceMatrix3dc
- Parameters:
angle
- the angle in radiansaxis
- the rotation axis (needs to benormalized
)dest
- will hold the result- Returns:
- dest
- See Also:
-
getRow
Description copied from interface:Matrix3dc
Get the row at the givenrow
index, starting with0
.- Specified by:
getRow
in interfaceMatrix3dc
- Parameters:
row
- the row index in[0..2]
dest
- will hold the row components- Returns:
- the passed in destination
- Throws:
IndexOutOfBoundsException
- ifrow
is not in[0..2]
-
setRow
Set the row at the givenrow
index, starting with0
.- Parameters:
row
- the row index in[0..2]
src
- the row components to set- Returns:
- this
- Throws:
IndexOutOfBoundsException
- ifrow
is not in[0..2]
-
setRow
Set the row at the givenrow
index, starting with0
.- Parameters:
row
- the column index in[0..2]
x
- the first element in the rowy
- the second element in the rowz
- the third element in the row- Returns:
- this
- Throws:
IndexOutOfBoundsException
- ifrow
is not in[0..2]
-
getColumn
Description copied from interface:Matrix3dc
Get the column at the givencolumn
index, starting with0
.- Specified by:
getColumn
in interfaceMatrix3dc
- Parameters:
column
- the column index in[0..2]
dest
- will hold the column components- Returns:
- the passed in destination
- Throws:
IndexOutOfBoundsException
- ifcolumn
is not in[0..2]
-
setColumn
Set the column at the givencolumn
index, starting with0
.- Parameters:
column
- the column index in[0..2]
src
- the column components to set- Returns:
- this
- Throws:
IndexOutOfBoundsException
- ifcolumn
is not in[0..2]
-
setColumn
public Matrix3d setColumn(int column, double x, double y, double z) throws IndexOutOfBoundsException Set the column at the givencolumn
index, starting with0
.- Parameters:
column
- the column index in[0..2]
x
- the first element in the columny
- the second element in the columnz
- the third element in the column- Returns:
- this
- Throws:
IndexOutOfBoundsException
- ifcolumn
is not in[0..2]
-
get
public double get(int column, int row) Description copied from interface:Matrix3dc
Get the matrix element value at the given column and row. -
set
Set the matrix element at the given column and row to the specified value.- Parameters:
column
- the colum index in[0..2]
row
- the row index in[0..2]
value
- the value- Returns:
- this
-
getRowColumn
public double getRowColumn(int row, int column) Description copied from interface:Matrix3dc
Get the matrix element value at the given row and column.- Specified by:
getRowColumn
in interfaceMatrix3dc
- Parameters:
row
- the row index in[0..2]
column
- the colum index in[0..2]
- Returns:
- the element value
-
setRowColumn
Set the matrix element at the given row and column to the specified value.- Parameters:
row
- the row index in[0..2]
column
- the colum index in[0..2]
value
- the value- Returns:
- this
-
normal
Setthis
matrix to its own normal matrix.The normal matrix of
m
is the transpose of the inverse ofm
.Please note that, if
this
is an orthogonal matrix or a matrix whose columns are orthogonal vectors, then this method need not be invoked, since in that casethis
itself is its normal matrix. In this case, useset(Matrix3dc)
to set a given Matrix3f to this matrix.- Returns:
- this
- See Also:
-
normal
Compute a normal matrix fromthis
matrix and store it intodest
.The normal matrix of
m
is the transpose of the inverse ofm
.Please note that, if
this
is an orthogonal matrix or a matrix whose columns are orthogonal vectors, then this method need not be invoked, since in that casethis
itself is its normal matrix. In this case, useset(Matrix3dc)
to set a given Matrix3d to this matrix. -
cofactor
Compute the cofactor matrix ofthis
.The cofactor matrix can be used instead of
normal()
to transform normals when the orientation of the normals with respect to the surface should be preserved.- Returns:
- this
-
cofactor
Compute the cofactor matrix ofthis
and store it intodest
.The cofactor matrix can be used instead of
normal(Matrix3d)
to transform normals when the orientation of the normals with respect to the surface should be preserved. -
lookAlong
Apply a rotation transformation to this matrix to make-z
point alongdir
.If
M
isthis
matrix andL
the lookalong rotation matrix, then the new matrix will beM * L
. So when transforming a vectorv
with the new matrix by usingM * L * v
, the lookalong rotation transformation will be applied first!In order to set the matrix to a lookalong transformation without post-multiplying it, use
setLookAlong()
.- Parameters:
dir
- the direction in space to look alongup
- the direction of 'up'- Returns:
- this
- See Also:
-
lookAlong
Apply a rotation transformation to this matrix to make-z
point alongdir
and store the result indest
.If
M
isthis
matrix andL
the lookalong rotation matrix, then the new matrix will beM * L
. So when transforming a vectorv
with the new matrix by usingM * L * v
, the lookalong rotation transformation will be applied first!In order to set the matrix to a lookalong transformation without post-multiplying it, use
setLookAlong()
. -
lookAlong
public Matrix3d lookAlong(double dirX, double dirY, double dirZ, double upX, double upY, double upZ, Matrix3d dest) Apply a rotation transformation to this matrix to make-z
point alongdir
and store the result indest
.If
M
isthis
matrix andL
the lookalong rotation matrix, then the new matrix will beM * L
. So when transforming a vectorv
with the new matrix by usingM * L * v
, the lookalong rotation transformation will be applied first!In order to set the matrix to a lookalong transformation without post-multiplying it, use
setLookAlong()
- Specified by:
lookAlong
in interfaceMatrix3dc
- Parameters:
dirX
- the x-coordinate of the direction to look alongdirY
- the y-coordinate of the direction to look alongdirZ
- the z-coordinate of the direction to look alongupX
- the x-coordinate of the up vectorupY
- the y-coordinate of the up vectorupZ
- the z-coordinate of the up vectordest
- will hold the result- Returns:
- dest
- See Also:
-
lookAlong
public Matrix3d lookAlong(double dirX, double dirY, double dirZ, double upX, double upY, double upZ) Apply a rotation transformation to this matrix to make-z
point alongdir
.If
M
isthis
matrix andL
the lookalong rotation matrix, then the new matrix will beM * L
. So when transforming a vectorv
with the new matrix by usingM * L * v
, the lookalong rotation transformation will be applied first!In order to set the matrix to a lookalong transformation without post-multiplying it, use
setLookAlong()
- Parameters:
dirX
- the x-coordinate of the direction to look alongdirY
- the y-coordinate of the direction to look alongdirZ
- the z-coordinate of the direction to look alongupX
- the x-coordinate of the up vectorupY
- the y-coordinate of the up vectorupZ
- the z-coordinate of the up vector- Returns:
- this
- See Also:
-
setLookAlong
Set this matrix to a rotation transformation to make-z
point alongdir
.In order to apply the lookalong transformation to any previous existing transformation, use
lookAlong(Vector3dc, Vector3dc)
.- Parameters:
dir
- the direction in space to look alongup
- the direction of 'up'- Returns:
- this
- See Also:
-
setLookAlong
public Matrix3d setLookAlong(double dirX, double dirY, double dirZ, double upX, double upY, double upZ) Set this matrix to a rotation transformation to make-z
point alongdir
.In order to apply the lookalong transformation to any previous existing transformation, use
lookAlong()
- Parameters:
dirX
- the x-coordinate of the direction to look alongdirY
- the y-coordinate of the direction to look alongdirZ
- the z-coordinate of the direction to look alongupX
- the x-coordinate of the up vectorupY
- the y-coordinate of the up vectorupZ
- the z-coordinate of the up vector- Returns:
- this
- See Also:
-
getScale
Description copied from interface:Matrix3dc
Get the scaling factors ofthis
matrix for the three base axes. -
positiveZ
Description copied from interface:Matrix3dc
Obtain the direction of+Z
before the transformation represented bythis
matrix is applied.This method is equivalent to the following code:
Matrix3d inv = new Matrix3d(this).invert(); inv.transform(dir.set(0, 0, 1)).normalize();
Ifthis
is already an orthogonal matrix, then consider usingMatrix3dc.normalizedPositiveZ(Vector3d)
instead.Reference: http://www.euclideanspace.com
-
normalizedPositiveZ
Description copied from interface:Matrix3dc
Obtain the direction of+Z
before the transformation represented bythis
orthogonal matrix is applied. This method only produces correct results ifthis
is an orthogonal matrix.This method is equivalent to the following code:
Matrix3d inv = new Matrix3d(this).transpose(); inv.transform(dir.set(0, 0, 1));
Reference: http://www.euclideanspace.com
- Specified by:
normalizedPositiveZ
in interfaceMatrix3dc
- Parameters:
dir
- will hold the direction of+Z
- Returns:
- dir
-
positiveX
Description copied from interface:Matrix3dc
Obtain the direction of+X
before the transformation represented bythis
matrix is applied.This method is equivalent to the following code:
Matrix3d inv = new Matrix3d(this).invert(); inv.transform(dir.set(1, 0, 0)).normalize();
Ifthis
is already an orthogonal matrix, then consider usingMatrix3dc.normalizedPositiveX(Vector3d)
instead.Reference: http://www.euclideanspace.com
-
normalizedPositiveX
Description copied from interface:Matrix3dc
Obtain the direction of+X
before the transformation represented bythis
orthogonal matrix is applied. This method only produces correct results ifthis
is an orthogonal matrix.This method is equivalent to the following code:
Matrix3d inv = new Matrix3d(this).transpose(); inv.transform(dir.set(1, 0, 0));
Reference: http://www.euclideanspace.com
- Specified by:
normalizedPositiveX
in interfaceMatrix3dc
- Parameters:
dir
- will hold the direction of+X
- Returns:
- dir
-
positiveY
Description copied from interface:Matrix3dc
Obtain the direction of+Y
before the transformation represented bythis
matrix is applied.This method is equivalent to the following code:
Matrix3d inv = new Matrix3d(this).invert(); inv.transform(dir.set(0, 1, 0)).normalize();
Ifthis
is already an orthogonal matrix, then consider usingMatrix3dc.normalizedPositiveY(Vector3d)
instead.Reference: http://www.euclideanspace.com
-
normalizedPositiveY
Description copied from interface:Matrix3dc
Obtain the direction of+Y
before the transformation represented bythis
orthogonal matrix is applied. This method only produces correct results ifthis
is an orthogonal matrix.This method is equivalent to the following code:
Matrix3d inv = new Matrix3d(this).transpose(); inv.transform(dir.set(0, 1, 0));
Reference: http://www.euclideanspace.com
- Specified by:
normalizedPositiveY
in interfaceMatrix3dc
- Parameters:
dir
- will hold the direction of+Y
- Returns:
- dir
-
hashCode
public int hashCode() -
equals
-
equals
Description copied from interface:Matrix3dc
Compare the matrix elements ofthis
matrix with the given matrix using the givendelta
and return whether all of them are equal within a maximum difference ofdelta
.Please note that this method is not used by any data structure such as
ArrayList
HashSet
orHashMap
and their operations, such asArrayList.contains(Object)
orHashSet.remove(Object)
, since those data structures only use theObject.equals(Object)
andObject.hashCode()
methods. -
swap
Exchange the values ofthis
matrix with the givenother
matrix.- Parameters:
other
- the other matrix to exchange the values with- Returns:
- this
-
add
Component-wise addthis
andother
.- Parameters:
other
- the other addend- Returns:
- this
-
add
Description copied from interface:Matrix3dc
Component-wise addthis
andother
and store the result indest
. -
sub
Component-wise subtractsubtrahend
fromthis
.- Parameters:
subtrahend
- the subtrahend- Returns:
- this
-
sub
Description copied from interface:Matrix3dc
Component-wise subtractsubtrahend
fromthis
and store the result indest
. -
mulComponentWise
Component-wise multiplythis
byother
.- Parameters:
other
- the other matrix- Returns:
- this
-
mulComponentWise
Description copied from interface:Matrix3dc
Component-wise multiplythis
byother
and store the result indest
.- Specified by:
mulComponentWise
in interfaceMatrix3dc
- Parameters:
other
- the other matrixdest
- will hold the result- Returns:
- dest
-
setSkewSymmetric
Set this matrix to a skew-symmetric matrix using the following layout:0, a, -b -a, 0, c b, -c, 0
Reference: https://en.wikipedia.org- Parameters:
a
- the value used for the matrix elements m01 and m10b
- the value used for the matrix elements m02 and m20c
- the value used for the matrix elements m12 and m21- Returns:
- this
-
lerp
Linearly interpolatethis
andother
using the given interpolation factort
and store the result inthis
.If
t
is0.0
then the result isthis
. If the interpolation factor is1.0
then the result isother
.- Parameters:
other
- the other matrixt
- the interpolation factor between 0.0 and 1.0- Returns:
- this
-
lerp
Description copied from interface:Matrix3dc
Linearly interpolatethis
andother
using the given interpolation factort
and store the result indest
.If
t
is0.0
then the result isthis
. If the interpolation factor is1.0
then the result isother
. -
rotateTowards
Apply a model transformation to this matrix for a right-handed coordinate system, that aligns the local+Z
axis withdirection
and store the result indest
.If
M
isthis
matrix andL
the lookat matrix, then the new matrix will beM * L
. So when transforming a vectorv
with the new matrix by usingM * L * v
, the lookat transformation will be applied first!In order to set the matrix to a rotation transformation without post-multiplying it, use
rotationTowards()
.This method is equivalent to calling:
mul(new Matrix3d().lookAlong(new Vector3d(dir).negate(), up).invert(), dest)
- Specified by:
rotateTowards
in interfaceMatrix3dc
- Parameters:
direction
- the direction to rotate towardsup
- the model's up vectordest
- will hold the result- Returns:
- dest
- See Also:
-
rotateTowards
Apply a model transformation to this matrix for a right-handed coordinate system, that aligns the local+Z
axis withdirection
.If
M
isthis
matrix andL
the lookat matrix, then the new matrix will beM * L
. So when transforming a vectorv
with the new matrix by usingM * L * v
, the lookat transformation will be applied first!In order to set the matrix to a rotation transformation without post-multiplying it, use
rotationTowards()
.This method is equivalent to calling:
mul(new Matrix3d().lookAlong(new Vector3d(dir).negate(), up).invert())
- Parameters:
direction
- the direction to orient towardsup
- the up vector- Returns:
- this
- See Also:
-
rotateTowards
public Matrix3d 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 withdirection
.If
M
isthis
matrix andL
the lookat matrix, then the new matrix will beM * L
. So when transforming a vectorv
with the new matrix by usingM * L * v
, the lookat transformation will be applied first!In order to set the matrix to a rotation transformation without post-multiplying it, use
rotationTowards()
.This method is equivalent to calling:
mul(new Matrix3d().lookAlong(-dirX, -dirY, -dirZ, upX, upY, upZ).invert())
- Parameters:
dirX
- the x-coordinate of the direction to rotate towardsdirY
- the y-coordinate of the direction to rotate towardsdirZ
- the z-coordinate of the direction to rotate towardsupX
- the x-coordinate of the up vectorupY
- the y-coordinate of the up vectorupZ
- the z-coordinate of the up vector- Returns:
- this
- See Also:
-
rotateTowards
public Matrix3d rotateTowards(double dirX, double dirY, double dirZ, double upX, double upY, double upZ, Matrix3d dest) Apply a model transformation to this matrix for a right-handed coordinate system, that aligns the local+Z
axis withdir
and store the result indest
.If
M
isthis
matrix andL
the lookat matrix, then the new matrix will beM * L
. So when transforming a vectorv
with the new matrix by usingM * L * v
, the lookat transformation will be applied first!In order to set the matrix to a rotation transformation without post-multiplying it, use
rotationTowards()
.This method is equivalent to calling:
mul(new Matrix3d().lookAlong(-dirX, -dirY, -dirZ, upX, upY, upZ).invert(), dest)
- Specified by:
rotateTowards
in interfaceMatrix3dc
- Parameters:
dirX
- the x-coordinate of the direction to rotate towardsdirY
- the y-coordinate of the direction to rotate towardsdirZ
- the z-coordinate of the direction to rotate towardsupX
- the x-coordinate of the up vectorupY
- the y-coordinate of the up vectorupZ
- the z-coordinate of the up vectordest
- will hold the result- Returns:
- dest
- See Also:
-
rotationTowards
Set this matrix to a model transformation for a right-handed coordinate system, that aligns the local-z
axis withcenter - eye
.In order to apply the rotation transformation to a previous existing transformation, use
rotateTowards
.This method is equivalent to calling:
setLookAlong(new Vector3d(dir).negate(), up).invert()
- Parameters:
dir
- the direction to orient the local -z axis towardsup
- the up vector- Returns:
- this
- See Also:
-
rotationTowards
public Matrix3d 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 withcenter - eye
.In order to apply the rotation transformation to a previous existing transformation, use
rotateTowards
.This method is equivalent to calling:
setLookAlong(-dirX, -dirY, -dirZ, upX, upY, upZ).invert()
- Parameters:
dirX
- the x-coordinate of the direction to rotate towardsdirY
- the y-coordinate of the direction to rotate towardsdirZ
- the z-coordinate of the direction to rotate towardsupX
- the x-coordinate of the up vectorupY
- the y-coordinate of the up vectorupZ
- the z-coordinate of the up vector- Returns:
- this
- See Also:
-
getEulerAnglesZYX
Description copied from interface:Matrix3dc
Extract the Euler angles from the rotation represented bythis
matrix and store the extracted Euler angles indest
.This method assumes that
this
matrix only represents a rotation without scaling.The Euler angles are always returned as the angle around X in the
Vector3d.x
field, the angle around Y in theVector3d.y
field and the angle around Z in theVector3d.z
field of the suppliedVector3d
instance.Note that the returned Euler angles must be applied in the order
Z * Y * X
to obtain the identical matrix. This means that callingMatrix3dc.rotateZYX(double, double, double, Matrix3d)
using the obtained Euler angles will yield the same rotation as the original matrix from which the Euler angles were obtained, so in the below code the matrixm2
should be identical tom
(disregarding possible floating-point inaccuracies).Matrix3d m = ...; // <- matrix only representing rotation Matrix3d n = new Matrix3d(); n.rotateZYX(m.getEulerAnglesZYX(new Vector3d()));
Reference: http://en.wikipedia.org/
- Specified by:
getEulerAnglesZYX
in interfaceMatrix3dc
- Parameters:
dest
- will hold the extracted Euler angles- Returns:
- dest
-
getEulerAnglesXYZ
Description copied from interface:Matrix3dc
Extract the Euler angles from the rotation represented bythis
matrix and store the extracted Euler angles indest
.This method assumes that
this
matrix only represents a rotation without scaling.The Euler angles are always returned as the angle around X in the
Vector3d.x
field, the angle around Y in theVector3d.y
field and the angle around Z in theVector3d.z
field of the suppliedVector3d
instance.Note that the returned Euler angles must be applied in the order
X * Y * Z
to obtain the identical matrix. This means that callingMatrix3dc.rotateXYZ(double, double, double, Matrix3d)
using the obtained Euler angles will yield the same rotation as the original matrix from which the Euler angles were obtained, so in the below code the matrixm2
should be identical tom
(disregarding possible floating-point inaccuracies).Matrix3d m = ...; // <- matrix only representing rotation Matrix3d n = new Matrix3d(); n.rotateXYZ(m.getEulerAnglesXYZ(new Vector3d()));
Reference: http://en.wikipedia.org/
- Specified by:
getEulerAnglesXYZ
in interfaceMatrix3dc
- Parameters:
dest
- will hold the extracted Euler angles- Returns:
- dest
-
obliqueZ
Apply an oblique projection transformation to this matrix with the given values fora
andb
.If
M
isthis
matrix andO
the oblique transformation matrix, then the new matrix will beM * O
. So when transforming a vectorv
with the new matrix by usingM * O * v
, the oblique transformation will be applied first!The oblique transformation is defined as:
x' = x + a*z y' = y + a*z z' = z
or in matrix form:1 0 a 0 1 b 0 0 1
- Parameters:
a
- the value for the z factor that applies to xb
- the value for the z factor that applies to y- Returns:
- this
-
obliqueZ
Apply an oblique projection transformation to this matrix with the given values fora
andb
and store the result indest
.If
M
isthis
matrix andO
the oblique transformation matrix, then the new matrix will beM * O
. So when transforming a vectorv
with the new matrix by usingM * O * v
, the oblique transformation will be applied first!The oblique transformation is defined as:
x' = x + a*z y' = y + a*z z' = z
or in matrix form:1 0 a 0 1 b 0 0 1
-
reflect
Description copied from interface:Matrix3dc
Apply a mirror/reflection transformation to this matrix that reflects through the given plane specified via the plane normal(nx, ny, nz)
, and store the result indest
.If
M
isthis
matrix andR
the reflection matrix, then the new matrix will beM * R
. So when transforming a vectorv
with the new matrix by usingM * R * v
, the reflection will be applied first! -
reflect
Apply a mirror/reflection transformation to this matrix that reflects through the given plane specified via the plane normal.If
M
isthis
matrix andR
the reflection matrix, then the new matrix will beM * R
. So when transforming a vectorv
with the new matrix by usingM * R * v
, the reflection will be applied first!- Parameters:
nx
- the x-coordinate of the plane normalny
- the y-coordinate of the plane normalnz
- the z-coordinate of the plane normal- Returns:
- this
-
reflect
Apply a mirror/reflection transformation to this matrix that reflects through the given plane specified via the plane normal.If
M
isthis
matrix andR
the reflection matrix, then the new matrix will beM * R
. So when transforming a vectorv
with the new matrix by usingM * R * v
, the reflection will be applied first!- Parameters:
normal
- the plane normal- Returns:
- this
-
reflect
Apply a mirror/reflection transformation to this matrix that reflects about a plane specified via the plane orientation.This method can be used to build a reflection transformation based on the orientation of a mirror object in the scene. It is assumed that the default mirror plane's normal is
(0, 0, 1)
. So, if the givenQuaterniondc
is the identity (does not apply any additional rotation), the reflection plane will bez=0
.If
M
isthis
matrix andR
the reflection matrix, then the new matrix will beM * R
. So when transforming a vectorv
with the new matrix by usingM * R * v
, the reflection will be applied first!- Parameters:
orientation
- the plane orientation- Returns:
- this
-
reflect
Description copied from interface:Matrix3dc
Apply a mirror/reflection transformation to this matrix that reflects through a plane specified via the plane orientation, and store the result indest
.This method can be used to build a reflection transformation based on the orientation of a mirror object in the scene. It is assumed that the default mirror plane's normal is
(0, 0, 1)
. So, if the givenQuaterniondc
is the identity (does not apply any additional rotation), the reflection plane will bez=0
.If
M
isthis
matrix andR
the reflection matrix, then the new matrix will beM * R
. So when transforming a vectorv
with the new matrix by usingM * R * v
, the reflection will be applied first! -
reflect
Description copied from interface:Matrix3dc
Apply a mirror/reflection transformation to this matrix that reflects through the given plane specified via the plane normal, and store the result indest
.If
M
isthis
matrix andR
the reflection matrix, then the new matrix will beM * R
. So when transforming a vectorv
with the new matrix by usingM * R * v
, the reflection will be applied first! -
reflection
Set this matrix to a mirror/reflection transformation that reflects through the given plane specified via the plane normal.- Parameters:
nx
- the x-coordinate of the plane normalny
- the y-coordinate of the plane normalnz
- the z-coordinate of the plane normal- Returns:
- this
-
reflection
Set this matrix to a mirror/reflection transformation that reflects through the given plane specified via the plane normal.- Parameters:
normal
- the plane normal- Returns:
- this
-
reflection
Set this matrix to a mirror/reflection transformation that reflects through a plane specified via the plane orientation.This method can be used to build a reflection transformation based on the orientation of a mirror object in the scene. It is assumed that the default mirror plane's normal is
(0, 0, 1)
. So, if the givenQuaterniondc
is the identity (does not apply any additional rotation), the reflection plane will bez=0
, offset by the givenpoint
.- Parameters:
orientation
- the plane orientation- Returns:
- this
-
isFinite
public boolean isFinite()Description copied from interface:Matrix3dc
-
quadraticFormProduct
public double quadraticFormProduct(double x, double y, double z) Description copied from interface:Matrix3dc
Compute(x, y, z)^T * this * (x, y, z)
.- Specified by:
quadraticFormProduct
in interfaceMatrix3dc
- Parameters:
x
- the x coordinate of the vector to multiplyy
- the y coordinate of the vector to multiplyz
- the z coordinate of the vector to multiply- Returns:
- the result
-
quadraticFormProduct
Description copied from interface:Matrix3dc
Computev^T * this * v
.- Specified by:
quadraticFormProduct
in interfaceMatrix3dc
- Parameters:
v
- the vector to multiply- Returns:
- the result
-
quadraticFormProduct
Description copied from interface:Matrix3dc
Computev^T * this * v
.- Specified by:
quadraticFormProduct
in interfaceMatrix3dc
- Parameters:
v
- the vector to multiply- Returns:
- the result
-
mapXZY
Multiplythis
by the matrix1 0 0 0 0 1 0 1 0
- Returns:
- this
-
mapXZY
Description copied from interface:Matrix3dc
Multiplythis
by the matrix1 0 0 0 0 1 0 1 0
and store the result indest
. -
mapXZnY
Multiplythis
by the matrix1 0 0 0 0 -1 0 1 0
- Returns:
- this
-
mapXZnY
Description copied from interface:Matrix3dc
Multiplythis
by the matrix1 0 0 0 0 -1 0 1 0
and store the result indest
. -
mapXnYnZ
Multiplythis
by the matrix1 0 0 0 -1 0 0 0 -1
- Returns:
- this
-
mapXnYnZ
Description copied from interface:Matrix3dc
Multiplythis
by the matrix1 0 0 0 -1 0 0 0 -1
and store the result indest
. -
mapXnZY
Multiplythis
by the matrix1 0 0 0 0 1 0 -1 0
- Returns:
- this
-
mapXnZY
Description copied from interface:Matrix3dc
Multiplythis
by the matrix1 0 0 0 0 1 0 -1 0
and store the result indest
. -
mapXnZnY
Multiplythis
by the matrix1 0 0 0 0 -1 0 -1 0
- Returns:
- this
-
mapXnZnY
Description copied from interface:Matrix3dc
Multiplythis
by the matrix1 0 0 0 0 -1 0 -1 0
and store the result indest
. -
mapYXZ
Multiplythis
by the matrix0 1 0 1 0 0 0 0 1
- Returns:
- this
-
mapYXZ
Description copied from interface:Matrix3dc
Multiplythis
by the matrix0 1 0 1 0 0 0 0 1
and store the result indest
. -
mapYXnZ
Multiplythis
by the matrix0 1 0 1 0 0 0 0 -1
- Returns:
- this
-
mapYXnZ
Description copied from interface:Matrix3dc
Multiplythis
by the matrix0 1 0 1 0 0 0 0 -1
and store the result indest
. -
mapYZX
Multiplythis
by the matrix0 0 1 1 0 0 0 1 0
- Returns:
- this
-
mapYZX
Description copied from interface:Matrix3dc
Multiplythis
by the matrix0 0 1 1 0 0 0 1 0
and store the result indest
. -
mapYZnX
Multiplythis
by the matrix0 0 -1 1 0 0 0 1 0
- Returns:
- this
-
mapYZnX
Description copied from interface:Matrix3dc
Multiplythis
by the matrix0 0 -1 1 0 0 0 1 0
and store the result indest
. -
mapYnXZ
Multiplythis
by the matrix0 -1 0 1 0 0 0 0 1
- Returns:
- this
-
mapYnXZ
Description copied from interface:Matrix3dc
Multiplythis
by the matrix0 -1 0 1 0 0 0 0 1
and store the result indest
. -
mapYnXnZ
Multiplythis
by the matrix0 -1 0 1 0 0 0 0 -1
- Returns:
- this
-
mapYnXnZ
Description copied from interface:Matrix3dc
Multiplythis
by the matrix0 -1 0 1 0 0 0 0 -1
and store the result indest
. -
mapYnZX
Multiplythis
by the matrix0 0 1 1 0 0 0 -1 0
- Returns:
- this
-
mapYnZX
Description copied from interface:Matrix3dc
Multiplythis
by the matrix0 0 1 1 0 0 0 -1 0
and store the result indest
. -
mapYnZnX
Multiplythis
by the matrix0 0 -1 1 0 0 0 -1 0
- Returns:
- this
-
mapYnZnX
Description copied from interface:Matrix3dc
Multiplythis
by the matrix0 0 -1 1 0 0 0 -1 0
and store the result indest
. -
mapZXY
Multiplythis
by the matrix0 1 0 0 0 1 1 0 0
- Returns:
- this
-
mapZXY
Description copied from interface:Matrix3dc
Multiplythis
by the matrix0 1 0 0 0 1 1 0 0
and store the result indest
. -
mapZXnY
Multiplythis
by the matrix0 1 0 0 0 -1 1 0 0
- Returns:
- this
-
mapZXnY
Description copied from interface:Matrix3dc
Multiplythis
by the matrix0 1 0 0 0 -1 1 0 0
and store the result indest
. -
mapZYX
Multiplythis
by the matrix0 0 1 0 1 0 1 0 0
- Returns:
- this
-
mapZYX
Description copied from interface:Matrix3dc
Multiplythis
by the matrix0 0 1 0 1 0 1 0 0
and store the result indest
. -
mapZYnX
Multiplythis
by the matrix0 0 -1 0 1 0 1 0 0
- Returns:
- this
-
mapZYnX
Description copied from interface:Matrix3dc
Multiplythis
by the matrix0 0 -1 0 1 0 1 0 0
and store the result indest
. -
mapZnXY
Multiplythis
by the matrix0 -1 0 0 0 1 1 0 0
- Returns:
- this
-
mapZnXY
Description copied from interface:Matrix3dc
Multiplythis
by the matrix0 -1 0 0 0 1 1 0 0
and store the result indest
. -
mapZnXnY
Multiplythis
by the matrix0 -1 0 0 0 -1 1 0 0
- Returns:
- this
-
mapZnXnY
Description copied from interface:Matrix3dc
Multiplythis
by the matrix0 -1 0 0 0 -1 1 0 0
and store the result indest
. -
mapZnYX
Multiplythis
by the matrix0 0 1 0 -1 0 1 0 0
- Returns:
- this
-
mapZnYX
Description copied from interface:Matrix3dc
Multiplythis
by the matrix0 0 1 0 -1 0 1 0 0
and store the result indest
. -
mapZnYnX
Multiplythis
by the matrix0 0 -1 0 -1 0 1 0 0
- Returns:
- this
-
mapZnYnX
Description copied from interface:Matrix3dc
Multiplythis
by the matrix0 0 -1 0 -1 0 1 0 0
and store the result indest
. -
mapnXYnZ
Multiplythis
by the matrix-1 0 0 0 1 0 0 0 -1
- Returns:
- this
-
mapnXYnZ
Description copied from interface:Matrix3dc
Multiplythis
by the matrix-1 0 0 0 1 0 0 0 -1
and store the result indest
. -
mapnXZY
Multiplythis
by the matrix-1 0 0 0 0 1 0 1 0
- Returns:
- this
-
mapnXZY
Description copied from interface:Matrix3dc
Multiplythis
by the matrix-1 0 0 0 0 1 0 1 0
and store the result indest
. -
mapnXZnY
Multiplythis
by the matrix-1 0 0 0 0 -1 0 1 0
- Returns:
- this
-
mapnXZnY
Description copied from interface:Matrix3dc
Multiplythis
by the matrix-1 0 0 0 0 -1 0 1 0
and store the result indest
. -
mapnXnYZ
Multiplythis
by the matrix-1 0 0 0 -1 0 0 0 1
- Returns:
- this
-
mapnXnYZ
Description copied from interface:Matrix3dc
Multiplythis
by the matrix-1 0 0 0 -1 0 0 0 1
and store the result indest
. -
mapnXnYnZ
Multiplythis
by the matrix-1 0 0 0 -1 0 0 0 -1
- Returns:
- this
-
mapnXnYnZ
Description copied from interface:Matrix3dc
Multiplythis
by the matrix-1 0 0 0 -1 0 0 0 -1
and store the result indest
. -
mapnXnZY
Multiplythis
by the matrix-1 0 0 0 0 1 0 -1 0
- Returns:
- this
-
mapnXnZY
Description copied from interface:Matrix3dc
Multiplythis
by the matrix-1 0 0 0 0 1 0 -1 0
and store the result indest
. -
mapnXnZnY
Multiplythis
by the matrix-1 0 0 0 0 -1 0 -1 0
- Returns:
- this
-
mapnXnZnY
Description copied from interface:Matrix3dc
Multiplythis
by the matrix-1 0 0 0 0 -1 0 -1 0
and store the result indest
. -
mapnYXZ
Multiplythis
by the matrix0 1 0 -1 0 0 0 0 1
- Returns:
- this
-
mapnYXZ
Description copied from interface:Matrix3dc
Multiplythis
by the matrix0 1 0 -1 0 0 0 0 1
and store the result indest
. -
mapnYXnZ
Multiplythis
by the matrix0 1 0 -1 0 0 0 0 -1
- Returns:
- this
-
mapnYXnZ
Description copied from interface:Matrix3dc
Multiplythis
by the matrix0 1 0 -1 0 0 0 0 -1
and store the result indest
. -
mapnYZX
Multiplythis
by the matrix0 0 1 -1 0 0 0 1 0
- Returns:
- this
-
mapnYZX
Description copied from interface:Matrix3dc
Multiplythis
by the matrix0 0 1 -1 0 0 0 1 0
and store the result indest
. -
mapnYZnX
Multiplythis
by the matrix0 0 -1 -1 0 0 0 1 0
- Returns:
- this
-
mapnYZnX
Description copied from interface:Matrix3dc
Multiplythis
by the matrix0 0 -1 -1 0 0 0 1 0
and store the result indest
. -
mapnYnXZ
Multiplythis
by the matrix0 -1 0 -1 0 0 0 0 1
- Returns:
- this
-
mapnYnXZ
Description copied from interface:Matrix3dc
Multiplythis
by the matrix0 -1 0 -1 0 0 0 0 1
and store the result indest
. -
mapnYnXnZ
Multiplythis
by the matrix0 -1 0 -1 0 0 0 0 -1
- Returns:
- this
-
mapnYnXnZ
Description copied from interface:Matrix3dc
Multiplythis
by the matrix0 -1 0 -1 0 0 0 0 -1
and store the result indest
. -
mapnYnZX
Multiplythis
by the matrix0 0 1 -1 0 0 0 -1 0
- Returns:
- this
-
mapnYnZX
Description copied from interface:Matrix3dc
Multiplythis
by the matrix0 0 1 -1 0 0 0 -1 0
and store the result indest
. -
mapnYnZnX
Multiplythis
by the matrix0 0 -1 -1 0 0 0 -1 0
- Returns:
- this
-
mapnYnZnX
Description copied from interface:Matrix3dc
Multiplythis
by the matrix0 0 -1 -1 0 0 0 -1 0
and store the result indest
. -
mapnZXY
Multiplythis
by the matrix0 1 0 0 0 1 -1 0 0
- Returns:
- this
-
mapnZXY
Description copied from interface:Matrix3dc
Multiplythis
by the matrix0 1 0 0 0 1 -1 0 0
and store the result indest
. -
mapnZXnY
Multiplythis
by the matrix0 1 0 0 0 -1 -1 0 0
- Returns:
- this
-
mapnZXnY
Description copied from interface:Matrix3dc
Multiplythis
by the matrix0 1 0 0 0 -1 -1 0 0
and store the result indest
. -
mapnZYX
Multiplythis
by the matrix0 0 1 0 1 0 -1 0 0
- Returns:
- this
-
mapnZYX
Description copied from interface:Matrix3dc
Multiplythis
by the matrix0 0 1 0 1 0 -1 0 0
and store the result indest
. -
mapnZYnX
Multiplythis
by the matrix0 0 -1 0 1 0 -1 0 0
- Returns:
- this
-
mapnZYnX
Description copied from interface:Matrix3dc
Multiplythis
by the matrix0 0 -1 0 1 0 -1 0 0
and store the result indest
. -
mapnZnXY
Multiplythis
by the matrix0 -1 0 0 0 1 -1 0 0
- Returns:
- this
-
mapnZnXY
Description copied from interface:Matrix3dc
Multiplythis
by the matrix0 -1 0 0 0 1 -1 0 0
and store the result indest
. -
mapnZnXnY
Multiplythis
by the matrix0 -1 0 0 0 -1 -1 0 0
- Returns:
- this
-
mapnZnXnY
Description copied from interface:Matrix3dc
Multiplythis
by the matrix0 -1 0 0 0 -1 -1 0 0
and store the result indest
. -
mapnZnYX
Multiplythis
by the matrix0 0 1 0 -1 0 -1 0 0
- Returns:
- this
-
mapnZnYX
Description copied from interface:Matrix3dc
Multiplythis
by the matrix0 0 1 0 -1 0 -1 0 0
and store the result indest
. -
mapnZnYnX
Multiplythis
by the matrix0 0 -1 0 -1 0 -1 0 0
- Returns:
- this
-
mapnZnYnX
Description copied from interface:Matrix3dc
Multiplythis
by the matrix0 0 -1 0 -1 0 -1 0 0
and store the result indest
. -
negateX
Multiplythis
by the matrix-1 0 0 0 1 0 0 0 1
- Returns:
- this
-
negateX
Description copied from interface:Matrix3dc
Multiplythis
by the matrix-1 0 0 0 1 0 0 0 1
and store the result indest
. -
negateY
Multiplythis
by the matrix1 0 0 0 -1 0 0 0 1
- Returns:
- this
-
negateY
Description copied from interface:Matrix3dc
Multiplythis
by the matrix1 0 0 0 -1 0 0 0 1
and store the result indest
. -
negateZ
Multiplythis
by the matrix1 0 0 0 1 0 0 0 -1
- Returns:
- this
-
negateZ
Description copied from interface:Matrix3dc
Multiplythis
by the matrix1 0 0 0 1 0 0 0 -1
and store the result indest
. -
clone
- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-