Interface Matrix3dc
-
- All Known Implementing Classes:
Matrix3d
,Matrix3dStack
public interface Matrix3dc
Interface to a read-only view of a 3x3 matrix of double-precision floats.- Author:
- Kai Burjack
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Matrix3d
add(Matrix3dc other, Matrix3d dest)
Component-wise addthis
andother
and store the result indest
.Matrix3d
cofactor(Matrix3d dest)
Compute the cofactor matrix ofthis
and store it intodest
.double
determinant()
Return the determinant of this matrix.boolean
equals(Matrix3dc m, double delta)
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.java.nio.ByteBuffer
get(int index, java.nio.ByteBuffer buffer)
Store this matrix in column-major order into the suppliedByteBuffer
starting at the specified absolute buffer position/index.java.nio.DoubleBuffer
get(int index, java.nio.DoubleBuffer buffer)
Store this matrix into the suppliedDoubleBuffer
starting at the specified absolute buffer position/index using column-major order.java.nio.FloatBuffer
get(int index, java.nio.FloatBuffer buffer)
Store this matrix in column-major order into the suppliedFloatBuffer
starting at the specified absolute buffer position/index.java.nio.ByteBuffer
get(java.nio.ByteBuffer buffer)
Store this matrix in column-major order into the suppliedByteBuffer
at the current bufferposition
.java.nio.DoubleBuffer
get(java.nio.DoubleBuffer buffer)
Store this matrix into the suppliedDoubleBuffer
at the current bufferposition
using column-major order.java.nio.FloatBuffer
get(java.nio.FloatBuffer buffer)
Store this matrix in column-major order into the suppliedFloatBuffer
at the current bufferposition
.Matrix3d
get(Matrix3d dest)
Get the current values ofthis
matrix and store them intodest
.Vector3d
getColumn(int column, Vector3d dest)
Get the column at the givencolumn
index, starting with0
.Vector3d
getEulerAnglesXYZ(Vector3d dest)
Extract the Euler angles from the rotation represented bythis
matrix and store the extracted Euler angles indest
.Vector3d
getEulerAnglesZYX(Vector3d dest)
Extract the Euler angles from the rotation represented bythis
matrix and store the extracted Euler angles indest
.java.nio.ByteBuffer
getFloats(int index, java.nio.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.java.nio.ByteBuffer
getFloats(java.nio.ByteBuffer buffer)
Store the elements of this matrix as float values in column-major order into the suppliedByteBuffer
at the current bufferposition
.Quaterniond
getNormalizedRotation(Quaterniond dest)
Get the current values ofthis
matrix and store the represented rotation into the givenQuaterniond
.Quaternionf
getNormalizedRotation(Quaternionf dest)
Get the current values ofthis
matrix and store the represented rotation into the givenQuaternionf
.AxisAngle4f
getRotation(AxisAngle4f dest)
Get the current values ofthis
matrix and store the represented rotation into the givenAxisAngle4f
.Vector3d
getRow(int row, Vector3d dest)
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.Vector3d
getScale(Vector3d dest)
Get the scaling factors ofthis
matrix for the three base axes.Matrix3dc
getToAddress(long address)
Store this matrix in column-major order at the given off-heap address.java.nio.ByteBuffer
getTransposed(int index, java.nio.ByteBuffer buffer)
Store this matrix in row-major order into the suppliedByteBuffer
starting at the specified absolute buffer position/index.java.nio.DoubleBuffer
getTransposed(int index, java.nio.DoubleBuffer buffer)
Store this matrix in row-major order into the suppliedDoubleBuffer
starting at the specified absolute buffer position/index.java.nio.FloatBuffer
getTransposed(int index, java.nio.FloatBuffer buffer)
Store this matrix in row-major order into the suppliedFloatBuffer
starting at the specified absolute buffer position/index.java.nio.ByteBuffer
getTransposed(java.nio.ByteBuffer buffer)
Store this matrix in row-major order into the suppliedByteBuffer
at the current bufferposition
.java.nio.DoubleBuffer
getTransposed(java.nio.DoubleBuffer buffer)
Store this matrix in row-major order into the suppliedDoubleBuffer
at the current bufferposition
.java.nio.FloatBuffer
getTransposed(java.nio.FloatBuffer buffer)
Store this matrix in row-major order into the suppliedFloatBuffer
at the current bufferposition
.java.nio.ByteBuffer
getTransposedFloats(int index, java.nio.ByteBuffer buffer)
Store this matrix in row-major order into the suppliedByteBuffer
starting at the specified absolute buffer position/index.java.nio.ByteBuffer
getTransposedFloats(java.nio.ByteBuffer buffer)
Store this matrix as float values in row-major order into the suppliedByteBuffer
at the current bufferposition
.Quaterniond
getUnnormalizedRotation(Quaterniond dest)
Get the current values ofthis
matrix and store the represented rotation into the givenQuaterniond
.Quaternionf
getUnnormalizedRotation(Quaternionf dest)
Get the current values ofthis
matrix and store the represented rotation into the givenQuaternionf
.Matrix3d
invert(Matrix3d dest)
Invertthis
matrix and store the result indest
.boolean
isFinite()
Determine whether all matrix elements are finite floating-point values, that is, they are notNaN
and notinfinity
.Matrix3d
lerp(Matrix3dc other, double t, Matrix3d dest)
Linearly interpolatethis
andother
using the given interpolation factort
and store the result indest
.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
.Matrix3d
lookAlong(Vector3dc dir, Vector3dc up, Matrix3d dest)
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.double
m01()
Return 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.double
m10()
Return 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.double
m12()
Return 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.double
m21()
Return 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.Matrix3d
mapnXnYnZ(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapnXnYZ(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapnXnZnY(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapnXnZY(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapnXYnZ(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapnXZnY(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapnXZY(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapnYnXnZ(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapnYnXZ(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapnYnZnX(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapnYnZX(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapnYXnZ(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapnYXZ(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapnYZnX(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapnYZX(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapnZnXnY(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapnZnXY(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapnZnYnX(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapnZnYX(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapnZXnY(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapnZXY(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapnZYnX(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapnZYX(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapXnYnZ(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapXnZnY(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapXnZY(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapXZnY(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapXZY(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapYnXnZ(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapYnXZ(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapYnZnX(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapYnZX(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapYXnZ(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapYXZ(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapYZnX(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapYZX(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapZnXnY(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapZnXY(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapZnYnX(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapZnYX(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapZXnY(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapZXY(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapZYnX(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mapZYX(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
mul(Matrix3dc right, Matrix3d dest)
Multiply this matrix by the supplied matrix and store the result indest
.Matrix3d
mul(Matrix3fc right, Matrix3d dest)
Multiply this matrix by the supplied matrix and store the result indest
.Matrix3d
mulComponentWise(Matrix3dc other, Matrix3d dest)
Component-wise multiplythis
byother
and store the result indest
.Matrix3d
mulLocal(Matrix3dc left, Matrix3d dest)
Pre-multiply this matrix by the suppliedleft
matrix and store the result indest
.Matrix3d
negateX(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
negateY(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
negateZ(Matrix3d dest)
Multiplythis
by the matrixMatrix3d
normal(Matrix3d dest)
Compute a normal matrix fromthis
matrix and store it intodest
.Vector3d
normalizedPositiveX(Vector3d dir)
Obtain the direction of+X
before the transformation represented bythis
orthogonal matrix is applied.Vector3d
normalizedPositiveY(Vector3d dir)
Obtain the direction of+Y
before the transformation represented bythis
orthogonal matrix is applied.Vector3d
normalizedPositiveZ(Vector3d dir)
Obtain the direction of+Z
before the transformation represented bythis
orthogonal matrix is applied.Matrix3d
obliqueZ(double a, double b, Matrix3d dest)
Apply an oblique projection transformation to this matrix with the given values fora
andb
and store the result indest
.Vector3d
positiveX(Vector3d dir)
Obtain the direction of+X
before the transformation represented bythis
matrix is applied.Vector3d
positiveY(Vector3d dir)
Obtain the direction of+Y
before the transformation represented bythis
matrix is applied.Vector3d
positiveZ(Vector3d dir)
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
quadraticFormProduct(Vector3dc v)
Computev^T * this * v
.double
quadraticFormProduct(Vector3fc v)
Computev^T * this * v
.Matrix3d
reflect(double nx, double ny, double nz, Matrix3d dest)
Apply a mirror/reflection transformation to this matrix that reflects through the given plane specified via the plane normal(nx, ny, nz)
, and store the result indest
.Matrix3d
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
.Matrix3d
reflect(Vector3dc normal, Matrix3d dest)
Apply a mirror/reflection transformation to this matrix that reflects through the given plane specified via the plane normal, and store the result indest
.Matrix3d
rotate(double ang, double x, double y, double z, Matrix3d dest)
Apply rotation to this matrix by rotating the given amount of radians about the given axis specified as x, y and z components, and store the result indest
.Matrix3d
rotate(double angle, Vector3dc axis, Matrix3d dest)
Apply a rotation transformation, rotating the given radians about the specified axis and store the result indest
.Matrix3d
rotate(double angle, Vector3fc axis, Matrix3d dest)
Apply a rotation transformation, rotating the given radians about the specified axis and store the result indest
.Matrix3d
rotate(AxisAngle4d axisAngle, Matrix3d dest)
Apply a rotation transformation, rotating about the givenAxisAngle4d
and store the result indest
.Matrix3d
rotate(AxisAngle4f axisAngle, Matrix3d dest)
Apply a rotation transformation, rotating about the givenAxisAngle4f
and store the result indest
.Matrix3d
rotate(Quaterniondc quat, Matrix3d dest)
Apply the rotation - and possibly scaling - transformation of the givenQuaterniondc
to this matrix and store the result indest
.Matrix3d
rotate(Quaternionfc quat, Matrix3d dest)
Apply the rotation - and possibly scaling - transformation of the givenQuaternionfc
to this matrix and store the result indest
.Matrix3d
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
.Matrix3d
rotateLocal(Quaterniondc quat, Matrix3d dest)
Pre-multiply the rotation - and possibly scaling - transformation of the givenQuaterniondc
to this matrix and store the result indest
.Matrix3d
rotateLocal(Quaternionfc quat, Matrix3d dest)
Pre-multiply the rotation - and possibly scaling - transformation of the givenQuaternionfc
to this matrix and store the result indest
.Matrix3d
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
.Matrix3d
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
.Matrix3d
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
.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
.Matrix3d
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
.Matrix3d
rotateX(double ang, Matrix3d dest)
Apply rotation about the X axis to this matrix by rotating the given amount of radians and store the result indest
.Matrix3d
rotateXYZ(double angleX, double angleY, double angleZ, Matrix3d dest)
Apply rotation ofangleX
radians about the X axis, followed by a rotation ofangleY
radians about the Y axis and followed by a rotation ofangleZ
radians about the Z axis and store the result indest
.Matrix3d
rotateY(double ang, Matrix3d dest)
Apply rotation about the Y axis to this matrix by rotating the given amount of radians and store the result indest
.Matrix3d
rotateYXZ(double angleY, double angleX, double angleZ, Matrix3d dest)
Apply rotation ofangleY
radians about the Y axis, followed by a rotation ofangleX
radians about the X axis and followed by a rotation ofangleZ
radians about the Z axis and store the result indest
.Matrix3d
rotateZ(double ang, Matrix3d dest)
Apply rotation about the Z axis to this matrix by rotating the given amount of radians and store the result indest
.Matrix3d
rotateZYX(double angleZ, double angleY, double angleX, Matrix3d dest)
Apply rotation ofangleZ
radians about the Z axis, followed by a rotation ofangleY
radians about the Y axis and followed by a rotation ofangleX
radians about the X axis and store the result indest
.Matrix3d
scale(double x, double y, double z, Matrix3d dest)
Apply scaling to this matrix by scaling the base axes by the given x, y and z factors and store the result indest
.Matrix3d
scale(double xyz, Matrix3d dest)
Apply scaling to this matrix by uniformly scaling all base axes by the givenxyz
factor and store the result indest
.Matrix3d
scale(Vector3dc xyz, Matrix3d dest)
Apply scaling tothis
matrix by scaling the base axes by the givenxyz.x
,xyz.y
andxyz.z
factors, respectively and store the result indest
.Matrix3d
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
.Matrix3d
sub(Matrix3dc subtrahend, Matrix3d dest)
Component-wise subtractsubtrahend
fromthis
and store the result indest
.Vector3d
transform(double x, double y, double z, Vector3d dest)
Transform the vector(x, y, z)
by this matrix and store the result indest
.Vector3d
transform(Vector3d v)
Transform the given vector by this matrix.Vector3d
transform(Vector3dc v, Vector3d dest)
Transform the given vector by this matrix and store the result indest
.Vector3f
transform(Vector3f v)
Transform the given vector by this matrix.Vector3f
transform(Vector3fc v, Vector3f dest)
Transform the given vector by this matrix and store the result indest
.Vector3d
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
.Vector3d
transformTranspose(Vector3d v)
Transform the given vector by the transpose of this matrix.Vector3d
transformTranspose(Vector3dc v, Vector3d dest)
Transform the given vector by the transpose of this matrix and store the result indest
.Matrix3d
transpose(Matrix3d dest)
Transposethis
matrix and store the result indest
.
-
-
-
Method Detail
-
m00
double m00()
Return the value of the matrix element at column 0 and row 0.- Returns:
- the value of the matrix element
-
m01
double m01()
Return the value of the matrix element at column 0 and row 1.- Returns:
- the value of the matrix element
-
m02
double m02()
Return the value of the matrix element at column 0 and row 2.- Returns:
- the value of the matrix element
-
m10
double m10()
Return the value of the matrix element at column 1 and row 0.- Returns:
- the value of the matrix element
-
m11
double m11()
Return the value of the matrix element at column 1 and row 1.- Returns:
- the value of the matrix element
-
m12
double m12()
Return the value of the matrix element at column 1 and row 2.- Returns:
- the value of the matrix element
-
m20
double m20()
Return the value of the matrix element at column 2 and row 0.- Returns:
- the value of the matrix element
-
m21
double m21()
Return the value of the matrix element at column 2 and row 1.- Returns:
- the value of the matrix element
-
m22
double m22()
Return the value of the matrix element at column 2 and row 2.- Returns:
- the value of the matrix element
-
mul
Matrix3d mul(Matrix3dc right, Matrix3d dest)
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!- Parameters:
right
- the right operanddest
- will hold the result- Returns:
- dest
-
mulLocal
Matrix3d mulLocal(Matrix3dc left, Matrix3d dest)
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!- Parameters:
left
- the left operand of the matrix multiplicationdest
- the destination matrix, which will hold the result- Returns:
- dest
-
mul
Matrix3d mul(Matrix3fc right, Matrix3d dest)
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!- Parameters:
right
- the right operanddest
- will hold the result- Returns:
- dest
-
determinant
double determinant()
Return the determinant of this matrix.- Returns:
- the determinant
-
invert
Matrix3d invert(Matrix3d dest)
Invertthis
matrix and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
transpose
Matrix3d transpose(Matrix3d dest)
Transposethis
matrix and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
get
Matrix3d get(Matrix3d dest)
Get the current values ofthis
matrix and store them intodest
.- Parameters:
dest
- the destination matrix- Returns:
- the passed in destination
-
getRotation
AxisAngle4f getRotation(AxisAngle4f dest)
Get the current values ofthis
matrix and store the represented rotation into the givenAxisAngle4f
.- Parameters:
dest
- the destinationAxisAngle4f
- Returns:
- the passed in destination
- See Also:
AxisAngle4f.set(Matrix3dc)
-
getUnnormalizedRotation
Quaternionf getUnnormalizedRotation(Quaternionf dest)
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.
- Parameters:
dest
- the destinationQuaternionf
- Returns:
- the passed in destination
- See Also:
Quaternionf.setFromUnnormalized(Matrix3dc)
-
getNormalizedRotation
Quaternionf getNormalizedRotation(Quaternionf dest)
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.
- Parameters:
dest
- the destinationQuaternionf
- Returns:
- the passed in destination
- See Also:
Quaternionf.setFromNormalized(Matrix3dc)
-
getUnnormalizedRotation
Quaterniond getUnnormalizedRotation(Quaterniond dest)
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.
- Parameters:
dest
- the destinationQuaterniond
- Returns:
- the passed in destination
- See Also:
Quaterniond.setFromUnnormalized(Matrix3dc)
-
getNormalizedRotation
Quaterniond getNormalizedRotation(Quaterniond dest)
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.
- Parameters:
dest
- the destinationQuaterniond
- Returns:
- the passed in destination
- See Also:
Quaterniond.setFromNormalized(Matrix3dc)
-
get
java.nio.DoubleBuffer get(java.nio.DoubleBuffer buffer)
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
get(int, DoubleBuffer)
, taking the absolute position as parameter.- Parameters:
buffer
- will receive the values of this matrix in column-major order at its current position- Returns:
- the passed in buffer
- See Also:
get(int, DoubleBuffer)
-
get
java.nio.DoubleBuffer get(int index, java.nio.DoubleBuffer buffer)
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
.- 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
java.nio.FloatBuffer get(java.nio.FloatBuffer buffer)
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
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.
- Parameters:
buffer
- will receive the values of this matrix in column-major order at its current position- Returns:
- the passed in buffer
- See Also:
get(int, FloatBuffer)
-
get
java.nio.FloatBuffer get(int index, java.nio.FloatBuffer buffer)
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.
- Parameters:
index
- the absolute position into the FloatBufferbuffer
- will receive the values of this matrix in column-major order- Returns:
- the passed in buffer
-
get
java.nio.ByteBuffer get(java.nio.ByteBuffer buffer)
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
get(int, ByteBuffer)
, taking the absolute position as parameter.- Parameters:
buffer
- will receive the values of this matrix in column-major order at its current position- Returns:
- the passed in buffer
- See Also:
get(int, ByteBuffer)
-
get
java.nio.ByteBuffer get(int index, java.nio.ByteBuffer buffer)
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.
- Parameters:
index
- the absolute position into the ByteBufferbuffer
- will receive the values of this matrix in column-major order- Returns:
- the passed in buffer
-
getFloats
java.nio.ByteBuffer getFloats(java.nio.ByteBuffer buffer)
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
getFloats(int, ByteBuffer)
, taking the absolute position as parameter.- Parameters:
buffer
- will receive the elements of this matrix as float values in column-major order at its current position- Returns:
- the passed in buffer
- See Also:
getFloats(int, ByteBuffer)
-
getFloats
java.nio.ByteBuffer getFloats(int index, java.nio.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.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.
- Parameters:
index
- the absolute position into the ByteBufferbuffer
- will receive the elements of this matrix as float values in column-major order- Returns:
- the passed in buffer
-
getTransposed
java.nio.DoubleBuffer getTransposed(java.nio.DoubleBuffer buffer)
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
getTransposed(int, DoubleBuffer)
, taking the absolute position as parameter.- 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(int, DoubleBuffer)
-
getTransposed
java.nio.DoubleBuffer getTransposed(int index, java.nio.DoubleBuffer buffer)
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.
- 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
java.nio.ByteBuffer getTransposed(java.nio.ByteBuffer buffer)
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
getTransposed(int, ByteBuffer)
, taking the absolute position as parameter.- 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(int, ByteBuffer)
-
getTransposed
java.nio.ByteBuffer getTransposed(int index, java.nio.ByteBuffer buffer)
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.
- Parameters:
index
- the absolute position into the ByteBufferbuffer
- will receive the values of this matrix in row-major order- Returns:
- the passed in buffer
-
getTransposed
java.nio.FloatBuffer getTransposed(java.nio.FloatBuffer buffer)
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
getTransposed(int, FloatBuffer)
, taking the absolute position as parameter.- 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(int, FloatBuffer)
-
getTransposed
java.nio.FloatBuffer getTransposed(int index, java.nio.FloatBuffer buffer)
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.
- Parameters:
index
- the absolute position into the FloatBufferbuffer
- will receive the values of this matrix in row-major order- Returns:
- the passed in buffer
-
getTransposedFloats
java.nio.ByteBuffer getTransposedFloats(java.nio.ByteBuffer buffer)
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
getTransposedFloats(int, ByteBuffer)
, taking the absolute position as parameter.- 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(int, ByteBuffer)
-
getTransposedFloats
java.nio.ByteBuffer getTransposedFloats(int index, java.nio.ByteBuffer buffer)
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.
- 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
Matrix3dc getToAddress(long address)
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.
- Parameters:
address
- the off-heap address where to store this matrix- Returns:
- this
-
get
double[] get(double[] arr, int offset)
Store this matrix into the supplied double array in column-major order at the given offset.- Parameters:
arr
- the array to write the matrix values intooffset
- the offset into the array- Returns:
- the passed in array
-
get
double[] get(double[] arr)
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
get(double[], int)
.- Parameters:
arr
- the array to write the matrix values into- Returns:
- the passed in array
- See Also:
get(double[], int)
-
get
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.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.
- Parameters:
arr
- the array to write the matrix values intooffset
- the offset into the array- Returns:
- the passed in array
-
get
float[] get(float[] arr)
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
get(float[], int)
.- Parameters:
arr
- the array to write the matrix values into- Returns:
- the passed in array
- See Also:
get(float[], int)
-
scale
Matrix3d scale(Vector3dc xyz, Matrix3d dest)
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!- Parameters:
xyz
- the factors of the x, y and z component, respectivelydest
- will hold the result- Returns:
- dest
-
scale
Matrix3d scale(double x, double y, double z, Matrix3d dest)
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!- 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
-
scale
Matrix3d scale(double xyz, Matrix3d dest)
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!- Parameters:
xyz
- the factor for all componentsdest
- will hold the result- Returns:
- dest
- See Also:
scale(double, double, double, Matrix3d)
-
scaleLocal
Matrix3d 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
.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 componentdest
- will hold the result- Returns:
- dest
-
transform
Vector3d transform(Vector3d v)
Transform the given vector by this matrix.- Parameters:
v
- the vector to transform- Returns:
- v
-
transform
Vector3d transform(Vector3dc v, Vector3d dest)
Transform the given vector by this matrix and store the result indest
.- Parameters:
v
- the vector to transformdest
- will hold the result- Returns:
- dest
-
transform
Vector3f transform(Vector3f v)
Transform the given vector by this matrix.- Parameters:
v
- the vector to transform- Returns:
- v
-
transform
Vector3f transform(Vector3fc v, Vector3f dest)
Transform the given vector by this matrix and store the result indest
.- Parameters:
v
- the vector to transformdest
- will hold the result- Returns:
- dest
-
transform
Vector3d transform(double x, double y, double z, Vector3d dest)
Transform the vector(x, y, z)
by this matrix and store the result indest
.- 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
-
transformTranspose
Vector3d transformTranspose(Vector3d v)
Transform the given vector by the transpose of this matrix.- Parameters:
v
- the vector to transform- Returns:
- v
-
transformTranspose
Vector3d transformTranspose(Vector3dc v, Vector3d dest)
Transform the given vector by the transpose of this matrix and store the result indest
.- Parameters:
v
- the vector to transformdest
- will hold the result- Returns:
- dest
-
transformTranspose
Vector3d 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
.- 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
-
rotateX
Matrix3d rotateX(double ang, Matrix3d dest)
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
- Parameters:
ang
- the angle in radiansdest
- will hold the result- Returns:
- dest
-
rotateY
Matrix3d rotateY(double ang, Matrix3d dest)
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
- Parameters:
ang
- the angle in radiansdest
- will hold the result- Returns:
- dest
-
rotateZ
Matrix3d rotateZ(double ang, Matrix3d dest)
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
- Parameters:
ang
- the angle in radiansdest
- will hold the result- Returns:
- dest
-
rotateXYZ
Matrix3d rotateXYZ(double angleX, double angleY, double angleZ, Matrix3d dest)
Apply rotation ofangleX
radians about the X axis, followed by a rotation ofangleY
radians about the Y axis and followed by a rotation ofangleZ
radians about the Z axis and store the result indest
.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)
- Parameters:
angleX
- the angle to rotate about XangleY
- the angle to rotate about YangleZ
- the angle to rotate about Zdest
- will hold the result- Returns:
- dest
-
rotateZYX
Matrix3d rotateZYX(double angleZ, double angleY, double angleX, Matrix3d dest)
Apply rotation ofangleZ
radians about the Z axis, followed by a rotation ofangleY
radians about the Y axis and followed by a rotation ofangleX
radians about the X axis and store the result indest
.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)
- Parameters:
angleZ
- the angle to rotate about ZangleY
- the angle to rotate about YangleX
- the angle to rotate about Xdest
- will hold the result- Returns:
- dest
-
rotateYXZ
Matrix3d rotateYXZ(double angleY, double angleX, double angleZ, Matrix3d dest)
Apply rotation ofangleY
radians about the Y axis, followed by a rotation ofangleX
radians about the X axis and followed by a rotation ofangleZ
radians about the Z axis and store the result indest
.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)
- Parameters:
angleY
- the angle to rotate about YangleX
- the angle to rotate about XangleZ
- the angle to rotate about Zdest
- will hold the result- Returns:
- dest
-
rotate
Matrix3d rotate(double ang, double x, double y, double z, Matrix3d dest)
Apply rotation to this matrix by rotating the given amount of radians about the given axis specified as x, y and z components, and store the result indest
.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 axisdest
- will hold the result- Returns:
- dest
-
rotateLocal
Matrix3d 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
.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!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 axisdest
- will hold the result- Returns:
- dest
-
rotateLocalX
Matrix3d 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
.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!Reference: http://en.wikipedia.org
- Parameters:
ang
- the angle in radians to rotate about the X axisdest
- will hold the result- Returns:
- dest
-
rotateLocalY
Matrix3d 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
.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!Reference: http://en.wikipedia.org
- Parameters:
ang
- the angle in radians to rotate about the Y axisdest
- will hold the result- Returns:
- dest
-
rotateLocalZ
Matrix3d 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
.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!Reference: http://en.wikipedia.org
- Parameters:
ang
- the angle in radians to rotate about the Z axisdest
- will hold the result- Returns:
- dest
-
rotateLocal
Matrix3d rotateLocal(Quaterniondc quat, Matrix3d dest)
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!Reference: http://en.wikipedia.org
- Parameters:
quat
- theQuaterniondc
dest
- will hold the result- Returns:
- dest
-
rotateLocal
Matrix3d rotateLocal(Quaternionfc quat, Matrix3d dest)
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!Reference: http://en.wikipedia.org
- Parameters:
quat
- theQuaternionfc
dest
- will hold the result- Returns:
- dest
-
rotate
Matrix3d rotate(Quaterniondc quat, Matrix3d dest)
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!Reference: http://en.wikipedia.org
- Parameters:
quat
- theQuaterniondc
dest
- will hold the result- Returns:
- dest
-
rotate
Matrix3d rotate(Quaternionfc quat, Matrix3d dest)
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!Reference: http://en.wikipedia.org
- Parameters:
quat
- theQuaternionfc
dest
- will hold the result- Returns:
- dest
-
rotate
Matrix3d rotate(AxisAngle4f axisAngle, Matrix3d dest)
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!Reference: http://en.wikipedia.org
- Parameters:
axisAngle
- theAxisAngle4f
(needs to benormalized
)dest
- will hold the result- Returns:
- dest
- See Also:
rotate(double, double, double, double, Matrix3d)
-
rotate
Matrix3d rotate(AxisAngle4d axisAngle, Matrix3d dest)
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!Reference: http://en.wikipedia.org
- Parameters:
axisAngle
- theAxisAngle4d
(needs to benormalized
)dest
- will hold the result- Returns:
- dest
- See Also:
rotate(double, double, double, double, Matrix3d)
-
rotate
Matrix3d rotate(double angle, Vector3dc axis, Matrix3d dest)
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!Reference: http://en.wikipedia.org
- Parameters:
angle
- the angle in radiansaxis
- the rotation axis (needs to benormalized
)dest
- will hold the result- Returns:
- dest
- See Also:
rotate(double, double, double, double, Matrix3d)
-
rotate
Matrix3d rotate(double angle, Vector3fc axis, Matrix3d dest)
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!Reference: http://en.wikipedia.org
- Parameters:
angle
- the angle in radiansaxis
- the rotation axis (needs to benormalized
)dest
- will hold the result- Returns:
- dest
- See Also:
rotate(double, double, double, double, Matrix3d)
-
getRow
Vector3d getRow(int row, Vector3d dest) throws java.lang.IndexOutOfBoundsException
Get the row at the givenrow
index, starting with0
.- Parameters:
row
- the row index in[0..2]
dest
- will hold the row components- Returns:
- the passed in destination
- Throws:
java.lang.IndexOutOfBoundsException
- ifrow
is not in[0..2]
-
getColumn
Vector3d getColumn(int column, Vector3d dest) throws java.lang.IndexOutOfBoundsException
Get the column at the givencolumn
index, starting with0
.- Parameters:
column
- the column index in[0..2]
dest
- will hold the column components- Returns:
- the passed in destination
- Throws:
java.lang.IndexOutOfBoundsException
- ifcolumn
is not in[0..2]
-
get
double get(int column, int row)
Get the matrix element value at the given column and row.- Parameters:
column
- the colum index in[0..2]
row
- the row index in[0..2]
- Returns:
- the element value
-
getRowColumn
double getRowColumn(int row, int column)
Get the matrix element value at the given row and column.- Parameters:
row
- the row index in[0..2]
column
- the colum index in[0..2]
- Returns:
- the element value
-
normal
Matrix3d normal(Matrix3d dest)
Compute a normal matrix fromthis
matrix and store it intodest
.The normal matrix of
m
is the transpose of the inverse ofm
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
cofactor
Matrix3d cofactor(Matrix3d dest)
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.- Parameters:
dest
- will hold the result- Returns:
- dest
-
lookAlong
Matrix3d lookAlong(Vector3dc dir, Vector3dc up, 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!- Parameters:
dir
- the direction in space to look alongup
- the direction of 'up'dest
- will hold the result- Returns:
- dest
- See Also:
lookAlong(double, double, double, double, double, double, Matrix3d)
-
lookAlong
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!- 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
-
getScale
Vector3d getScale(Vector3d dest)
Get the scaling factors ofthis
matrix for the three base axes.- Parameters:
dest
- will hold the scaling factors forx
,y
andz
- Returns:
- dest
-
positiveZ
Vector3d positiveZ(Vector3d dir)
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 usingnormalizedPositiveZ(Vector3d)
instead.Reference: http://www.euclideanspace.com
- Parameters:
dir
- will hold the direction of+Z
- Returns:
- dir
-
normalizedPositiveZ
Vector3d normalizedPositiveZ(Vector3d dir)
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
- Parameters:
dir
- will hold the direction of+Z
- Returns:
- dir
-
positiveX
Vector3d positiveX(Vector3d dir)
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 usingnormalizedPositiveX(Vector3d)
instead.Reference: http://www.euclideanspace.com
- Parameters:
dir
- will hold the direction of+X
- Returns:
- dir
-
normalizedPositiveX
Vector3d normalizedPositiveX(Vector3d dir)
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
- Parameters:
dir
- will hold the direction of+X
- Returns:
- dir
-
positiveY
Vector3d positiveY(Vector3d dir)
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 usingnormalizedPositiveY(Vector3d)
instead.Reference: http://www.euclideanspace.com
- Parameters:
dir
- will hold the direction of+Y
- Returns:
- dir
-
normalizedPositiveY
Vector3d normalizedPositiveY(Vector3d dir)
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
- Parameters:
dir
- will hold the direction of+Y
- Returns:
- dir
-
add
Matrix3d add(Matrix3dc other, Matrix3d dest)
Component-wise addthis
andother
and store the result indest
.- Parameters:
other
- the other addenddest
- will hold the result- Returns:
- dest
-
sub
Matrix3d sub(Matrix3dc subtrahend, Matrix3d dest)
Component-wise subtractsubtrahend
fromthis
and store the result indest
.- Parameters:
subtrahend
- the subtrahenddest
- will hold the result- Returns:
- dest
-
mulComponentWise
Matrix3d mulComponentWise(Matrix3dc other, Matrix3d dest)
Component-wise multiplythis
byother
and store the result indest
.- Parameters:
other
- the other matrixdest
- will hold the result- Returns:
- dest
-
lerp
Matrix3d lerp(Matrix3dc other, double t, Matrix3d dest)
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
.- Parameters:
other
- the other matrixt
- the interpolation factor between 0.0 and 1.0dest
- will hold the result- Returns:
- dest
-
rotateTowards
Matrix3d 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
.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!This method is equivalent to calling:
mul(new Matrix3d().lookAlong(new Vector3d(dir).negate(), up).invert(), dest)
- Parameters:
direction
- the direction to rotate towardsup
- the model's up vectordest
- will hold the result- Returns:
- dest
- See Also:
rotateTowards(double, double, double, double, double, double, Matrix3d)
-
rotateTowards
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!This method is equivalent to calling:
mul(new Matrix3d().lookAlong(-dirX, -dirY, -dirZ, upX, upY, upZ).invert(), dest)
- Parameters:
dirX
- the x-coordinate of the direction to rotate towardsdirY
- the y-coordinate of the direction to rotate towardsdirZ
- the z-coordinate of the direction to rotate towardsupX
- the x-coordinate of the up vectorupY
- the y-coordinate of the up vectorupZ
- the z-coordinate of the up vectordest
- will hold the result- Returns:
- dest
- See Also:
rotateTowards(Vector3dc, Vector3dc, Matrix3d)
-
getEulerAnglesXYZ
Vector3d getEulerAnglesXYZ(Vector3d dest)
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 callingrotateXYZ(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/
- Parameters:
dest
- will hold the extracted Euler angles- Returns:
- dest
-
getEulerAnglesZYX
Vector3d getEulerAnglesZYX(Vector3d dest)
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 callingrotateZYX(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/
- Parameters:
dest
- will hold the extracted Euler angles- Returns:
- dest
-
obliqueZ
Matrix3d obliqueZ(double a, double b, Matrix3d dest)
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
- Parameters:
a
- the value for the z factor that applies to xb
- the value for the z factor that applies to ydest
- will hold the result- Returns:
- dest
-
equals
boolean equals(Matrix3dc m, double delta)
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.- Parameters:
m
- the other matrixdelta
- the allowed maximum difference- Returns:
true
whether all of the matrix elements are equal;false
otherwise
-
reflect
Matrix3d reflect(double nx, double ny, double nz, Matrix3d dest)
Apply a mirror/reflection transformation to this matrix that reflects through the given plane specified via the plane normal(nx, ny, nz)
, and store the result indest
.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 normaldest
- will hold the result- Returns:
- this
-
reflect
Matrix3d 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
.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 orientationdest
- will hold the result- Returns:
- this
-
reflect
Matrix3d reflect(Vector3dc normal, Matrix3d dest)
Apply a mirror/reflection transformation to this matrix that reflects through the given plane specified via the plane normal, and store the result indest
.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 normaldest
- will hold the result- Returns:
- this
-
isFinite
boolean isFinite()
Determine whether all matrix elements are finite floating-point values, that is, they are notNaN
and notinfinity
.- Returns:
true
if all components are finite floating-point values;false
otherwise
-
quadraticFormProduct
double quadraticFormProduct(double x, double y, double z)
Compute(x, y, z)^T * this * (x, y, z)
.- 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
double quadraticFormProduct(Vector3dc v)
Computev^T * this * v
.- Parameters:
v
- the vector to multiply- Returns:
- the result
-
quadraticFormProduct
double quadraticFormProduct(Vector3fc v)
Computev^T * this * v
.- Parameters:
v
- the vector to multiply- Returns:
- the result
-
mapXZY
Matrix3d mapXZY(Matrix3d dest)
Multiplythis
by the matrix1 0 0 0 0 1 0 1 0
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapXZnY
Matrix3d mapXZnY(Matrix3d dest)
Multiplythis
by the matrix1 0 0 0 0 -1 0 1 0
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapXnYnZ
Matrix3d mapXnYnZ(Matrix3d dest)
Multiplythis
by the matrix1 0 0 0 -1 0 0 0 -1
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapXnZY
Matrix3d mapXnZY(Matrix3d dest)
Multiplythis
by the matrix1 0 0 0 0 1 0 -1 0
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapXnZnY
Matrix3d mapXnZnY(Matrix3d dest)
Multiplythis
by the matrix1 0 0 0 0 -1 0 -1 0
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapYXZ
Matrix3d mapYXZ(Matrix3d dest)
Multiplythis
by the matrix0 1 0 1 0 0 0 0 1
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapYXnZ
Matrix3d mapYXnZ(Matrix3d dest)
Multiplythis
by the matrix0 1 0 1 0 0 0 0 -1
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapYZX
Matrix3d mapYZX(Matrix3d dest)
Multiplythis
by the matrix0 0 1 1 0 0 0 1 0
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapYZnX
Matrix3d mapYZnX(Matrix3d dest)
Multiplythis
by the matrix0 0 -1 1 0 0 0 1 0
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapYnXZ
Matrix3d mapYnXZ(Matrix3d dest)
Multiplythis
by the matrix0 -1 0 1 0 0 0 0 1
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapYnXnZ
Matrix3d mapYnXnZ(Matrix3d dest)
Multiplythis
by the matrix0 -1 0 1 0 0 0 0 -1
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapYnZX
Matrix3d mapYnZX(Matrix3d dest)
Multiplythis
by the matrix0 0 1 1 0 0 0 -1 0
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapYnZnX
Matrix3d mapYnZnX(Matrix3d dest)
Multiplythis
by the matrix0 0 -1 1 0 0 0 -1 0
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapZXY
Matrix3d mapZXY(Matrix3d dest)
Multiplythis
by the matrix0 1 0 0 0 1 1 0 0
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapZXnY
Matrix3d mapZXnY(Matrix3d dest)
Multiplythis
by the matrix0 1 0 0 0 -1 1 0 0
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapZYX
Matrix3d mapZYX(Matrix3d dest)
Multiplythis
by the matrix0 0 1 0 1 0 1 0 0
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapZYnX
Matrix3d mapZYnX(Matrix3d dest)
Multiplythis
by the matrix0 0 -1 0 1 0 1 0 0
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapZnXY
Matrix3d mapZnXY(Matrix3d dest)
Multiplythis
by the matrix0 -1 0 0 0 1 1 0 0
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapZnXnY
Matrix3d mapZnXnY(Matrix3d dest)
Multiplythis
by the matrix0 -1 0 0 0 -1 1 0 0
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapZnYX
Matrix3d mapZnYX(Matrix3d dest)
Multiplythis
by the matrix0 0 1 0 -1 0 1 0 0
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapZnYnX
Matrix3d mapZnYnX(Matrix3d dest)
Multiplythis
by the matrix0 0 -1 0 -1 0 1 0 0
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapnXYnZ
Matrix3d mapnXYnZ(Matrix3d dest)
Multiplythis
by the matrix-1 0 0 0 1 0 0 0 -1
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapnXZY
Matrix3d mapnXZY(Matrix3d dest)
Multiplythis
by the matrix-1 0 0 0 0 1 0 1 0
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapnXZnY
Matrix3d mapnXZnY(Matrix3d dest)
Multiplythis
by the matrix-1 0 0 0 0 -1 0 1 0
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapnXnYZ
Matrix3d mapnXnYZ(Matrix3d dest)
Multiplythis
by the matrix-1 0 0 0 -1 0 0 0 1
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapnXnYnZ
Matrix3d mapnXnYnZ(Matrix3d dest)
Multiplythis
by the matrix-1 0 0 0 -1 0 0 0 -1
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapnXnZY
Matrix3d mapnXnZY(Matrix3d dest)
Multiplythis
by the matrix-1 0 0 0 0 1 0 -1 0
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapnXnZnY
Matrix3d mapnXnZnY(Matrix3d dest)
Multiplythis
by the matrix-1 0 0 0 0 -1 0 -1 0
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapnYXZ
Matrix3d mapnYXZ(Matrix3d dest)
Multiplythis
by the matrix0 1 0 -1 0 0 0 0 1
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapnYXnZ
Matrix3d mapnYXnZ(Matrix3d dest)
Multiplythis
by the matrix0 1 0 -1 0 0 0 0 -1
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapnYZX
Matrix3d mapnYZX(Matrix3d dest)
Multiplythis
by the matrix0 0 1 -1 0 0 0 1 0
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapnYZnX
Matrix3d mapnYZnX(Matrix3d dest)
Multiplythis
by the matrix0 0 -1 -1 0 0 0 1 0
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapnYnXZ
Matrix3d mapnYnXZ(Matrix3d dest)
Multiplythis
by the matrix0 -1 0 -1 0 0 0 0 1
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapnYnXnZ
Matrix3d mapnYnXnZ(Matrix3d dest)
Multiplythis
by the matrix0 -1 0 -1 0 0 0 0 -1
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapnYnZX
Matrix3d mapnYnZX(Matrix3d dest)
Multiplythis
by the matrix0 0 1 -1 0 0 0 -1 0
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapnYnZnX
Matrix3d mapnYnZnX(Matrix3d dest)
Multiplythis
by the matrix0 0 -1 -1 0 0 0 -1 0
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapnZXY
Matrix3d mapnZXY(Matrix3d dest)
Multiplythis
by the matrix0 1 0 0 0 1 -1 0 0
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapnZXnY
Matrix3d mapnZXnY(Matrix3d dest)
Multiplythis
by the matrix0 1 0 0 0 -1 -1 0 0
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapnZYX
Matrix3d mapnZYX(Matrix3d dest)
Multiplythis
by the matrix0 0 1 0 1 0 -1 0 0
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapnZYnX
Matrix3d mapnZYnX(Matrix3d dest)
Multiplythis
by the matrix0 0 -1 0 1 0 -1 0 0
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapnZnXY
Matrix3d mapnZnXY(Matrix3d dest)
Multiplythis
by the matrix0 -1 0 0 0 1 -1 0 0
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapnZnXnY
Matrix3d mapnZnXnY(Matrix3d dest)
Multiplythis
by the matrix0 -1 0 0 0 -1 -1 0 0
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapnZnYX
Matrix3d mapnZnYX(Matrix3d dest)
Multiplythis
by the matrix0 0 1 0 -1 0 -1 0 0
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
mapnZnYnX
Matrix3d mapnZnYnX(Matrix3d dest)
Multiplythis
by the matrix0 0 -1 0 -1 0 -1 0 0
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
negateX
Matrix3d negateX(Matrix3d dest)
Multiplythis
by the matrix-1 0 0 0 1 0 0 0 1
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
negateY
Matrix3d negateY(Matrix3d dest)
Multiplythis
by the matrix1 0 0 0 -1 0 0 0 1
and store the result indest
.- Parameters:
dest
- will hold the result- Returns:
- dest
-
-