igeo

## Class IMatrix4

- java.lang.Object
- - igeo.IMatrix
  - - igeo.IMatrix4

- All Implemented Interfaces:
    IMatrix4I, IMatrix4Op, IMatrixI, IMatrixOp, IParameter, IVal

      public class IMatrix4
      extends IMatrix
      implements IMatrix4I

  Class of 4x4 numerical matrix.
  Author:
    Satoru Sugihara

- - ### Field Summary

    - ### Fields inherited from class igeo.IMatrix

      `columnNum, rowNum, val`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IMatrix4()`
    `IMatrix4(double v11, double v12, double v13, double v14, double v21, double v22, double v23, double v24, double v31, double v32, double v33, double v34, double v41, double v42, double v43, double v44)`
    `IMatrix4(IMatrix3 m, IVec t)`
    `IMatrix4(IMatrix4 m)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static IMatrix4` | `convertCoordinates(IVec xvec1, IVec yvec1, IVec zvec1, IVec orig1, IVec xvec2, IVec yvec2, IVec zvec2, IVec orig2)`
    `IMatrix4` | `cp()` alias of dup()
    `double` | `determinant()`
    `static double` | `determinant(double v00, double v01, double v02, double v03, double v10, double v11, double v12, double v13, double v20, double v21, double v22, double v23, double v30, double v31, double v32, double v33)`
    `IMatrix4` | `dup()`
    `IMatrix4` | `get()`
    `static IMatrix4` | `getAlignmentOnPlane(IVec trianglePt1, IVec trianglePt2, IVec trianglePt3, IVec planePt1, IVec planePt2, IVec planePt3)`
    `IMatrix3` | `getMatrix3()` alias of matrix3()
    `static IMatrix4` | `getRotation(IVec axis, double angle)`
    `static IMatrix4` | `getScale(double scale)`
    `static IMatrix4` | `getTransform(IVec xvector, IVec yvector, IVec zvector, IVec translate)`
    `static IMatrix4` | `getTranslate(double x, double y, double z)`
    `static IMatrix4` | `getTranslate(IVec p)`
    `IVec` | `getTranslateVector()` alias of translate()
    `static IMatrix4` | `getXRotation(double angle)`
    `static IMatrix4` | `getYRotation(double angle)`
    `static IMatrix4` | `getZRotation(double angle)`
    `IMatrix4` | `invert()`
    `IMatrix3` | `matrix3()` get matrix without translation part
    `IMatrix4` | `mul(IMatrix4 m)` m is applied from right side and update the content of this without creating new instance.
    `IMatrix4` | `mul(IMatrix4I m)`
    `IVec` | `mul(IVec v)` vector is treated as vertical vector
    `IVec4` | `mul(IVec4 v)` vector is treated as vertical vector
    `IVec4` | `mul(IVec4I v)` vector is treated as vertical vector
    `IVec` | `mul(IVecI v)` vector is treated as vertical vector
    `IMatrix4` | `set(double v11, double v12, double v13, double v14, double v21, double v22, double v23, double v24, double v31, double v32, double v33, double v34, double v41, double v42, double v43, double v44)`
    `IMatrix4` | `set(IDoubleI v11, IDoubleI v12, IDoubleI v13, IDoubleI v14, IDoubleI v21, IDoubleI v22, IDoubleI v23, IDoubleI v24, IDoubleI v31, IDoubleI v32, IDoubleI v33, IDoubleI v34, IDoubleI v41, IDoubleI v42, IDoubleI v43, IDoubleI v44)`
    `IVec` | `transform(IVecI v)` applying transformation matrix to 3D vector
    `IVec` | `translate()` get only translate vector

    - ### Methods inherited from class igeo.IMatrix

      `add, add, columnNum, columnNum, columnNum, det, determinant, determinant, div, div, get, get, get, id, mul, mul, mul, mul, rowNum, rowNum, rowNum, set, set, set, set, set, set, setId, setRange, setZero, sub, sub, toArray, toArray, toString, zero`

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface igeo.IMatrixI

      `add, columnNum, columnNum, columnNum, determinant, determinant, div, div, get, get, get, mul, mul, mul, rowNum, rowNum, rowNum, set, set, set, set, set, setId, setZero, sub`

- - ### Constructor Detail

    - #### IMatrix4

          public IMatrix4()

    - #### IMatrix4

          public IMatrix4(double v11,
                  double v12,
                  double v13,
                  double v14,
                  double v21,
                  double v22,
                  double v23,
                  double v24,
                  double v31,
                  double v32,
                  double v33,
                  double v34,
                  double v41,
                  double v42,
                  double v43,
                  double v44)

    - #### IMatrix4

          public IMatrix4(IMatrix4 m)

    - #### IMatrix4

          public IMatrix4(IMatrix3 m,
                  IVec t)

  - ### Method Detail

    - #### get

          public IMatrix4 get()

      Specified by:
        `get` in interface `IMatrix4I`
      Specified by:
        `get` in interface `IMatrix4Op`
      Specified by:
        `get` in interface `IMatrixOp`
      Specified by:
        `get` in interface `IParameter`
      Overrides:
        `get` in class `IMatrix`

    - #### set

          public IMatrix4 set(double v11,
                     double v12,
                     double v13,
                     double v14,
                     double v21,
                     double v22,
                     double v23,
                     double v24,
                     double v31,
                     double v32,
                     double v33,
                     double v34,
                     double v41,
                     double v42,
                     double v43,
                     double v44)

      Specified by:
        `set` in interface `IMatrix4I`

    - #### set

          public IMatrix4 set(IDoubleI v11,
                     IDoubleI v12,
                     IDoubleI v13,
                     IDoubleI v14,
                     IDoubleI v21,
                     IDoubleI v22,
                     IDoubleI v23,
                     IDoubleI v24,
                     IDoubleI v31,
                     IDoubleI v32,
                     IDoubleI v33,
                     IDoubleI v34,
                     IDoubleI v41,
                     IDoubleI v42,
                     IDoubleI v43,
                     IDoubleI v44)

      Specified by:
        `set` in interface `IMatrix4I`

    - #### dup

          public IMatrix4 dup()

      Specified by:
        `dup` in interface `IMatrix4I`
      Specified by:
        `dup` in interface `IMatrixI`
      Overrides:
        `dup` in class `IMatrix`

    - #### cp

          public IMatrix4 cp()

      Description copied from interface: `IMatrixI`
      alias of dup()
      Specified by:
        `cp` in interface `IMatrix4I`
      Specified by:
        `cp` in interface `IMatrixI`
      Overrides:
        `cp` in class `IMatrix`

    - #### determinant

          public double determinant()

      Specified by:
        `determinant` in interface `IMatrixI`
      Overrides:
        `determinant` in class `IMatrix`

    - #### determinant

          public static double determinant(double v00,
                           double v01,
                           double v02,
                           double v03,
                           double v10,
                           double v11,
                           double v12,
                           double v13,
                           double v20,
                           double v21,
                           double v22,
                           double v23,
                           double v30,
                           double v31,
                           double v32,
                           double v33)

    - #### invert

          public IMatrix4 invert()

      Specified by:
        `invert` in interface `IMatrixI`
      Overrides:
        `invert` in class `IMatrix`

    - #### mul

          public IMatrix4 mul(IMatrix4 m)

      m is applied from right side and update the content of this without creating new instance. it returns itself.

    - #### mul

          public IMatrix4 mul(IMatrix4I m)

      Specified by:
        `mul` in interface `IMatrix4I`

    - #### mul

          public IVec4 mul(IVec4I v)

      vector is treated as vertical vector
      Specified by:
        `mul` in interface `IMatrix4I`

    - #### mul

          public IVec4 mul(IVec4 v)

      vector is treated as vertical vector

    - #### mul

          public IVec mul(IVecI v)

      vector is treated as vertical vector
      Specified by:
        `mul` in interface `IMatrix4I`

    - #### mul

          public IVec mul(IVec v)

      vector is treated as vertical vector

    - #### transform

          public IVec transform(IVecI v)

      applying transformation matrix to 3D vector
      Specified by:
        `transform` in interface `IMatrix4I`

    - #### matrix3

          public IMatrix3 matrix3()

      get matrix without translation part
      Specified by:
        `matrix3` in interface `IMatrix4I`

    - #### getMatrix3

          public IMatrix3 getMatrix3()

      alias of matrix3()

    - #### translate

          public IVec translate()

      get only translate vector
      Specified by:
        `translate` in interface `IMatrix4I`

    - #### getTranslateVector

          public IVec getTranslateVector()

      alias of translate()

    - #### getXRotation

          public static IMatrix4 getXRotation(double angle)

    - #### getYRotation

          public static IMatrix4 getYRotation(double angle)

    - #### getZRotation

          public static IMatrix4 getZRotation(double angle)

    - #### getRotation

          public static IMatrix4 getRotation(IVec axis,
                             double angle)

    - #### getScale

          public static IMatrix4 getScale(double scale)

    - #### getTranslate

          public static IMatrix4 getTranslate(double x,
                              double y,
                              double z)

    - #### getTranslate

          public static IMatrix4 getTranslate(IVec p)

    - #### getTransform

          public static IMatrix4 getTransform(IVec xvector,
                              IVec yvector,
                              IVec zvector,
                              IVec translate)

    - #### convertCoordinates

          public static IMatrix4 convertCoordinates(IVec xvec1,
                                    IVec yvec1,
                                    IVec zvec1,
                                    IVec orig1,
                                    IVec xvec2,
                                    IVec yvec2,
                                    IVec zvec2,
                                    IVec orig2)

    - #### getAlignmentOnPlane

          public static IMatrix4 getAlignmentOnPlane(IVec trianglePt1,
                                     IVec trianglePt2,
                                     IVec trianglePt3,
                                     IVec planePt1,
                                     IVec planePt2,
                                     IVec planePt3)