| Modifier and Type | Field and Description |
|---|---|
| private static final double | |
| public float | m00
The first matrix element in the first row. |
| public float | m01
The second matrix element in the first row. |
| public float | m02
The third matrix element in the first row. |
| public float | m10
The first matrix element in the second row. |
| public float | m11
The second matrix element in the second row. |
| public float | m12
The third matrix element in the second row. |
| public float | m20
The first matrix element in the third row. |
| public float | m21
The second matrix element in the third row. |
| public float | m22
The third matrix element in the third row. |
| pack-priv static final long |
| Access | Constructor and Description |
|---|---|
| public | Matrix3f(float
the [0][0] element m00, float the [0][1] element m01, float the [0][2] element m02, float the [1][0] element m10, float the [1][1] element m11, float the [1][2] element m12, float the [2][0] element m20, float the [2][1] element m21, float the [2][2] element m22)Constructs and initializes a Matrix3f from the specified nine values. |
| public | Matrix3f(float[]
the array of length 9 containing in order v)Constructs and initializes a Matrix3f from the specified nine-element array. |
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public Object | Returns: a clone of this instance.Overrides java. |
| public final float | |
| public boolean | epsilonEquals(Matrix3f
the matrix to be compared to this matrix m1, float the threshold value epsilon)Returns true if the L-infinite distance between this matrix and matrix m1 is less than or equal to the epsilon parameter, otherwise returns false. |
| public boolean | |
| public boolean | Returns: true or falsethe object with which the comparison is made o1)Overrides java. |
| public final void | |
| public final void | getColumn(int
the matrix column column, float[] the array into which the matrix row values will be copied v)Copies the matrix values in the specified column into the array parameter. |
| public final float | Returns: the value at the indexed element.the row number to be retrieved (zero indexed) row, int the column number to be retrieved (zero indexed) column)Retrieves the value at the specified row and column of this matrix. |
| public final float | |
| public final float | |
| public final float | |
| public final float | |
| public final float | |
| public final float | |
| public final float | |
| public final float | |
| public final float | |
| public final void | |
| public final void | getRow(int
the matrix row row, float[] the array into which the matrix row values will be copied v)Copies the matrix values in the specified row into the array parameter. |
| public final float | Returns: the scale factor of this matrixPerforms an SVD normalization of this matrix to calculate and return the uniform scale factor. |
| pack-priv void | |
| public int | Returns: the integer hash code valueOverrides java. |
| public final void | |
| public final void | |
| private final void | |
| pack-priv static void | luBacksubstitution(double[] matrix1, int[] row_perm, double[] matrix2)
Solves a set of linear equations. |
| pack-priv static boolean | Returns: true if the matrix is nonsingular, or false otherwise.Given a 3x3 array "matrix0", this function replaces it with the LU decomposition of a row-wise permutation of itself. |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | mulNormalize(Matrix3f
the matrix on the right hand side of the multiplication m1)Multiplies this matrix by matrix m1, does an SVD normalization of the result, and places the result back into this matrix. |
| public final void | mulNormalize(Matrix3f
the matrix on the left hand side of the multiplication m1, Matrix3f the matrix on the right hand side of the multiplication m2)Multiplies matrix m1 by matrix m2, does an SVD normalization of the result, and places the result into this matrix. |
| public final void | mulTransposeBoth(Matrix3f
the matrix on the left hand side of the multiplication m1, Matrix3f the matrix on the right hand side of the multiplication m2)Multiplies the transpose of matrix m1 times the transpose of matrix m2, and places the result into this. |
| public final void | mulTransposeLeft(Matrix3f
the matrix on the left hand side of the multiplication m1, Matrix3f the matrix on the right hand side of the multiplication m2)Multiplies the transpose of matrix m1 times matrix m2, and places the result into this. |
| public final void | mulTransposeRight(Matrix3f
the matrix on the left hand side of the multiplication m1, Matrix3f the matrix on the right hand side of the multiplication m2)Multiplies matrix m1 times the transpose of matrix m2, and places the result into this. |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | normalizeCP(Matrix3f
Provides the matrix values to be normalized m1)Perform cross product normalization of matrix m1 and place the normalized values into this. |
| public final void | rotX(float
the angle to rotate about the X axis in radians angle)Sets the value of this matrix to a counter clockwise rotation about the x axis. |
| public final void | rotY(float
the angle to rotate about the Y axis in radians angle)Sets the value of this matrix to a counter clockwise rotation about the y axis. |
| public final void | rotZ(float
the angle to rotate about the Z axis in radians angle)Sets the value of this matrix to a counter clockwise rotation about the z axis. |
| public final void | |
| public final void | set(AxisAngle4f
the axis and angle to be converted a1)Sets the value of this matrix to the matrix conversion of the (single precision) axis and angle argument. |
| public final void | set(AxisAngle4d
the axis and angle to be converted a1)Sets the value of this matrix to the matrix conversion of the (double precision) axis and angle argument. |
| public final void | |
| public final void | set(float[]
the single precision array of length 9 m)Sets the values in this Matrix3f equal to the row-major array parameter (ie, the first three elements of the array will be copied into the first row of this matrix, etc.). |
| public final void | |
| public final void | |
| public final void | set(float
the scale factor for the matrix scale)Sets the value of this matrix to a scale matrix with the passed scale amount. |
| public final void | setColumn(int
the column number to be modified (zero indexed) column, float the first row element x, float the second row element y, float the third row element z)Sets the specified column of this matrix3f to the three values provided. |
| public final void | |
| public final void | setColumn(int
the column number to be modified (zero indexed) column, float[] the replacement column v)Sets the specified column of this matrix3f to the three values provided. |
| public final void | setElement(int
the row number to be modified (zero indexed) row, int the column number to be modified (zero indexed) column, float the new value value)Sets the specified element of this matrix3f to the value provided. |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | setRow(int
the row number to be modified (zero indexed) row, float the first column element x, float the second column element y, float the third column element z)Sets the specified row of this matrix3f to the three values provided. |
| public final void | |
| public final void | setRow(int
the row number to be modified (zero indexed) row, float[] the replacement row v)Sets the specified row of this matrix3f to the three values provided. |
| public final void | setScale(float
the new scale amount scale)Sets the scale component of the current matrix by factoring out the current scale (by doing an SVD) and multiplying by the new scale. |
| public final void | |
| public final void | |
| public final void | |
| public String | Returns: the String representationOverrides java. |
| public final void | |
| public final void | |
| public final void | |
| public final void |
| EPS | back to summary |
|---|---|
| private static final double EPS | |
| m00 | back to summary |
|---|---|
| public float m00 The first matrix element in the first row. | |
| m01 | back to summary |
|---|---|
| public float m01 The second matrix element in the first row. | |
| m02 | back to summary |
|---|---|
| public float m02 The third matrix element in the first row. | |
| m10 | back to summary |
|---|---|
| public float m10 The first matrix element in the second row. | |
| m11 | back to summary |
|---|---|
| public float m11 The second matrix element in the second row. | |
| m12 | back to summary |
|---|---|
| public float m12 The third matrix element in the second row. | |
| m20 | back to summary |
|---|---|
| public float m20 The first matrix element in the third row. | |
| m21 | back to summary |
|---|---|
| public float m21 The second matrix element in the third row. | |
| m22 | back to summary |
|---|---|
| public float m22 The third matrix element in the third row. | |
| serialVersionUID | back to summary |
|---|---|
| pack-priv static final long serialVersionUID | |
| Matrix3f | back to summary |
|---|---|
| public Matrix3f(float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22) Constructs and initializes a Matrix3f from the specified nine values.
| |
| Matrix3f | back to summary |
|---|---|
| public Matrix3f(float[] v) Constructs and initializes a Matrix3f from the specified nine-element array. this.m00 =v[0], this.m01=v[1], etc.
| |
| Matrix3f | back to summary |
|---|---|
| public Matrix3f(Matrix3d m1) Constructs a new matrix with the same values as the Matrix3d parameter.
| |
| Matrix3f | back to summary |
|---|---|
| public Matrix3f(Matrix3f m1) Constructs a new matrix with the same values as the Matrix3f parameter.
| |
| Matrix3f | back to summary |
|---|---|
| public Matrix3f() Constructs and initializes a Matrix3f to all zeros. | |
| add | back to summary |
|---|---|
| public final void add(float scalar) Adds a scalar to each component of this matrix.
| |
| add | back to summary |
|---|---|
| public final void add(float scalar, Matrix3f m1) Adds a scalar to each component of the matrix m1 and places the result into this. Matrix m1 is not modified.
| |
| add | back to summary |
|---|---|
| public final void add(Matrix3f m1, Matrix3f m2) Sets the value of this matrix to the matrix sum of matrices m1 and m2. | |
| add | back to summary |
|---|---|
| public final void add(Matrix3f m1) Sets the value of this matrix to the matrix sum of itself and matrix m1.
| |
| clone | back to summary |
|---|---|
| public Object clone() Overrides java. Creates a new object of the same class as this object.
| |
| determinant | back to summary |
|---|---|
| public final float determinant() Computes the determinant of this matrix.
| |
| epsilonEquals | back to summary |
|---|---|
| public boolean epsilonEquals(Matrix3f m1, float epsilon) Returns true if the L-infinite distance between this matrix and matrix m1 is less than or equal to the epsilon parameter, otherwise returns false. The L-infinite distance is equal to MAX[i=0,1,2 ; j=0,1,2 ; abs(this.m(i,j) - m1.m(i,j)]
| |
| equals | back to summary |
|---|---|
| public boolean equals(Matrix3f m1) Returns true if all of the data members of Matrix3f m1 are equal to the corresponding data members in this Matrix3f.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object o1) Overrides java. Returns true if the Object o1 is of type Matrix3f and all of the data members of o1 are equal to the corresponding data members in this Matrix3f.
| |
| getColumn | back to summary |
|---|---|
| public final void getColumn(int column, Vector3f v) Copies the matrix values in the specified column into the vector parameter.
| |
| getColumn | back to summary |
|---|---|
| public final void getColumn(int column, float[] v) Copies the matrix values in the specified column into the array parameter.
| |
| getElement | back to summary |
|---|---|
| public final float getElement(int row, int column) Retrieves the value at the specified row and column of this matrix.
| |
| getM00 | back to summary |
|---|---|
| public final float getM00() Get the first matrix element in the first row.
| |
| getM01 | back to summary |
|---|---|
| public final float getM01() Get the second matrix element in the first row.
| |
| getM02 | back to summary |
|---|---|
| public final float getM02() Get the third matrix element in the first row.
| |
| getM10 | back to summary |
|---|---|
| public final float getM10() Get first matrix element in the second row.
| |
| getM11 | back to summary |
|---|---|
| public final float getM11() Get second matrix element in the second row.
| |
| getM12 | back to summary |
|---|---|
| public final float getM12() Get the third matrix element in the second row.
| |
| getM20 | back to summary |
|---|---|
| public final float getM20() Get the first matrix element in the third row.
| |
| getM21 | back to summary |
|---|---|
| public final float getM21() Get the second matrix element in the third row.
| |
| getM22 | back to summary |
|---|---|
| public final float getM22() Get the third matrix element in the third row .
| |
| getRow | back to summary |
|---|---|
| public final void getRow(int row, Vector3f v) Copies the matrix values in the specified row into the vector parameter.
| |
| getRow | back to summary |
|---|---|
| public final void getRow(int row, float[] v) Copies the matrix values in the specified row into the array parameter.
| |
| getScale | back to summary |
|---|---|
| public final float getScale() Performs an SVD normalization of this matrix to calculate and return the uniform scale factor. If the matrix has non-uniform scale factors, the largest of the x, y, and z scale factors will be returned. This matrix is not modified.
| |
| getScaleRotate | back to summary |
|---|---|
| pack-priv void getScaleRotate(double[] scales, double[] rot) perform SVD (if necessary to get rotational component | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Returns a hash code value based on the data values in this object. Two different Matrix3f objects with identical data values (i.e., Matrix3f.equals returns true) will return the same hash code value. Two objects with different data members may return the same hash value, although this is not likely.
| |
| invert | back to summary |
|---|---|
| public final void invert(Matrix3f m1) Sets the value of this matrix to the matrix inverse of the passed matrix m1.
| |
| invert | back to summary |
|---|---|
| public final void invert() Inverts this matrix in place. | |
| invertGeneral | back to summary |
|---|---|
| private final void invertGeneral(Matrix3f m1) General invert routine. Inverts m1 and places the result in "this". Note that this routine handles both the "this" version and the non-"this" version. Also note that since this routine is slow anyway, we won't worry about allocating a little bit of garbage. | |
| luBacksubstitution | back to summary |
|---|---|
| pack-priv static void luBacksubstitution(double[] matrix1, int[] row_perm, double[] matrix2) Solves a set of linear equations. The input parameters "matrix1", and "row_perm" come from luDecompostionD3x3 and do not change here. The parameter "matrix2" is a set of column vectors assembled into a 3x3 matrix of floating-point values. The procedure takes each column of "matrix2" in turn and treats it as the right-hand side of the matrix equation Ax = LUx = b. The solution vector replaces the original column of the matrix. If "matrix2" is the identity matrix, the procedure replaces its contents with the inverse of the matrix from which "matrix1" was originally derived. | |
| luDecomposition | back to summary |
|---|---|
| pack-priv static boolean luDecomposition(double[] matrix0, int[] row_perm) Given a 3x3 array "matrix0", this function replaces it with the LU decomposition of a row-wise permutation of itself. The input parameters are "matrix0" and "dimen". The array "matrix0" is also an output parameter. The vector "row_perm[3]" is an output parameter that contains the row permutations resulting from partial pivoting. The output parameter "even_row_xchg" is 1 when the number of row exchanges is even, or -1 otherwise. Assumes data type is always double. This function is similar to luDecomposition, except that it is tuned specifically for 3x3 matrices.
| |
| mul | back to summary |
|---|---|
| public final void mul(float scalar) Multiplies each element of this matrix by a scalar.
| |
| mul | back to summary |
|---|---|
| public final void mul(float scalar, Matrix3f m1) Multiplies each element of matrix m1 by a scalar and places the result into this. Matrix m1 is not modified.
| |
| mul | back to summary |
|---|---|
| public final void mul(Matrix3f m1) Sets the value of this matrix to the result of multiplying itself with matrix m1.
| |
| mul | back to summary |
|---|---|
| public final void mul(Matrix3f m1, Matrix3f m2) Sets the value of this matrix to the result of multiplying the two argument matrices together. | |
| mulNormalize | back to summary |
|---|---|
| public final void mulNormalize(Matrix3f m1) Multiplies this matrix by matrix m1, does an SVD normalization of the result, and places the result back into this matrix. this = SVDnorm(this*m1).
| |
| mulNormalize | back to summary |
|---|---|
| public final void mulNormalize(Matrix3f m1, Matrix3f m2) Multiplies matrix m1 by matrix m2, does an SVD normalization of the result, and places the result into this matrix. this = SVDnorm(m1*m2). | |
| mulTransposeBoth | back to summary |
|---|---|
| public final void mulTransposeBoth(Matrix3f m1, Matrix3f m2) Multiplies the transpose of matrix m1 times the transpose of matrix m2, and places the result into this. | |
| mulTransposeLeft | back to summary |
|---|---|
| public final void mulTransposeLeft(Matrix3f m1, Matrix3f m2) Multiplies the transpose of matrix m1 times matrix m2, and places the result into this. | |
| mulTransposeRight | back to summary |
|---|---|
| public final void mulTransposeRight(Matrix3f m1, Matrix3f m2) Multiplies matrix m1 times the transpose of matrix m2, and places the result into this. | |
| negate | back to summary |
|---|---|
| public final void negate() Negates the value of this matrix: this = -this. | |
| negate | back to summary |
|---|---|
| public final void negate(Matrix3f m1) Sets the value of this matrix equal to the negation of of the Matrix3f parameter.
| |
| normalize | back to summary |
|---|---|
| public final void normalize() Performs singular value decomposition normalization of this matrix. | |
| normalize | back to summary |
|---|---|
| public final void normalize(Matrix3f m1) Perform singular value decomposition normalization of matrix m1 and place the normalized values into this.
| |
| normalizeCP | back to summary |
|---|---|
| public final void normalizeCP() Perform cross product normalization of this matrix. | |
| normalizeCP | back to summary |
|---|---|
| public final void normalizeCP(Matrix3f m1) Perform cross product normalization of matrix m1 and place the normalized values into this.
| |
| rotX | back to summary |
|---|---|
| public final void rotX(float angle) Sets the value of this matrix to a counter clockwise rotation about the x axis.
| |
| rotY | back to summary |
|---|---|
| public final void rotY(float angle) Sets the value of this matrix to a counter clockwise rotation about the y axis.
| |
| rotZ | back to summary |
|---|---|
| public final void rotZ(float angle) Sets the value of this matrix to a counter clockwise rotation about the z axis.
| |
| set | back to summary |
|---|---|
| public final void set(Quat4f q1) Sets the value of this matrix to the matrix conversion of the (single precision) quaternion argument.
| |
| set | back to summary |
|---|---|
| public final void set(AxisAngle4f a1) Sets the value of this matrix to the matrix conversion of the (single precision) axis and angle argument.
| |
| set | back to summary |
|---|---|
| public final void set(AxisAngle4d a1) Sets the value of this matrix to the matrix conversion of the (double precision) axis and angle argument.
| |
| set | back to summary |
|---|---|
| public final void set(Quat4d q1) Sets the value of this matrix to the matrix conversion of the (single precision) quaternion argument.
| |
| set | back to summary |
|---|---|
| public final void set(float[] m) Sets the values in this Matrix3f equal to the row-major array parameter (ie, the first three elements of the array will be copied into the first row of this matrix, etc.).
| |
| set | back to summary |
|---|---|
| public final void set(Matrix3f m1) Sets the value of this matrix to the value of the Matrix3f argument.
| |
| set | back to summary |
|---|---|
| public final void set(Matrix3d m1) Sets the value of this matrix to the float value of the Matrix3d argument.
| |
| set | back to summary |
|---|---|
| public final void set(float scale) Sets the value of this matrix to a scale matrix with the passed scale amount.
| |
| setColumn | back to summary |
|---|---|
| public final void setColumn(int column, float x, float y, float z) Sets the specified column of this matrix3f to the three values provided.
| |
| setColumn | back to summary |
|---|---|
| public final void setColumn(int column, Vector3f v) Sets the specified column of this matrix3f to the vector provided.
| |
| setColumn | back to summary |
|---|---|
| public final void setColumn(int column, float[] v) Sets the specified column of this matrix3f to the three values provided.
| |
| setElement | back to summary |
|---|---|
| public final void setElement(int row, int column, float value) Sets the specified element of this matrix3f to the value provided.
| |
| setIdentity | back to summary |
|---|---|
| public final void setIdentity() Sets this Matrix3f to identity. | |
| setM00 | back to summary |
|---|---|
| public final void setM00(float m00) Set the first matrix element in the first row.
| |
| setM01 | back to summary |
|---|---|
| public final void setM01(float m01) Set the second matrix element in the first row.
| |
| setM02 | back to summary |
|---|---|
| public final void setM02(float m02) Set the third matrix element in the first row.
| |
| setM10 | back to summary |
|---|---|
| public final void setM10(float m10) Set first matrix element in the second row.
| |
| setM11 | back to summary |
|---|---|
| public final void setM11(float m11) Set the second matrix element in the second row.
| |
| setM12 | back to summary |
|---|---|
| public final void setM12(float m12) Set the third matrix element in the second row.
| |
| setM20 | back to summary |
|---|---|
| public final void setM20(float m20) Set the first matrix element in the third row.
| |
| setM21 | back to summary |
|---|---|
| public final void setM21(float m21) Set the second matrix element in the third row.
| |
| setM22 | back to summary |
|---|---|
| public final void setM22(float m22) Set the third matrix element in the third row.
| |
| setRow | back to summary |
|---|---|
| public final void setRow(int row, float x, float y, float z) Sets the specified row of this matrix3f to the three values provided.
| |
| setRow | back to summary |
|---|---|
| public final void setRow(int row, Vector3f v) Sets the specified row of this matrix3f to the Vector provided.
| |
| setRow | back to summary |
|---|---|
| public final void setRow(int row, float[] v) Sets the specified row of this matrix3f to the three values provided.
| |
| setScale | back to summary |
|---|---|
| public final void setScale(float scale) Sets the scale component of the current matrix by factoring out the current scale (by doing an SVD) and multiplying by the new scale.
| |
| setZero | back to summary |
|---|---|
| public final void setZero() Sets this matrix to all zeros. | |
| sub | back to summary |
|---|---|
| public final void sub(Matrix3f m1, Matrix3f m2) Sets the value of this matrix to the matrix difference of matrices m1 and m2. | |
| sub | back to summary |
|---|---|
| public final void sub(Matrix3f m1) Sets the value of this matrix to the matrix difference of itself and matrix m1 (this = this - m1).
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a string that contains the values of this Matrix3f.
| |
| transform | back to summary |
|---|---|
| public final void transform(Tuple3f t) Multiply this matrix by the tuple t and place the result back into the tuple (t = this*t).
| |
| transform | back to summary |
|---|---|
| public final void transform(Tuple3f t, Tuple3f result) Multiply this matrix by the tuple t and and place the result into the tuple "result" (result = this*t). | |
| transpose | back to summary |
|---|---|
| public final void transpose() Sets the value of this matrix to its transpose. | |
| transpose | back to summary |
|---|---|
| public final void transpose(Matrix3f m1) Sets the value of this matrix to the transpose of the argument matrix.
| |