Class Matrix4d

  • All Implemented Interfaces:
    Serializable, Cloneable
    Direct Known Subclasses:
    Transform3D

    public class Matrix4d
    extends Object
    implements Serializable, Cloneable
    Is represented internally as a 4x4 floating point matrix. The mathematical representation is row major, as in traditional matrix mathematics.
    Version:
    17.0 2020-01-04 14:41:43
    Author:
    Stéphane GALLAND
    See Also:
    Serialized Form
    Maven Group Id:
    org.arakhne.afc.core
    Maven Artifact Id:
    mathgeom
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected Boolean isIdentity
      Indicates if the matrix is identity.
      protected double m00
      The first matrix element in the first row.
      protected double m01
      The second matrix element in the first row.
      protected double m02
      The third matrix element in the first row.
      protected double m03
      The fourth matrix element in the first row.
      protected double m10
      The first matrix element in the second row.
      protected double m11
      The second matrix element in the second row.
      protected double m12
      The third matrix element in the second row.
      protected double m13
      The fourth matrix element in the second row.
      protected double m20
      The first matrix element in the third row.
      protected double m21
      The second matrix element in the third row.
      protected double m22
      The third matrix element in the third row.
      protected double m23
      The fourth matrix element in the third row.
      protected double m30
      The first matrix element in the fourth row.
      protected double m31
      The second matrix element in the fourth row.
      protected double m32
      The third matrix element in the fourth row.
      protected double m33
      The fourth matrix element in the fourth row.
    • Constructor Summary

      Constructors 
      Constructor Description
      Matrix4d()
      Constructs and initializes a Matrix4f to all zeros.
      Matrix4d​(double[] v)
      Constructs and initializes a Matrix4f from the specified sixteen- element array.
      Matrix4d​(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 and initializes a Matrix4f from the specified nine values.
      Matrix4d​(Matrix4d matrix)
      Constructs a new matrix with the same values as the Matrix4f parameter.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Matrix4d $bang()
      Replies the transposition of this matrix: !this.
      Matrix4d $div​(double scalar)
      Replies the division of this matrix by the given scalar: this / scalar.
      Matrix4d $minus()
      Replies the negation of this matrix: -this.
      Matrix4d $minus​(double scalar)
      Replies the substraction of the given scalar to this matrix: this - scalar.
      Matrix4d $minus​(Matrix4d matrix)
      Replies the substraction of the given matrix to this matrix: this - matrix.
      Matrix4d $plus​(double scalar)
      Replies the addition of the given scalar to this matrix: this + scalar.
      Matrix4d $plus​(Matrix4d matrix)
      Replies the addition of the given matrix to this matrix: this + matrix.
      Matrix4d $times​(double scalar)
      Replies the multiplication of the given scalar and this matrix: this * scalar.
      Matrix4d $times​(Matrix4d matrix)
      Replies the multiplication of the given matrix and this matrix: this * matrix.
      void add​(double scalar)
      Adds a scalar to each component of this matrix.
      void add​(double scalar, Matrix4d matrix)
      Adds a scalar to each component of the matrix m1 and places the result into this.
      void add​(Matrix4d matrix)
      Sets the value of this matrix to the sum of itself and matrix m1.
      void add​(Matrix4d matrix1, Matrix4d matrix2)
      Sets the value of this matrix to the matrix sum of matrices m1 and m2.
      Matrix4d clone()
      Creates a new object of the same class as this object.
      double determinant()
      Computes the determinant of this matrix.
      boolean epsilonEquals​(Matrix4d matrix, 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​(Object t1)
      Returns true if the Object t1 is of type Matrix4f and all of the data members of t1 are equal to the corresponding data members in this Matrix4f.
      boolean equals​(Matrix4d matrix)
      Returns true if all of the data members of Matrix4f m1 are equal to the corresponding data members in this Matrix4f.
      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 getM03()
      Get the fourth 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 getM13()
      Get the fourth 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 .
      double getM23()
      Get the fourth matrix element in the third row .
      double getM30()
      Get the first matrix element in the fourth row.
      double getM31()
      Get the second matrix element in the fourth row.
      double getM32()
      Get the third matrix element in the fourth row .
      double getM33()
      Get the fourth matrix element in the fourth row .
      void getRow​(int row, double[] v)
      Copies the matrix values in the specified row into the array parameter.
      int hashCode()
      Returns a hash code value based on the data values in this object.
      boolean isIdentity()
      Replies if the matrix is identity.
      boolean isSymmetric()
      Replies if the matrix is symmetric.
      void mul​(double scalar)
      Multiplies each element of this matrix by a scalar.
      void mul​(double scalar, Matrix4d matrix)
      Multiplies each element of matrix m1 by a scalar and places the result into this.
      void mul​(Matrix4d matrix)
      Sets the value of this matrix to the result of multiplying itself with matrix m1.
      void mul​(Matrix4d matrix1, Matrix4d matrix2)
      Sets the value of this matrix to the result of multiplying the two argument matrices together.
      void negate()
      Negates the value of this matrix: this = -this.
      void negate​(Matrix4d matrix)
      Sets the value of this matrix equal to the negation of of the Matrix4f parameter.
      void operator_add​(double scalar)
      Add the given scalar to this matrix: this += scalar.
      void operator_add​(Matrix4d matrix)
      Add the given matrix to this matrix: this += matrix.
      Matrix4d operator_divide​(double scalar)
      Replies the division of this matrix by the given scalar: this / scalar.
      Matrix4d operator_minus()
      Replies the negation of this matrix: -this.
      Matrix4d operator_minus​(double scalar)
      Replies the substraction of the given scalar to this matrix: this - scalar.
      Matrix4d operator_minus​(Matrix4d matrix)
      Replies the substraction of the given matrix to this matrix: this - matrix.
      void operator_moinsMoins()
      Increment this matrix: this--.
      Matrix4d operator_multiply​(double scalar)
      Replies the multiplication of the given scalar and this matrix: this * scalar.
      Matrix4d operator_multiply​(Matrix4d matrix)
      Replies the multiplication of the given matrix and this matrix: this * matrix.
      Matrix4d operator_not()
      Replies the transposition of this matrix: !this.
      Matrix4d operator_plus​(double scalar)
      Replies the addition of the given scalar to this matrix: this + scalar.
      Matrix4d operator_plus​(Matrix4d matrix)
      Replies the addition of the given matrix to this matrix: this + matrix.
      void operator_plusPlus()
      Increment this matrix: this++.
      void operator_remove​(double scalar)
      Substract the given scalar to this matrix: this -= scalar.
      void operator_remove​(Matrix4d matrix)
      Substract the given matrix to this matrix: this -= matrix.
      void set​(double[] matrix)
      Sets the values in this Matrix4f equal to the row-major array parameter (ie, the first four elements of the array will be copied into the first row of this matrix, etc.).
      void set​(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)
      Set the components of the matrix.
      void set​(Matrix4d matrix)
      Sets the value of this matrix to the double value of the Matrix3.
      void setColumn​(int column, double[] v)
      Sets the specified column of this Matrix4f to the three values provided.
      void setColumn​(int column, double value1, double value2, double value3, double value4)
      Sets the specified column of this Matrix4f to the three values provided.
      void setDiagonal​(double m00, double m11, double m22, double m33)
      Sets this matrix as diagonal.
      void setElement​(int row, int column, double value)
      Sets the specified element of this matrix3. to the value provided.
      void setIdentity()
      Sets this Matrix4f 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 setM03​(double m03)
      Set the fourth 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 setM13​(double m13)
      Set the fourth 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 setM23​(double m23)
      Set the fourth matrix element in the third row.
      void setM30​(double m30)
      Set the first matrix element in the fourth row.
      void setM31​(double m31)
      Set the second matrix element in the fourth row.
      void setM32​(double m32)
      Set the third matrix element in the fourth row.
      void setM33​(double m33)
      Set the fourth matrix element in the fourth row.
      void setRow​(int row, double[] v)
      Sets the specified row of this Matrix4f to the three values provided.
      void setRow​(int row, double value1, double value2, double value3, double value4)
      Sets the specified row of this Matrix4f to the 4 values provided.
      void setZero()
      Sets this matrix to all zeros.
      void sub​(Matrix4d matrix)
      Sets the value of this matrix to the matrix difference of itself and matrix m1 (this = this - m1).
      void sub​(Matrix4d matrix1, Matrix4d matrix2)
      Sets the value of this matrix to the matrix difference of matrices m1 and m2.
      String toString()
      Returns a string that contains the values of this Matrix4f.
      void transpose()
      Sets the value of this matrix to its transpose.
      void transpose​(Matrix4d m1)
      Sets the value of this matrix to the transpose of the argument matrix.
    • Field Detail

      • m00

        protected double m00
        The first matrix element in the first row.
      • m01

        protected double m01
        The second matrix element in the first row.
      • m02

        protected double m02
        The third matrix element in the first row.
      • m03

        protected double m03
        The fourth matrix element in the first row.
      • m10

        protected double m10
        The first matrix element in the second row.
      • m11

        protected double m11
        The second matrix element in the second row.
      • m12

        protected double m12
        The third matrix element in the second row.
      • m13

        protected double m13
        The fourth matrix element in the second row.
      • m20

        protected double m20
        The first matrix element in the third row.
      • m21

        protected double m21
        The second matrix element in the third row.
      • m22

        protected double m22
        The third matrix element in the third row.
      • m23

        protected double m23
        The fourth matrix element in the third row.
      • m30

        protected double m30
        The first matrix element in the fourth row.
      • m31

        protected double m31
        The second matrix element in the fourth row.
      • m32

        protected double m32
        The third matrix element in the fourth row.
      • m33

        protected double m33
        The fourth matrix element in the fourth row.
      • isIdentity

        protected Boolean isIdentity
        Indicates if the matrix is identity. If null the identity flag must be determined.
    • Constructor Detail

      • Matrix4d

        public Matrix4d​(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 and initializes a Matrix4f from the specified nine values.
        Parameters:
        m00 - the [0][0] element
        m01 - the [0][1] element
        m02 - the [0][2] element
        m03 - the [0][3] element
        m10 - the [1][0] element
        m11 - the [1][1] element
        m12 - the [1][2] element
        m13 - the [1][3] element
        m20 - the [2][0] element
        m21 - the [2][1] element
        m22 - the [2][2] element
        m23 - the [2][3] element
        m30 - the [3][0] element
        m31 - the [3][1] element
        m32 - the [3][2] element
        m33 - the [3][3] element
      • Matrix4d

        public Matrix4d​(double[] v)
        Constructs and initializes a Matrix4f from the specified sixteen- element array.
        Parameters:
        v - the array of length 16 containing in order
      • Matrix4d

        public Matrix4d​(Matrix4d matrix)
        Constructs a new matrix with the same values as the Matrix4f parameter.
        Parameters:
        matrix - the source matrix
      • Matrix4d

        public Matrix4d()
        Constructs and initializes a Matrix4f to all zeros.
    • Method Detail

      • toString

        @Pure
        public String toString()
        Returns a string that contains the values of this Matrix4f.
        Overrides:
        toString in class Object
        Returns:
        the String representation
      • setIdentity

        public final void setIdentity()
        Sets this Matrix4f to identity.
      • setElement

        public final void setElement​(int row,
                                     int column,
                                     double value)
        Sets the specified element of this matrix3. 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
      • getElement

        @Pure
        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.
      • 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
      • 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
      • setRow

        public final void setRow​(int row,
                                 double value1,
                                 double value2,
                                 double value3,
                                 double value4)
        Sets the specified row of this Matrix4f to the 4 values provided.
        Parameters:
        row - the row number to be modified (zero indexed)
        value1 - the first column element
        value2 - the second column element
        value3 - the third column element
        value4 - the fourth column element
      • setRow

        public final void setRow​(int row,
                                 double[] v)
        Sets the specified row of this Matrix4f to the three values provided.
        Parameters:
        row - the row number to be modified (zero indexed)
        v - the replacement row
      • setColumn

        public final void setColumn​(int column,
                                    double value1,
                                    double value2,
                                    double value3,
                                    double value4)
        Sets the specified column of this Matrix4f to the three values provided.
        Parameters:
        column - the column number to be modified (zero indexed)
        value1 - the first row element
        value2 - the second row element
        value3 - the third row element
        value4 - the fourth row element
      • setColumn

        public final void setColumn​(int column,
                                    double[] v)
        Sets the specified column of this Matrix4f to the three values provided.
        Parameters:
        column - the column number to be modified (zero indexed)
        v - the replacement column
      • 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,
                              Matrix4d matrix)
        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
        matrix - the original matrix values
      • add

        public final void add​(Matrix4d matrix1,
                              Matrix4d matrix2)
        Sets the value of this matrix to the matrix sum of matrices m1 and m2.
        Parameters:
        matrix1 - the first matrix
        matrix2 - the second matrix
      • add

        public final void add​(Matrix4d matrix)
        Sets the value of this matrix to the sum of itself and matrix m1.
        Parameters:
        matrix - the other matrix
      • sub

        public final void sub​(Matrix4d matrix1,
                              Matrix4d matrix2)
        Sets the value of this matrix to the matrix difference of matrices m1 and m2.
        Parameters:
        matrix1 - the first matrix
        matrix2 - the second matrix
      • sub

        public final void sub​(Matrix4d matrix)
        Sets the value of this matrix to the matrix difference of itself and matrix m1 (this = this - m1).
        Parameters:
        matrix - the other matrix
      • transpose

        public final void transpose()
        Sets the value of this matrix to its transpose.
      • transpose

        public final void transpose​(Matrix4d m1)
        Sets the value of this matrix to the transpose of the argument matrix.
        Parameters:
        m1 - the matrix to be transposed
      • set

        public final void set​(Matrix4d matrix)
        Sets the value of this matrix to the double value of the Matrix3. argument.
        Parameters:
        matrix - the Matrix4f to be converted to double
      • set

        public final void set​(double[] matrix)
        Sets the values in this Matrix4f equal to the row-major array parameter (ie, the first four elements of the array will be copied into the first row of this matrix, etc.).
        Parameters:
        matrix - the double precision array of length 16
      • set

        public void set​(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)
        Set the components of the matrix.
        Parameters:
        m00 - the [0][0] element
        m01 - the [0][1] element
        m02 - the [0][2] element
        m03 - the [0][3] element
        m10 - the [1][0] element
        m11 - the [1][1] element
        m12 - the [1][2] element
        m13 - the [1][3] element
        m20 - the [2][0] element
        m21 - the [2][1] element
        m22 - the [2][2] element
        m23 - the [2][3] element
        m30 - the [3][0] element
        m31 - the [3][1] element
        m32 - the [3][2] element
        m33 - the [3][3] element
      • determinant

        @Pure
        public final double determinant()
        Computes the determinant of this matrix.
        Returns:
        the determinant of the matrix
      • 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,
                              Matrix4d matrix)
        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
        matrix - the original matrix
      • mul

        public final void mul​(Matrix4d matrix)
        Sets the value of this matrix to the result of multiplying itself with matrix m1.
        Parameters:
        matrix - the other matrix
      • mul

        public final void mul​(Matrix4d matrix1,
                              Matrix4d matrix2)
        Sets the value of this matrix to the result of multiplying the two argument matrices together.
        Parameters:
        matrix1 - the first matrix
        matrix2 - the second matrix
      • equals

        @Pure
        public boolean equals​(Matrix4d matrix)
        Returns true if all of the data members of Matrix4f m1 are equal to the corresponding data members in this Matrix4f.
        Parameters:
        matrix - the matrix with which the comparison is made
        Returns:
        true or false
      • equals

        @Pure
        public boolean equals​(Object t1)
        Returns true if the Object t1 is of type Matrix4f and all of the data members of t1 are equal to the corresponding data members in this Matrix4f.
        Overrides:
        equals in class Object
        Parameters:
        t1 - the matrix with which the comparison is made
        Returns:
        true or false
      • epsilonEquals

        @Pure
        public boolean epsilonEquals​(Matrix4d matrix,
                                     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, 3 ; j=0, 1, 2, 3 ; abs(this.m(i, j) - m1.m(i, j)]
        Parameters:
        matrix - the matrix to be compared to this matrix
        epsilon - the threshold value
        Returns:
        true if this matrix is equals to the specified matrix at epsilon.
      • hashCode

        @Pure
        public int hashCode()
        Returns a hash code value based on the data values in this object. Two different Matrix4f objects with identical data values (i.e., Matrix4f.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 Object
        Returns:
        the integer hash code value
      • setZero

        public final void setZero()
        Sets this matrix to all zeros.
      • setDiagonal

        public final void setDiagonal​(double m00,
                                      double m11,
                                      double m22,
                                      double m33)
        Sets this matrix as diagonal.
        Parameters:
        m00 - the first element of the diagonal
        m11 - the second element of the diagonal
        m22 - the third element of the diagonal
        m33 - the fourth element of the diagonal
      • negate

        public final void negate()
        Negates the value of this matrix: this = -this.
      • negate

        public final void negate​(Matrix4d matrix)
        Sets the value of this matrix equal to the negation of of the Matrix4f parameter.
        Parameters:
        matrix - the source matrix
      • clone

        @Pure
        public Matrix4d clone()
        Creates a new object of the same class as this object.
        Overrides:
        clone in class Object
        Returns:
        a clone of this instance.
        Throws:
        OutOfMemoryError - if there is not enough memory.
        See Also:
        Cloneable
      • getM00

        @Pure
        public final double getM00()
        Get the first matrix element in the first row.
        Returns:
        Returns the m00.
      • setM00

        public final void setM00​(double m00)
        Set the first matrix element in the first row.
        Parameters:
        m00 - The m00 to set.
      • getM01

        @Pure
        public final double getM01()
        Get the second matrix element in the first row.
        Returns:
        Returns the m01.
      • setM01

        public final void setM01​(double m01)
        Set the second matrix element in the first row.
        Parameters:
        m01 - The m01 to set.
      • getM02

        @Pure
        public final double getM02()
        Get the third matrix element in the first row.
        Returns:
        Returns the m02.
      • setM02

        public final void setM02​(double m02)
        Set the third matrix element in the first row.
        Parameters:
        m02 - The m02 to set.
      • getM03

        @Pure
        public final double getM03()
        Get the fourth matrix element in the first row.
        Returns:
        Returns the m03.
      • setM03

        public final void setM03​(double m03)
        Set the fourth matrix element in the first row.
        Parameters:
        m03 - The m03 to set.
      • getM10

        @Pure
        public final double getM10()
        Get first matrix element in the second row.
        Returns:
        Returns the m10
      • setM10

        public final void setM10​(double m10)
        Set first matrix element in the second row.
        Parameters:
        m10 - The m10 to set.
      • getM11

        @Pure
        public final double getM11()
        Get second matrix element in the second row.
        Returns:
        Returns the m11.
      • setM11

        public final void setM11​(double m11)
        Set the second matrix element in the second row.
        Parameters:
        m11 - The m11 to set.
      • getM12

        @Pure
        public final double getM12()
        Get the third matrix element in the second row.
        Returns:
        Returns the m12.
      • setM12

        public final void setM12​(double m12)
        Set the third matrix element in the second row.
        Parameters:
        m12 - The m12 to set.
      • getM13

        @Pure
        public final double getM13()
        Get the fourth matrix element in the second row.
        Returns:
        Returns the m13.
      • setM13

        public final void setM13​(double m13)
        Set the fourth matrix element in the second row.
        Parameters:
        m13 - The m13 to set.
      • getM20

        @Pure
        public final double getM20()
        Get the first matrix element in the third row.
        Returns:
        Returns the m20
      • setM20

        public final void setM20​(double m20)
        Set the first matrix element in the third row.
        Parameters:
        m20 - The m20 to set.
      • getM21

        @Pure
        public final double getM21()
        Get the second matrix element in the third row.
        Returns:
        Returns the m21.
      • setM21

        public final void setM21​(double m21)
        Set the second matrix element in the third row.
        Parameters:
        m21 - The m21 to set.
      • getM22

        @Pure
        public final double getM22()
        Get the third matrix element in the third row .
        Returns:
        Returns the m22.
      • setM22

        public final void setM22​(double m22)
        Set the third matrix element in the third row.
        Parameters:
        m22 - The m22 to set.
      • getM23

        @Pure
        public final double getM23()
        Get the fourth matrix element in the third row .
        Returns:
        Returns the m23.
      • setM23

        public final void setM23​(double m23)
        Set the fourth matrix element in the third row.
        Parameters:
        m23 - The m23 to set.
      • getM30

        @Pure
        public final double getM30()
        Get the first matrix element in the fourth row.
        Returns:
        Returns the m30
      • setM30

        public final void setM30​(double m30)
        Set the first matrix element in the fourth row.
        Parameters:
        m30 - The m30 to set.
      • getM31

        @Pure
        public final double getM31()
        Get the second matrix element in the fourth row.
        Returns:
        Returns the m31.
      • setM31

        public final void setM31​(double m31)
        Set the second matrix element in the fourth row.
        Parameters:
        m31 - The m31 to set.
      • getM32

        @Pure
        public final double getM32()
        Get the third matrix element in the fourth row .
        Returns:
        Returns the m32.
      • setM32

        public final void setM32​(double m32)
        Set the third matrix element in the fourth row.
        Parameters:
        m32 - The m32 to set.
      • getM33

        @Pure
        public final double getM33()
        Get the fourth matrix element in the fourth row .
        Returns:
        Returns the m33.
      • setM33

        public final void setM33​(double m33)
        Set the fourth matrix element in the fourth row.
        Parameters:
        m33 - The m33 to set.
      • isSymmetric

        @Pure
        public boolean isSymmetric()
        Replies if the matrix is symmetric.
        Returns:
        true if the matrix is symmetric, otherwise false
      • operator_add

        public void operator_add​(Matrix4d matrix)
        Add the given matrix to this matrix: this += matrix.

        This function is an implementation of the operator for the languages that defined or based on the Xtext framework.

        Parameters:
        matrix - the matrix.
        See Also:
        add(Matrix4d)
      • operator_add

        public void operator_add​(double scalar)
        Add the given scalar to this matrix: this += scalar.

        This function is an implementation of the operator for the languages that defined or based on the Xtext framework.

        Parameters:
        scalar - the scalar.
        See Also:
        add(double)
      • operator_remove

        public void operator_remove​(Matrix4d matrix)
        Substract the given matrix to this matrix: this -= matrix.

        This function is an implementation of the operator for the languages that defined or based on the Xtext framework.

        Parameters:
        matrix - the matrix.
        See Also:
        sub(Matrix4d)
      • operator_remove

        public void operator_remove​(double scalar)
        Substract the given scalar to this matrix: this -= scalar.

        This function is an implementation of the operator for the languages that defined or based on the Xtext framework.

        Parameters:
        scalar - the scalar.
        See Also:
        add(double)
      • operator_plus

        @Pure
        public Matrix4d operator_plus​(Matrix4d matrix)
        Replies the addition of the given matrix to this matrix: this + matrix.

        This function is an implementation of the operator for the languages that defined or based on the Xtext framework.

        Parameters:
        matrix - the matrix.
        Returns:
        the sum of the matrices.
        See Also:
        add(Matrix4d)
      • operator_minus

        @Pure
        public Matrix4d operator_minus​(Matrix4d matrix)
        Replies the substraction of the given matrix to this matrix: this - matrix.

        This function is an implementation of the operator for the languages that defined or based on the Xtext framework.

        Parameters:
        matrix - the matrix.
        Returns:
        the result of the substraction.
        See Also:
        sub(Matrix4d)
      • operator_minus

        @Pure
        public Matrix4d operator_minus()
        Replies the negation of this matrix: -this.

        This function is an implementation of the operator for the languages that defined or based on the Xtext framework.

        Returns:
        the negation of this matrix.
        See Also:
        negate()
      • operator_multiply

        @Pure
        public Matrix4d operator_multiply​(Matrix4d matrix)
        Replies the multiplication of the given matrix and this matrix: this * matrix.

        This function is an implementation of the operator for the languages that defined or based on the Xtext framework.

        Parameters:
        matrix - the matrix.
        Returns:
        the multiplication of the matrices.
        See Also:
        mul(Matrix4d)
      • operator_plusPlus

        public void operator_plusPlus()
        Increment this matrix: this++.

        This function is an implementation of the operator for the languages that defined or based on the Xtext framework.

        See Also:
        add(double)
      • operator_moinsMoins

        public void operator_moinsMoins()
        Increment this matrix: this--.

        This function is an implementation of the operator for the languages that defined or based on the Xtext framework.

        See Also:
        add(double)
      • operator_not

        public Matrix4d operator_not()
        Replies the transposition of this matrix: !this.

        This function is an implementation of the operator for the languages that defined or based on the Xtext framework.

        Returns:
        the transpose
        See Also:
        add(double)
      • $plus

        @Pure
        public Matrix4d $plus​(Matrix4d matrix)
        Replies the addition of the given matrix to this matrix: this + matrix.

        This function is an implementation of the operator for the Scala Language.

        Parameters:
        matrix - the matrix.
        Returns:
        the sum of the matrices.
        See Also:
        add(Matrix4d)
      • $minus

        @Pure
        public Matrix4d $minus​(Matrix4d matrix)
        Replies the substraction of the given matrix to this matrix: this - matrix.

        This function is an implementation of the operator for the Scala Language.

        Parameters:
        matrix - the matrix.
        Returns:
        the result of the substraction.
        See Also:
        sub(Matrix4d)
      • $minus

        @Pure
        public Matrix4d $minus()
        Replies the negation of this matrix: -this.

        This function is an implementation of the operator for the Scala Language.

        Returns:
        the negation of this matrix.
        See Also:
        negate()
      • $times

        @Pure
        public Matrix4d $times​(Matrix4d matrix)
        Replies the multiplication of the given matrix and this matrix: this * matrix.

        This function is an implementation of the operator for the Scala Language.

        Parameters:
        matrix - the matrix.
        Returns:
        the multiplication of the matrices.
        See Also:
        mul(Matrix4d)
      • $bang

        @Pure
        public Matrix4d $bang()
        Replies the transposition of this matrix: !this.

        This function is an implementation of the operator for the Scala Language.

        Returns:
        the transpose
        See Also:
        add(double)