Modifier and Type | Method and Description |
---|---|
void |
addInPlace(double scalar)
Adds a scalar to each component of this matrix.
|
void |
addInPlace(Matrix4d matrix)
Sets the value of this matrix to sum of itself and the given matrix.
|
static MMatrix4d |
create()
Returns a new identity matrix.
|
static MMatrix4d |
create(double[] elements)
Constructs a matrix with the given array of 16 elements or 12 elements.
|
static MMatrix4d |
create(double m00,
double m01,
double m02,
double m03,
double m10,
double m11,
double m12,
double m13,
double m20,
double m21,
double m22,
double m23,
double m30,
double m31,
double m32,
double m33)
Constructs a matrix with the given 16 elements.
|
static MMatrix4d |
create(Matrix4d matrix)
Returns a new matrix with the values of the given matrix.
|
void |
invert()
Inverts this matrix in place.
|
void |
multiplyInPlace(Matrix4d matrix)
Sets the value of this matrix to the result of multiplying itself with
the given matrix.
|
void |
normalize()
Normalizes the axis of the matrix.
|
void |
set(Matrix4d matrix)
Sets the values of this matrix to the values of the given matrix.
|
void |
setByDoubleArray(double[] numbers)
Sets the matrix values to the values given in the numbers array.
|
void |
setColumn(int column,
double firstRow,
double secondRow,
double thirdRow,
double fourthRow)
Sets the specified column of this matrix to the four values provided.
|
void |
setColumn(int column,
Vector3d vector)
Sets the specified column with the x,y,z values received from the vector.
|
void |
setEuler(Vector3d euler)
Sets the rotational component (upper 3x3) of this transform to the
rotation matrix converted from the Euler angles provided; the other
non-rotational elements are set as if this were an identity matrix.
|
void |
setIdentity()
Sets this matrix to an identity matrix.
|
void |
setM00(double m00)
Set the first element of the first row in the matrix.
|
void |
setM01(double m01)
Set the second element of the first row in the matrix.
|
void |
setM02(double m02)
Set the third element of the first row in the matrix.
|
void |
setM03(double m03)
Set the fourth element of the first row in the matrix.
|
void |
setM10(double m10)
Sets the first value of the second row in the matrix.
|
void |
setM11(double m11)
Sets the second value of the second row in the matrix.
|
void |
setM12(double m12)
Sets the third value of the second row in the matrix.
|
void |
setM13(double m13)
Sets the fourth value of the second row in the matrix.
|
void |
setM20(double m20)
Sets the first value of the third row in the matrix.
|
void |
setM21(double m21)
Sets the second value of the third row in the matrix.
|
void |
setM22(double m22)
Sets the third value of the third row in the matrix.
|
void |
setM23(double m23)
Sets the fourth value of the third row in the matrix.
|
void |
setM30(double m30)
Sets the first value of the fourth row in the matrix.
|
void |
setM31(double m31)
Sets the second value of the fourth row in the matrix.
|
void |
setM32(double m32)
Sets the third value of the fourth row in the matrix.
|
void |
setM33(double m33)
Sets the fourth value of the fourth row in the matrix.
|
void |
setRotation(Vector3d x,
Vector3d y,
Vector3d z)
Sets the rotation (and scaling) based on the vectors given.
|
void |
setRotationX(double angle)
Sets the rotation about the X axis of this matrix.
|
void |
setRotationY(double angle)
Sets the rotation about the Y axis of this matrix.
|
void |
setRotationZ(double angle)
Sets the rotation about the Z axis of this matrix.
|
void |
setScale(double scale)
Sets the scale component of the current matrix by factoring out the
current scale (by doing an SVD) from the rotational component and
multiplying by the new scale.
|
void |
setTranslation(Vector3d translationComponent)
Sets the translation component of this matrix based on a vector.
|
void |
subtractInPlace(Matrix4d matrix)
Sets the value of this matrix to the matrix difference of itself and the
given matrix.
|
void |
transpose()
Transposes this matrix.
|
add, add, create, getM00, getM01, getM02, getM03, getM10, getM11, getM12, getM13, getM20, getM21, getM22, getM23, getM30, getM31, getM32, getM33, getTranslation, isIdentityMatrix, multiply, productOf, subtract, transform, transform, transformNormal
static MMatrix4d create()
static MMatrix4d create(Matrix4d matrix)
static MMatrix4d create(double[] elements)
create
in interface Matrix4d
elements
- the elements arrayIllegalArgumentException
- if the given array does not contain 12 or 16 elementsstatic MMatrix4d create(double m00, double m01, double m02, double m03, double m10, double m11, double m12, double m13, double m20, double m21, double m22, double m23, double m30, double m31, double m32, double m33)
create
in interface Matrix4d
m00
- first element in first rowm01
- second element in first rowm02
- third element in first rowm03
- fourth element in first rowm10
- first element in second rowm11
- second element in second rowm12
- third element in second rowm13
- fourth element in second rowm20
- first element in third rowm21
- second element in third rowm22
- third element in third rowm23
- fourth element in third rowm30
- first element in fourth rowm31
- second element in fourth rowm32
- third element in fourth rowm33
- fourth element in fourth rowvoid addInPlace(double scalar)
scalar
- the scalar that is added to each componentvoid addInPlace(Matrix4d matrix)
matrix
- the matrix which is added to thisvoid subtractInPlace(Matrix4d matrix)
matrix
- the matrix by which this is subtractedvoid invert()
void transpose()
void multiplyInPlace(Matrix4d matrix)
matrix
- the matrix by which this is multipliedvoid setRotationX(double angle)
angle
- the angle to rotate on the X axis in radiansvoid setRotationY(double angle)
angle
- the angle to rotate on the Y axis in radiansvoid setRotationZ(double angle)
angle
- the angle to rotate on the Z axis in radiansvoid set(Matrix4d matrix)
matrix
- the matrix from which values are copied to thisvoid setColumn(int column, Vector3d vector)
column
- the index of the columnvector
- the vector that is set to the columnvoid setColumn(int column, double firstRow, double secondRow, double thirdRow, double fourthRow)
column
- index of the columnfirstRow
- first row elementsecondRow
- second row elementthirdRow
- third row elementfourthRow
- fourth row elementvoid setIdentity()
void setM00(double m00)
m00
- value that is setvoid setM01(double m01)
m01
- value that is setvoid setM02(double m02)
m02
- the value that is setvoid setM03(double m03)
m03
- value that is setvoid setM10(double m10)
m10
- value that is setvoid setM11(double m11)
m11
- value that is setvoid setM12(double m12)
m12
- value that is setvoid setM13(double m13)
m13
- value that is setvoid setM20(double m20)
m20
- value that is setvoid setM21(double m21)
m21
- value that is setvoid setM22(double m22)
m22
- value that is setvoid setM23(double m23)
m23
- value that is setvoid setM30(double m30)
m30
- value that is setvoid setM31(double m31)
m31
- value that is setvoid setM32(double m32)
m32
- value that is setvoid setM33(double m33)
m33
- value that is setvoid setTranslation(Vector3d translationComponent)
translationComponent
- the positionvoid setRotation(Vector3d x, Vector3d y, Vector3d z)
x
- The first three cells of the first column of this matrixy
- The first three cells of the second column of this matrixz
- The first three cells of the third column of this matrixvoid setScale(double scale)
scale
- scaling factorvoid setByDoubleArray(double[] numbers)
numbers
- the elements of the matrixIllegalArgumentException
- if another size besides 12 or 16 is
givenvoid setEuler(Vector3d euler)
euler
- the Vector3d consisting of three rotation angles about X,Y,Zvoid normalize()
Copyright © 2019 Solibri, Inc.. All rights reserved.