Interface Matrix4d
- All Known Subinterfaces:
- MMatrix4d
public interface Matrix4d
Read only interface for 4x4 matrices.
- Since:
- 9.10.2
- 
Field SummaryFields
- 
Method SummaryModifier and TypeMethodDescriptionadd(double scalar) Returns a copy of this matrix after adding a scalar to each component of this matrix.Returns a copy of this matrix after calculating the sum of this matrix and the given matrix.static Matrix4dcreate(double[] elements) Constructs a matrix with the given array of 16 elements or 12 elements.static Matrix4dcreate(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 Matrix4dReturns a new matrix with the values of the given matrix.static Matrix4dConstructs a matrix from the given vectors and the translation vector.doublegetM00()Returns the first element of the first row in the matrix.doublegetM01()Returns the second element of the first row in the matrix.doublegetM02()Returns the third element of the first row in the matrix.doublegetM03()Returns the fourth element of the first row in the matrix.doublegetM10()Returns the first element of the second row in the matrix.doublegetM11()Returns the second element of the second row in the matrix.doublegetM12()Returns the third element of the second row in the matrix.doublegetM13()Returns the fourth element of the second row in the matrix.doublegetM20()Returns the first element of the third row in the matrix.doublegetM21()Returns the second element of the third row in the matrix.doublegetM22()Returns the third element of the third row in the matrix.doublegetM23()Returns the fourth element of the third row in the matrix.doublegetM30()Returns the first element of the fourth row in the matrix.doublegetM31()Returns the second element of the fourth row in the matrix.doublegetM32()Returns the third element of the fourth row in the matrix.doublegetM33()Returns the fourth element of the fourth row in the matrix.Returns the translation component of this matrix.booleanReturns true if this matrix is an identity matrix.Returns a copy of this matrix after calculating the product of this matrix and the given matrix.static MMatrix4dReturns the product of the two inputed matrixes.Returns a copy of this matrix after calculating the difference between this matrix and the given matrix.Returns a copy of the given vector transformed by this matrix.transform(Collection<? extends Vector3d> points) Transforms the points with the transformation matrix.transformNormal(Vector3d normal) Transforms the normal of this matrix by getting the normals of the inputed parameter.
- 
Field Details- 
IDENTITYReturns a new identity matrix.- Since:
- 9.10.2
 
 
- 
- 
Method Details- 
createstatic Matrix4d 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. The first four elements are the first row of the matrix. The second four elements are the second row of the matrix. The third four elements are the third row of the matrix. The fourth four elements are the fourth row of the matrix.- Parameters:
- m00- first element in first row
- m01- second element in first row
- m02- third element in first row
- m03- fourth element in first row
- m10- first element in second row
- m11- second element in second row
- m12- third element in second row
- m13- fourth element in second row
- m20- first element in third row
- m21- second element in third row
- m22- third element in third row
- m23- fourth element in third row
- m30- first element in fourth row
- m31- second element in fourth row
- m32- third element in fourth row
- m33- fourth element in fourth row
- Returns:
- a new matrix with the given 16 elements
- Since:
- 9.10.2
 
- 
createReturns a new matrix with the values of the given matrix.- Parameters:
- matrix- the matrix that is given to create another matrix
- Returns:
- a new matrix with the values of the given matrix
- Since:
- 9.10.2
 
- 
createConstructs a matrix from the given vectors and the translation vector.- Parameters:
- x- the x vector
- y- the y vector
- z- the z vector
- translation- the translation vector
- Returns:
- a new matrix constructed from the given vectors and the translation vector
- Since:
- 9.10.2
 
- 
createConstructs a matrix with the given array of 16 elements or 12 elements. The first four elements are the first row of the matrix. The second four elements are the second row of the matrix. The third four elements are the third row of the matrix. The fourth four elements, if present, are the fourth row of the matrix, and if not present they are set to (0, 0, 0, 1). Example: M00 = elements[0], M01 = elements[1] etc...- Parameters:
- elements- the elements array
- Returns:
- returns a new matrix with the contents from elements
- Throws:
- IllegalArgumentException- if the given array does not contain 12 or 16 elements
- Since:
- 9.10.2
 
- 
getM00double getM00()Returns the first element of the first row in the matrix.- Returns:
- first element of first row
- Since:
- 9.10.2
 
- 
getM01double getM01()Returns the second element of the first row in the matrix.- Returns:
- second element of first row
- Since:
- 9.10.2
 
- 
getM02double getM02()Returns the third element of the first row in the matrix.- Returns:
- third element of first row
- Since:
- 9.10.2
 
- 
getM03double getM03()Returns the fourth element of the first row in the matrix.- Returns:
- fourth element of first row
- Since:
- 9.10.2
 
- 
getM10double getM10()Returns the first element of the second row in the matrix.- Returns:
- first element of second row
- Since:
- 9.10.2
 
- 
getM11double getM11()Returns the second element of the second row in the matrix.- Returns:
- second element of second row
- Since:
- 9.10.2
 
- 
getM12double getM12()Returns the third element of the second row in the matrix.- Returns:
- third element of second row
- Since:
- 9.10.2
 
- 
getM13double getM13()Returns the fourth element of the second row in the matrix.- Returns:
- fourth element of second row.
- Since:
- 9.10.2
 
- 
getM20double getM20()Returns the first element of the third row in the matrix.- Returns:
- first element of third row
- Since:
- 9.10.2
 
- 
getM21double getM21()Returns the second element of the third row in the matrix.- Returns:
- second element of third row
- Since:
- 9.10.2
 
- 
getM22double getM22()Returns the third element of the third row in the matrix.- Returns:
- third element of third row
- Since:
- 9.10.2
 
- 
getM23double getM23()Returns the fourth element of the third row in the matrix.- Returns:
- fourth element of third row
- Since:
- 9.10.2
 
- 
getM30double getM30()Returns the first element of the fourth row in the matrix.- Returns:
- first element of fourth row
- Since:
- 9.10.2
 
- 
getM31double getM31()Returns the second element of the fourth row in the matrix.- Returns:
- second element of fourth row
- Since:
- 9.10.2
 
- 
getM32double getM32()Returns the third element of the fourth row in the matrix.- Returns:
- third element of fourth row
- Since:
- 9.10.2
 
- 
getM33double getM33()Returns the fourth element of the fourth row in the matrix.- Returns:
- fourth element of fourth row
- Since:
- 9.10.2
 
- 
getTranslationMVector3d getTranslation()Returns the translation component of this matrix.- Returns:
- the translation
- Since:
- 9.10.2
 
- 
transformReturns a copy of the given vector transformed by this matrix.- Parameters:
- vector- vector that is inputed to transform this vector
- Returns:
- returns a transformed 3D vector
- Since:
- 9.10.2
 
- 
transformNormalTransforms the normal of this matrix by getting the normals of the inputed parameter.- Parameters:
- normal- the input normal to be transformed
- Returns:
- returns a copy of the given vector transformed by this matrix
- Since:
- 9.10.2
 
- 
isIdentityMatrixboolean isIdentityMatrix()Returns true if this matrix is an identity matrix.- Returns:
- returns true if this matrix is an identity matrix
- Since:
- 9.10.2
 
- 
transformTransforms the points with the transformation matrix.- Parameters:
- points- the collection of points to be transformed
- Returns:
- returns a collection of transformed vector points
- Since:
- 9.10.2
 
- 
productOfReturns the product of the two inputed matrixes.- Parameters:
- matrix1- matrix on the left side of the multiplication
- matrix2- matrix on the right side of the multiplication
- Returns:
- the product of the given matrices
 
- 
addReturns a copy of this matrix after adding a scalar to each component of this matrix.- Parameters:
- scalar- the scalar that is added to each component of this matrix
- Returns:
- a copy of this matrix after adding a scalar to each component of this matrix
- Since:
- 9.10.2
 
- 
addReturns a copy of this matrix after calculating the sum of this matrix and the given matrix.- Parameters:
- matrix- the matrix that is added to this matrix
- Returns:
- a copy of this matrix after calculating the sum of this matrix and the given matrix. and the given matrix.
- Since:
- 9.10.2
 
- 
multiplyReturns a copy of this matrix after calculating the product of this matrix and the given matrix.- Parameters:
- matrix- the matrix by which this matrix is multiplied
- Returns:
- a copy of this matrix after calculating the product of this matrix and the given matrix.
- Since:
- 9.10.2
 
- 
subtractReturns a copy of this matrix after calculating the difference between this matrix and the given matrix.- Parameters:
- matrix- the matrix on the right side of the difference
- Returns:
- a copy of this matrix after calculating the difference between this matrix and the given matrix.
- Since:
- 9.10.2
 
 
-