Interface RMat44Arg
- All Superinterfaces:
Comparable<JoltPhysicsObject>
,ConstJoltPhysicsObject
- All Known Implementing Classes:
RMat44
Read-only access to an
RMat44
. (native type: const RMat44)-
Method Summary
Modifier and TypeMethodDescriptiongetAxisX()
Copy the first column to aVec3
.getAxisY()
Copy the 2nd column to aVec3
.getAxisZ()
Copy the 3rd column to aVec3
.Copy the diagonal elements to aVec3
.double
getElement
(int row, int column) Return the specified element in double precision.Convert the rotation to aQuat
.Copy the translation component.inversed()
Return the inverse of the current matrix, which is unaffected.Return the inverse of the current matrix, assuming the current matrix consists entirely of rotation and translation.boolean
Test whether the current matrix is equal to the argument.boolean
Test whether the current matrix is an identity matrix.Multiply the current matrix by the specified single-precision matrix.Multiply the current matrix by the argument.multiply3x3
(Vec3Arg vec3Arg) Multiply the 3x3 matrix by the specified column vector.multiply3x3Transposed
(Vec3Arg rightVector) Multiply the transpose of the 3x3 matrix by the specified column vector.multiply3x4
(RVec3Arg rightVector) Multiply the 3x4 matrix by the specified column vector, with the 4th component of the right factor implied to be one.multiply3x4
(Vec3Arg vec3) Multiply the 3x4 matrix by the specified column vector, with the 4th component of the right factor implied to be one.postTranslated
(RVec3Arg leftVector) Post multiply by the specified translation vector.postTranslated
(Vec3Arg vec3) Post multiply by the specified translation vector.void
put3x3ColumnMajor
(FloatBuffer storeBuffer) Write the 3x3 matrix in single precision to the specified buffer in column-major order and advance the buffer's position by 9.void
putColumnMajor
(FloatBuffer storeBuffer) Write all 16 components in single precision to the specified buffer in column-major order and advance the buffer's position by 16.toMat44()
Copy the current matrix to a new, single-precision matrix.Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVa
-
Method Details
-
getAxisX
Vec3 getAxisX()Copy the first column to aVec3
. The matrix is unaffected.- Returns:
- a new vector
-
getAxisY
Vec3 getAxisY()Copy the 2nd column to aVec3
. The matrix is unaffected.- Returns:
- a new vector
-
getAxisZ
Vec3 getAxisZ()Copy the 3rd column to aVec3
. The matrix is unaffected.- Returns:
- a new vector
-
getDiagonal3
Vec3 getDiagonal3()Copy the diagonal elements to aVec3
. The matrix is unaffected.- Returns:
- a new vector
-
getElement
double getElement(int row, int column) Return the specified element in double precision. The matrix is unaffected.- Parameters:
row
- the zero-origin index of the row (≥0, <4)column
- the zero-origin index of the column (≥0, <4)- Returns:
- the element's value
-
getQuaternion
Quat getQuaternion()Convert the rotation to aQuat
. The matrix is unaffected.- Returns:
- a new rotation quaternion
-
getTranslation
RVec3 getTranslation()Copy the translation component. The matrix is unaffected.- Returns:
- a new vector
-
inversed
RMat44 inversed()Return the inverse of the current matrix, which is unaffected.- Returns:
- a new matrix
-
inversedRotationTranslation
RMat44 inversedRotationTranslation()Return the inverse of the current matrix, assuming the current matrix consists entirely of rotation and translation. The current matrix is unaffected.- Returns:
- a new matrix
-
isEqual
Test whether the current matrix is equal to the argument. The current matrix is unaffected.- Parameters:
m2
- the 2nd matrix to test (not null, unaffected)- Returns:
true
if equal,false
if unequal
-
isIdentity
boolean isIdentity()Test whether the current matrix is an identity matrix. The matrix is unaffected.- Returns:
true
if exactly equal, otherwisefalse
-
multiply
Multiply the current matrix by the specified single-precision matrix. The current matrix is unaffected.- Parameters:
right
- the right factor (not null, unaffected)- Returns:
- a new matrix
-
multiply
Multiply the current matrix by the argument. The current matrix is unaffected.- Parameters:
right
- the right factor (not null, unaffected)- Returns:
- a new matrix
-
multiply3x3
Multiply the 3x3 matrix by the specified column vector. The matrix is unaffected.- Parameters:
vec3Arg
- the right factor (not null, unaffected)- Returns:
- a new vector
-
multiply3x3Transposed
Multiply the transpose of the 3x3 matrix by the specified column vector. The matrix is unaffected.- Parameters:
rightVector
- the right factor (not null, unaffected)- Returns:
- a new vector
-
multiply3x4
Multiply the 3x4 matrix by the specified column vector, with the 4th component of the right factor implied to be one. The matrix is unaffected.- Parameters:
rightVector
- the right factor (not null, unaffected)- Returns:
- a new vector
-
multiply3x4
Multiply the 3x4 matrix by the specified column vector, with the 4th component of the right factor implied to be one. The matrix is unaffected.- Parameters:
vec3
- the right factor (not null, unaffected)- Returns:
- a new vector
-
postTranslated
Post multiply by the specified translation vector. The current matrix is unaffected.- Parameters:
leftVector
- the left factor (not null, unaffected)- Returns:
- a new matrix
-
postTranslated
Post multiply by the specified translation vector. The current matrix is unaffected.- Parameters:
vec3
- the left factor (not null, unaffected)- Returns:
- a new matrix
-
put3x3ColumnMajor
Write the 3x3 matrix in single precision to the specified buffer in column-major order and advance the buffer's position by 9. The matrix is unaffected.- Parameters:
storeBuffer
- the destination buffer (not null)
-
putColumnMajor
Write all 16 components in single precision to the specified buffer in column-major order and advance the buffer's position by 16. The matrix is unaffected.- Parameters:
storeBuffer
- the destination buffer (not null)
-
toMat44
Mat44 toMat44()Copy the current matrix to a new, single-precision matrix. The current matrix is unaffected.- Returns:
- the new matrix
-