A 4x4 matrix wrapper around Mat4Tools.

Constructors

  • Construct a new Mat4 object. It safely wraps a WasmMatrix4d object.

    Parameters

    Returns Mat4

Accessors

  • get clone(): Mat4
  • clone the matrix.

    Returns Mat4

  • get rotation(): Mat4
  • Get the rotation.

    Returns Mat4

  • get scale(): Mat4
  • Get the scale.

    Returns Mat4

  • get translation(): Vec3
  • Get translation.

    Returns Vec3

  • set translation(theTranslation: WasmVector3d): void
  • Set translation.

    Parameters

    Returns void

Methods

  • Invert the matrix.

    Returns this

  • Is right handed

    Returns boolean

  • Check if matrix is valid.

    Returns boolean

  • Rotate around axis

    Parameters

    Returns this

    the rotated matrix

  • Apply rotation matrix around rotation center

    Parameters

    Returns this

  • Transpose the matrix.

    Returns this

  • Extract a matrix from a Mat4 or WasmMatrix4d object.

    Parameters

    • theMatrix: any

    Returns WasmMatrix4d