ur_rna.Utilities.geom

## Class Matrix3D

- java.lang.Object
- - ur_rna.Utilities.geom.Matrix3D

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

      public class Matrix3D
      extends java.lang.Object
      implements java.io.Serializable, java.lang.Cloneable

  A double precision 3x3 matrix.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private static double` | `EPSILON`
    `double` | `m00` The matrix element in row 1, column 1.
    `double` | `m01` The matrix element in row 1, column 2.
    `double` | `m02` The matrix element in row 1, column 3.
    `double` | `m10` The matrix element in row 2, column 1.
    `double` | `m11` The matrix element in row 2, column 2.
    `double` | `m12` The matrix element in row 2, column 3.
    `double` | `m20` The matrix element in row 3, column 1.
    `double` | `m21` The matrix element in row 3, column 2.
    `double` | `m22` The matrix element in row 3, column 3.
    `(package private) static long` | `serialVersionUID`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Matrix3D()` Constructs a Matrix3D with all zeros.
    `Matrix3D(double[] v)` Constructs a Matrix3D from a nine-element array.
    `Matrix3D(double m00, double m01, double m02, double m10, double m11, double m12, double m20, double m21, double m22)` Constructs a Matrix3D from the individual matrix components.
    `Matrix3D(Matrix3D m1)` Constructs a new matrix with the same values as the Matrix3D parameter.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(double scalar)` Adds a scalar to each component of this matrix.
    `void` | `add(double scalar, Matrix3D m1)` Adds a scalar to each component of the matrix m1 and places the result into this.
    `void` | `add(Matrix3D m1)` Sets the value of this matrix to the sum of itself and matrix m1.
    `void` | `add(Matrix3D m1, Matrix3D m2)` Sets the value of this matrix to the matrix sum of matrices m1 and m2.
    `private static boolean` | `almostEqual(double a, double b)`
    `java.lang.Object` | `clone()` Creates a new object of the same class as this object.
    `(package private) static int` | `compute_2X2(double f, double g, double h, double[] single_values, double[] snl, double[] csl, double[] snr, double[] csr, int index)`
    `(package private) static int` | `compute_qr(double[] s, double[] e, double[] u, double[] v)`
    `(package private) static double` | `compute_rot(double f, double g, double[] sin, double[] cos, int index, int first)`
    `(package private) static double` | `compute_shift(double f, double g, double h)`
    `(package private) static void` | `compute_svd(double[] m, double[] outScale, double[] outRot)`
    `(package private) static double` | `d_sign(double a, double b)`
    `double` | `determinant()` Computes the determinant of this matrix.
    `boolean` | `epsilonEquals(Matrix3D m1, double 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.
    `boolean` | `equals(Matrix3D m1)` Returns true if all of the data members of Matrix3D m1 are equal to the corresponding data members in this Matrix3D.
    `boolean` | `equals(java.lang.Object t1)` Returns true if the Object t1 is of type Matrix3D and all of the data members of t1 are equal to the corresponding data members in this Matrix3D.
    `void` | `getColumn(int column, double[] v)` Copies the matrix values in the specified column into the array parameter.
    `double` | `getElement(int row, int column)` Retrieves the value at the specified row and column of the specified matrix.
    `double` | `getM00()` Get the first matrix element in the first row.
    `double` | `getM01()` Get the second matrix element in the first row.
    `double` | `getM02()` Get the third matrix element in the first row.
    `double` | `getM10()` Get first matrix element in the second row.
    `double` | `getM11()` Get second matrix element in the second row.
    `double` | `getM12()` Get the third matrix element in the second row.
    `double` | `getM20()` Get the first matrix element in the third row.
    `double` | `getM21()` Get the second matrix element in the third row.
    `double` | `getM22()` Get the third matrix element in the third row .
    `void` | `getRow(int row, double[] v)` Copies the matrix values in the specified row into the array parameter.
    `double` | `getScale()` Performs an SVD normalization of this matrix to calculate and return the uniform scale factor.
    `(package private) void` | `getScaleRotate(double[] scales, double[] rots)` perform SVD (if necessary to get rotational component
    `int` | `hashCode()` Returns a hash code value based on the data values in this object.
    `boolean` | `invert()` Inverts this matrix in place.
    `boolean` | `invert(Matrix3D m1)` Sets the value of this matrix to the matrix inverse of the passed matrix m1.
    `private boolean` | `invertGeneral(Matrix3D m1)` General invert routine.
    `(package private) static void` | `luBacksubstitution(double[] matrix1, int[] row_perm, double[] matrix2)` Solves a set of linear equations.
    `(package private) 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.
    `(package private) static void` | `mat_mul(double[] m1, double[] m2, double[] m3)`
    `(package private) static double` | `max(double a, double b)`
    `(package private) static double` | `max3(double[] values)`
    `(package private) static double` | `min(double a, double b)`
    `void` | `mul(double scalar)` Multiplies each element of this matrix by a scalar.
    `void` | `mul(double scalar, Matrix3D m1)` Multiplies each element of matrix m1 by a scalar and places the result into this.
    `void` | `mul(Matrix3D m1)` Sets the value of this matrix to the result of multiplying itself with matrix m1.
    `void` | `mul(Matrix3D m1, Matrix3D m2)` Sets the value of this matrix to the result of multiplying the two argument matrices together.
    `void` | `mulNormalize(Matrix3D 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).
    `void` | `mulNormalize(Matrix3D m1, Matrix3D 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).
    `void` | `mulTransposeBoth(Matrix3D m1, Matrix3D m2)` Multiplies the transpose of matrix m1 times the transpose of matrix m2, and places the result into this.
    `void` | `mulTransposeLeft(Matrix3D m1, Matrix3D m2)` Multiplies the transpose of matrix m1 times matrix m2, and places the result into this.
    `void` | `mulTransposeRight(Matrix3D m1, Matrix3D m2)` Multiplies matrix m1 times the transpose of matrix m2, and places the result into this.
    `void` | `negate()` Negates the value of this matrix: this = -this.
    `void` | `negate(Matrix3D m1)` Sets the value of this matrix equal to the negation of of the Matrix3D parameter.
    `void` | `normalize()` Performs singular value decomposition normalization of this matrix.
    `void` | `normalize(Matrix3D m1)` Perform singular value decomposition normalization of matrix m1 and place the normalized values into this.
    `void` | `normalizeCP()` Perform cross product normalization of this matrix.
    `void` | `normalizeCP(Matrix3D m1)` Perform cross product normalization of matrix m1 and place the normalized values into this.
    `(package private) static void` | `print_det(double[] mat)`
    `(package private) static void` | `print_mat(double[] mat)`
    `void` | `rotX(double angle)` Sets the value of this matrix to a counter clockwise rotation about the x axis.
    `void` | `rotY(double angle)` Sets the value of this matrix to a counter clockwise rotation about the y axis.
    `void` | `rotZ(double angle)` Sets the value of this matrix to a counter clockwise rotation about the z axis.
    `void` | `set(double scale)` Sets the value of this matrix to a scale matrix with the passed scale amount.
    `void` | `set(double[] m)` Sets the values in this Matrix3D 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.).
    `void` | `set(Matrix3D m1)` Sets the value of this matrix to the value of the Matrix3D argument.
    `void` | `setColumn(int column, double[] v)` Sets the specified column of this matrix3d to the three values provided.
    `void` | `setColumn(int column, double x, double y, double z)` Sets the specified column of this matrix3d to the three values provided.
    `void` | `setElement(int row, int column, double value)` Sets the specified element of this matrix3f to the value provided.
    `void` | `setIdentity()` Sets this Matrix3D to identity.
    `void` | `setM00(double m00)` Set the first matrix element in the first row.
    `void` | `setM01(double m01)` Set the second matrix element in the first row.
    `void` | `setM02(double m02)` Set the third matrix element in the first row.
    `void` | `setM10(double m10)` Set first matrix element in the second row.
    `void` | `setM11(double m11)` Set the second matrix element in the second row.
    `void` | `setM12(double m12)` Set the third matrix element in the second row.
    `void` | `setM20(double m20)` Set the first matrix element in the third row.
    `void` | `setM21(double m21)` Set the second matrix element in the third row.
    `void` | `setM22(double m22)` Set the third matrix element in the third row.
    `void` | `setRow(int row, double[] v)` Sets the specified row of this matrix3d to the three values provided.
    `void` | `setRow(int row, double x, double y, double z)` Sets the specified row of this matrix3d to the 4 values provided.
    `void` | `setScale(double 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.
    `void` | `setZero()` Sets this matrix to all zeros.
    `void` | `sub(Matrix3D m1)` Sets the value of this matrix to the matrix difference of itself and matrix m1 (this = this - m1).
    `void` | `sub(Matrix3D m1, Matrix3D m2)` Sets the value of this matrix to the matrix difference of matrices m1 and m2.
    `(package private) static void` | `svdReorder(double[] m, double[] t1, double[] t2, double[] scales, double[] outRot, double[] outScale)`
    `java.lang.String` | `toString()` Returns a string that contains the values of this Matrix3D.
    `void` | `transform(double[] xyz)` Multiply this matrix by the 3D vector represented by the xyz array and place the result back into the same array.
    `void` | `transform(double[] xyz, int srcOffset, int dstOffset)` Multiply this matrix by the 3D vector represented by the xyz array and place the result back into the same array.
    `(package private) static void` | `transpose_mat(double[] in, double[] out)`
    `void` | `transpose()` Sets the value of this matrix to its transpose.
    `void` | `transpose(Matrix3D m1)` Sets the value of this matrix to the transpose of the argument matrix.

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### EPSILON

          private static final double EPSILON

      See Also:
        Constant Field Values

    - #### m00

          public double m00

      The matrix element in row 1, column 1.

    - #### m01

          public double m01

      The matrix element in row 1, column 2.

    - #### m02

          public double m02

      The matrix element in row 1, column 3.

    - #### m10

          public double m10

      The matrix element in row 2, column 1.

    - #### m11

          public double m11

      The matrix element in row 2, column 2.

    - #### m12

          public double m12

      The matrix element in row 2, column 3.

    - #### m20

          public double m20

      The matrix element in row 3, column 1.

    - #### m21

          public double m21

      The matrix element in row 3, column 2.

    - #### m22

          public double m22

      The matrix element in row 3, column 3.

    - #### serialVersionUID

          static final long serialVersionUID

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### Matrix3D

          public Matrix3D()

      Constructs a Matrix3D with all zeros.

    - #### Matrix3D

          public Matrix3D(double[] v)

      Constructs a Matrix3D from a nine-element array.
      Parameters:
        `v` - the array of length 9 containing in order

    - #### Matrix3D

          public Matrix3D(double m00,
                          double m01,
                          double m02,
                          double m10,
                          double m11,
                          double m12,
                          double m20,
                          double m21,
                          double m22)

      Constructs a Matrix3D from the individual matrix components.
      Parameters:
        `m00` - the [0,0] element
        `m01` - the [0,1] element
        `m02` - the [0,2] element
        `m10` - the [1,0] element
        `m11` - the [1,1] element
        `m12` - the [1,2] element
        `m20` - the [2,0] element
        `m21` - the [2,1] element
        `m22` - the [2,2] element

    - #### Matrix3D

          public Matrix3D(Matrix3D m1)

      Constructs a new matrix with the same values as the Matrix3D parameter.
      Parameters:
        `m1` - the source matrix

  - ### Method Detail

    - #### add

          public final void add(double scalar)

      Adds a scalar to each component of this matrix.
      Parameters:
        `scalar` - the scalar adder

    - #### add

          public final void add(double scalar,
                                Matrix3D m1)

      Adds a scalar to each component of the matrix m1 and places the result into this. Matrix m1 is not modified.
      Parameters:
        `scalar` - the scalar adder
        `m1` - the original matrix values

    - #### add

          public final void add(Matrix3D m1)

      Sets the value of this matrix to the sum of itself and matrix m1.
      Parameters:
        `m1` - the other matrix

    - #### add

          public final void add(Matrix3D m1,
                                Matrix3D m2)

      Sets the value of this matrix to the matrix sum of matrices m1 and m2.
      Parameters:
        `m1` - the first matrix
        `m2` - the second matrix

    - #### almostEqual

          private static final boolean almostEqual(double a,
                                                   double b)

    - #### clone

          public java.lang.Object clone()

      Creates a new object of the same class as this object.
      Overrides:
        `clone` in class `java.lang.Object`
      Returns:
        a clone of this instance.
      Throws:
        `java.lang.OutOfMemoryError` - if there is not enough memory.
      Since:
        vecmath 1.3
      See Also:
        `Cloneable`

    - #### compute_2X2

          static int compute_2X2(double f,
                                 double g,
                                 double h,
                                 double[] single_values,
                                 double[] snl,
                                 double[] csl,
                                 double[] snr,
                                 double[] csr,
                                 int index)

    - #### compute_qr

          static int compute_qr(double[] s,
                                double[] e,
                                double[] u,
                                double[] v)

    - #### compute_rot

          static double compute_rot(double f,
                                    double g,
                                    double[] sin,
                                    double[] cos,
                                    int index,
                                    int first)

    - #### compute_shift

          static double compute_shift(double f,
                                      double g,
                                      double h)

    - #### compute_svd

          static void compute_svd(double[] m,
                                  double[] outScale,
                                  double[] outRot)

    - #### d_sign

          static double d_sign(double a,
                               double b)

    - #### determinant

          public final double determinant()

      Computes the determinant of this matrix.
      Returns:
        the determinant of the matrix

    - #### epsilonEquals

          public boolean epsilonEquals(Matrix3D m1,
                                       double 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)]
      Parameters:
        `m1` - the matrix to be compared to this matrix
        `epsilon` - the threshold value

    - #### equals

          public boolean equals(Matrix3D m1)

      Returns true if all of the data members of Matrix3D m1 are equal to the corresponding data members in this Matrix3D.
      Parameters:
        `m1` - the matrix with which the comparison is made
      Returns:
        true or false

    - #### equals

          public boolean equals(java.lang.Object t1)

      Returns true if the Object t1 is of type Matrix3D and all of the data members of t1 are equal to the corresponding data members in this Matrix3D.
      Overrides:
        `equals` in class `java.lang.Object`
      Parameters:
        `t1` - the matrix with which the comparison is made
      Returns:
        true or false

    - #### getColumn

          public final void getColumn(int column,
                                      double[] v)

      Copies the matrix values in the specified column into the array parameter.
      Parameters:
        `column` - the matrix column
        `v` - the array into which the matrix row values will be copied

    - #### getElement

          public final double getElement(int row,
                                         int column)

      Retrieves the value at the specified row and column of the specified matrix.
      Parameters:
        `row` - the row number to be retrieved (zero indexed)
        `column` - the column number to be retrieved (zero indexed)
      Returns:
        the value at the indexed element.

    - #### getM00

          public final double getM00()

      Get the first matrix element in the first row.
      Returns:
        Returns the m00.
      Since:
        vecmath 1.5

    - #### getM01

          public final double getM01()

      Get the second matrix element in the first row.
      Returns:
        Returns the m01.
      Since:
        vecmath 1.5

    - #### getM02

          public final double getM02()

      Get the third matrix element in the first row.
      Returns:
        Returns the m02.
      Since:
        vecmath 1.5

    - #### getM10

          public final double getM10()

      Get first matrix element in the second row.
      Returns:
        Returns the m10.
      Since:
        vecmath 1.5

    - #### getM11

          public final double getM11()

      Get second matrix element in the second row.
      Returns:
        Returns the m11.
      Since:
        vecmath 1.5

    - #### getM12

          public final double getM12()

      Get the third matrix element in the second row.
      Returns:
        Returns the m12.
      Since:
        vecmath 1.5

    - #### getM20

          public final double getM20()

      Get the first matrix element in the third row.
      Returns:
        Returns the m20.
      Since:
        vecmath 1.5

    - #### getM21

          public final double getM21()

      Get the second matrix element in the third row.
      Returns:
        Returns the m21.
      Since:
        vecmath 1.5

    - #### getM22

          public final double getM22()

      Get the third matrix element in the third row .
      Returns:
        Returns the m22.
      Since:
        vecmath 1.5

    - #### getRow

          public final void getRow(int row,
                                   double[] v)

      Copies the matrix values in the specified row into the array parameter.
      Parameters:
        `row` - the matrix row
        `v` - the array into which the matrix row values will be copied

    - #### getScale

          public final double 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.
      Returns:
        the scale factor of this matrix

    - #### getScaleRotate

          final void getScaleRotate(double[] scales,
                                    double[] rots)

      perform SVD (if necessary to get rotational component

    - #### hashCode

          public int hashCode()

      Returns a hash code value based on the data values in this object. Two different Matrix3D objects with identical data values (i.e., Matrix3D.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.
      Overrides:
        `hashCode` in class `java.lang.Object`
      Returns:
        the integer hash code value

    - #### invert

          public final boolean invert()

      Inverts this matrix in place.
      Returns:
        Returns true if inversion was successful, or false if the matrix is singular (non-invertible)

    - #### invert

          public final boolean invert(Matrix3D m1)

      Sets the value of this matrix to the matrix inverse of the passed matrix m1.
      Parameters:
        `m1` - the matrix to be inverted
      Returns:
        Returns true if inversion was successful, or false if the matrix is singular (non-invertible)

    - #### invertGeneral

          private boolean invertGeneral(Matrix3D 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.

      Returns:
        Returns true if inversion was successful, or false if the matrix is singular (non-invertible)

    - #### luBacksubstitution

          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

          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.

      Returns:
        true if the matrix is nonsingular, or false otherwise.

    - #### mat_mul

          static void mat_mul(double[] m1,
                              double[] m2,
                              double[] m3)

    - #### max

          static double max(double a,
                            double b)

    - #### max3

          static double max3(double[] values)

    - #### min

          static double min(double a,
                            double b)

    - #### mul

          public final void mul(double scalar)

      Multiplies each element of this matrix by a scalar.
      Parameters:
        `scalar` - The scalar multiplier.

    - #### mul

          public final void mul(double scalar,
                                Matrix3D m1)

      Multiplies each element of matrix m1 by a scalar and places the result into this. Matrix m1 is not modified.
      Parameters:
        `scalar` - the scalar multiplier
        `m1` - the original matrix

    - #### mul

          public final void mul(Matrix3D m1)

      Sets the value of this matrix to the result of multiplying itself with matrix m1.
      Parameters:
        `m1` - the other matrix

    - #### mul

          public final void mul(Matrix3D m1,
                                Matrix3D m2)

      Sets the value of this matrix to the result of multiplying the two argument matrices together.
      Parameters:
        `m1` - the first matrix
        `m2` - the second matrix

    - #### mulNormalize

          public final void mulNormalize(Matrix3D 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).
      Parameters:
        `m1` - the matrix on the right hand side of the multiplication

    - #### mulNormalize

          public final void mulNormalize(Matrix3D m1,
                                         Matrix3D 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).
      Parameters:
        `m1` - the matrix on the left hand side of the multiplication
        `m2` - the matrix on the right hand side of the multiplication

    - #### mulTransposeBoth

          public final void mulTransposeBoth(Matrix3D m1,
                                             Matrix3D m2)

      Multiplies the transpose of matrix m1 times the transpose of matrix m2, and places the result into this.
      Parameters:
        `m1` - the matrix on the left hand side of the multiplication
        `m2` - the matrix on the right hand side of the multiplication

    - #### mulTransposeLeft

          public final void mulTransposeLeft(Matrix3D m1,
                                             Matrix3D m2)

      Multiplies the transpose of matrix m1 times matrix m2, and places the result into this.
      Parameters:
        `m1` - the matrix on the left hand side of the multiplication
        `m2` - the matrix on the right hand side of the multiplication

    - #### mulTransposeRight

          public final void mulTransposeRight(Matrix3D m1,
                                              Matrix3D m2)

      Multiplies matrix m1 times the transpose of matrix m2, and places the result into this.
      Parameters:
        `m1` - the matrix on the left hand side of the multiplication
        `m2` - the matrix on the right hand side of the multiplication

    - #### negate

          public final void negate()

      Negates the value of this matrix: this = -this.

    - #### negate

          public final void negate(Matrix3D m1)

      Sets the value of this matrix equal to the negation of of the Matrix3D parameter.
      Parameters:
        `m1` - the source matrix

    - #### normalize

          public final void normalize()

      Performs singular value decomposition normalization of this matrix.

    - #### normalize

          public final void normalize(Matrix3D m1)

      Perform singular value decomposition normalization of matrix m1 and place the normalized values into this.
      Parameters:
        `m1` - Provides the matrix values to be normalized

    - #### normalizeCP

          public final void normalizeCP()

      Perform cross product normalization of this matrix.

    - #### normalizeCP

          public final void normalizeCP(Matrix3D m1)

      Perform cross product normalization of matrix m1 and place the normalized values into this.
      Parameters:
        `m1` - Provides the matrix values to be normalized

    - #### print_det

          static void print_det(double[] mat)

    - #### print_mat

          static void print_mat(double[] mat)

    - #### rotX

          public final void rotX(double angle)

      Sets the value of this matrix to a counter clockwise rotation about the x axis.
      Parameters:
        `angle` - the angle to rotate about the X axis in radians

    - #### rotY

          public final void rotY(double angle)

      Sets the value of this matrix to a counter clockwise rotation about the y axis.
      Parameters:
        `angle` - the angle to rotate about the Y axis in radians

    - #### rotZ

          public final void rotZ(double angle)

      Sets the value of this matrix to a counter clockwise rotation about the z axis.
      Parameters:
        `angle` - the angle to rotate about the Z axis in radians

    - #### set

          public final void set(double scale)

      Sets the value of this matrix to a scale matrix with the passed scale amount.
      Parameters:
        `scale` - the scale factor for the matrix

    - #### set

          public final void set(double[] m)

      Sets the values in this Matrix3D 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.).
      Parameters:
        `m` - the double precision array of length 9

    - #### set

          public final void set(Matrix3D m1)

      Sets the value of this matrix to the value of the Matrix3D argument.
      Parameters:
        `m1` - the source matrix3d

    - #### setColumn

          public final void setColumn(int column,
                                      double[] v)

      Sets the specified column of this matrix3d to the three values provided.
      Parameters:
        `column` - the column number to be modified (zero indexed)
        `v` - the replacement column

    - #### setColumn

          public final void setColumn(int column,
                                      double x,
                                      double y,
                                      double z)

      Sets the specified column of this matrix3d to the three values provided.
      Parameters:
        `column` - the column number to be modified (zero indexed)
        `x` - the first row element
        `y` - the second row element
        `z` - the third row element

    - #### setElement

          public final void setElement(int row,
                                       int column,
                                       double value)

      Sets the specified element of this matrix3f to the value provided.
      Parameters:
        `row` - the row number to be modified (zero indexed)
        `column` - the column number to be modified (zero indexed)
        `value` - the new value

    - #### setIdentity

          public final void setIdentity()

      Sets this Matrix3D to identity.

    - #### setM00

          public final void setM00(double m00)

      Set the first matrix element in the first row.
      Parameters:
        `m00` - The m00 to set.
      Since:
        vecmath 1.5

    - #### setM01

          public final void setM01(double m01)

      Set the second matrix element in the first row.
      Parameters:
        `m01` - The m01 to set.
      Since:
        vecmath 1.5

    - #### setM02

          public final void setM02(double m02)

      Set the third matrix element in the first row.
      Parameters:
        `m02` - The m02 to set.
      Since:
        vecmath 1.5

    - #### setM10

          public final void setM10(double m10)

      Set first matrix element in the second row.
      Parameters:
        `m10` - The m10 to set.
      Since:
        vecmath 1.5

    - #### setM11

          public final void setM11(double m11)

      Set the second matrix element in the second row.
      Parameters:
        `m11` - The m11 to set.
      Since:
        vecmath 1.5

    - #### setM12

          public final void setM12(double m12)

      Set the third matrix element in the second row.
      Parameters:
        `m12` - The m12 to set.
      Since:
        vecmath 1.5

    - #### setM20

          public final void setM20(double m20)

      Set the first matrix element in the third row.
      Parameters:
        `m20` - The m20 to set.
      Since:
        vecmath 1.5

    - #### setM21

          public final void setM21(double m21)

      Set the second matrix element in the third row.
      Parameters:
        `m21` - The m21 to set.
      Since:
        vecmath 1.5

    - #### setM22

          public final void setM22(double m22)

      Set the third matrix element in the third row.
      Parameters:
        `m22` - The m22 to set.
      Since:
        vecmath 1.5

    - #### setRow

          public final void setRow(int row,
                                   double[] v)

      Sets the specified row of this matrix3d to the three values provided.
      Parameters:
        `row` - the row number to be modified (zero indexed)
        `v` - the replacement row

    - #### setRow

          public final void setRow(int row,
                                   double x,
                                   double y,
                                   double z)

      Sets the specified row of this matrix3d to the 4 values provided.
      Parameters:
        `row` - the row number to be modified (zero indexed)
        `x` - the first column element
        `y` - the second column element
        `z` - the third column element

    - #### setScale

          public final void setScale(double 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.
      Parameters:
        `scale` - the new scale amount

    - #### setZero

          public final void setZero()

      Sets this matrix to all zeros.

    - #### sub

          public final void sub(Matrix3D m1)

      Sets the value of this matrix to the matrix difference of itself and matrix m1 (this = this - m1).
      Parameters:
        `m1` - the other matrix

    - #### sub

          public final void sub(Matrix3D m1,
                                Matrix3D m2)

      Sets the value of this matrix to the matrix difference of matrices m1 and m2.
      Parameters:
        `m1` - the first matrix
        `m2` - the second matrix

    - #### svdReorder

          static void svdReorder(double[] m,
                                 double[] t1,
                                 double[] t2,
                                 double[] scales,
                                 double[] outRot,
                                 double[] outScale)

    - #### toString

          public java.lang.String toString()

      Returns a string that contains the values of this Matrix3D.
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        the String representation

    - #### transform

          public final void transform(double[] xyz)

      Multiply this matrix by the 3D vector represented by the xyz array and place the result back into the same array.
      Parameters:
        `xyz` - the array that holds the values to be multiplied by this matrix and then replaced

    - #### transform

          public final void transform(double[] xyz,
                                      int srcOffset,
                                      int dstOffset)

      Multiply this matrix by the 3D vector represented by the xyz array and place the result back into the same array.
      Parameters:
        `xyz` - the array that holds the values to be multiplied by this matrix and then replaced

    - #### transpose_mat

          static void transpose_mat(double[] in,
                                    double[] out)

    - #### transpose

          public final void transpose()

      Sets the value of this matrix to its transpose.

    - #### transpose

          public final void transpose(Matrix3D m1)

      Sets the value of this matrix to the transpose of the argument matrix.
      Parameters:
        `m1` - the matrix to be transposed