A 4x4 (square) matrix of numbers.

An adapter for a Float32Array.

Hierarchy

Constructors

Properties

modified: boolean
one: Matrix4 = ...

The identity matrix for multiplication, 1. The matrix is locked (immutable), but may be cloned.

zero: Matrix4 = ...

The identity matrix for addition, 0. The matrix is locked (immutable), but may be cloned.

Accessors

Methods

  • Parameters

    • left: number
    • right: number
    • bottom: number
    • top: number
    • near: number
    • far: number

    Returns this

  • Parameters

    • row: number

      The zero-based row.

    • column: number

      The zero-based column.

    Returns number

  • Determines whether this Lockable is locked. If the Lockable is in the unlocked state then it is mutable. If the Lockable is in the locked state then it is immutable.

    Returns boolean

  • Determines whether this matrix is the identity matrix.

    Returns boolean

  • Locks this Lockable (preventing any further mutation), and returns a token that may be used to unlock it.

    Returns number

  • Sets this matrix to the viewing transformation. This is the matrix that may be applied to points in the truncated viewing pyramid. The resulting points then lie in the image space (cube).

    Parameters

    • fov: number
    • aspect: number
    • near: number
    • far: number

    Returns this

  • Sets this matrix to the transformation for a reflection in the plane normal to the unit vector n.

    this ⟼ reflection(n)

    Parameters

    Returns this

  • Sets this matrix to be equivalent to the spinor.

    this ⟼ rotation(spinor)

    Parameters

    • spinor: SpinorE3

      The spinor from which the rotation will be computed.

    Returns this

  • Multiplies all elements of this matrix by the specified value.

    Parameters

    • s: number

    Returns this

  • Parameters

    • n11: number
    • n12: number
    • n13: number
    • n14: number
    • n21: number
    • n22: number
    • n23: number
    • n24: number
    • n31: number
    • n32: number
    • n33: number
    • n34: number
    • n41: number
    • n42: number
    • n43: number
    • n44: number

    Returns this

  • Parameters

    • row: number

      The zero-based row.

    • column: number

      The zero-based column.

    • value: number

      The value of the element.

    Returns void

  • Sets this matrix to be equivalent to the displacement vector argument.

    Parameters

    Returns this

  • Unlocks this Lockable (allowing mutation), using a token that was obtained from a preceding lock method call.

    Parameters

    • token: number

    Returns void