Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Matrix4x4

4x4 Matrix of single-precision float numbers.

Values are stored in column major order.

Hierarchy

  • Matrix4x4

Implements

Index

Constructors

constructor

  • new Matrix4x4(m11: number, m21: number, m31: number, m41: number, m12: number, m22: number, m32: number, m42: number, m13: number, m23: number, m33: number, m43: number, m14: number, m24: number, m34: number, m44: number): Matrix4x4
  • Parameters

    • m11: number
    • m21: number
    • m31: number
    • m41: number
    • m12: number
    • m22: number
    • m32: number
    • m42: number
    • m13: number
    • m23: number
    • m33: number
    • m43: number
    • m14: number
    • m24: number
    • m34: number
    • m44: number

    Returns Matrix4x4

Properties

Protected _values

_values: Float32Array

Accessors

values

  • get values(): Float32Array
  • Values of the matrix, that is stored in column major order.

    Returns Float32Array

Methods

mulByMatrix4

mulByMatrix4x4

  • Multiply by other matrix and returns a product.

    This method does not mutate the matrix.

    Parameters

    Returns Matrix4x4

rotateAround

  • Rotate the matrix around the normalizedAxis and return new Matrix4x4.

    This method does not mutate the matrix.

    Parameters

    Returns Matrix4x4

rotateX

  • Rotate the matrix around x-axis and returns new Matrix4x4.

    This method does not mutate the matrix.

    Parameters

    • radian: number

    Returns Matrix4x4

rotateY

  • Rotate the matrix around y-axis and returns new Matrix4x4.

    This method does not mutate the matrix.

    Parameters

    • radian: number

    Returns Matrix4x4

rotateZ

  • Rotate the matrix around z-axis and returns new Matrix4x4.

    This method does not mutate the matrix.

    Parameters

    • radian: number

    Returns Matrix4x4

scale

  • scale(sx: number, sy: number, sz: number): Matrix4x4
  • Scale the matrix and returns new Matrix4x4.

    Parameters

    • sx: number
    • sy: number
    • sz: number

    Returns Matrix4x4

toString

  • toString(): string

translate

  • translate(tx: number, ty: number, tz: number): Matrix4x4
  • Translate the matrix and returns new Matrix4x4.

    This method does not mutate the matrix.

    Parameters

    • tx: number
    • ty: number
    • tz: number

    Returns Matrix4x4

Static frustum

  • frustum(argsObject: { bottom: number; far: number; left: number; near: number; right: number; top: number }): Matrix4x4
  • Returns a frustrum projection matrix.

    Parameters

    • argsObject: { bottom: number; far: number; left: number; near: number; right: number; top: number }
      • bottom: number
      • far: number
      • left: number
      • near: number
      • right: number
      • top: number

    Returns Matrix4x4

Static identity

Static lookAt

Static orthographic

  • orthographic(argsObject: { bottom: number; far: number; left: number; near: number; right: number; top: number }): Matrix4x4
  • Returns an orthographic projection matrix.

    Parameters

    • argsObject: { bottom: number; far: number; left: number; near: number; right: number; top: number }
      • bottom: number
      • far: number
      • left: number
      • near: number
      • right: number
      • top: number

    Returns Matrix4x4

Static perspective

  • perspective(argsObject: { aspectRatio: number; far: number; fovYRadian: number; near: number }): Matrix4x4
  • Returns a perspective projection matrix.

    Parameters

    • argsObject: { aspectRatio: number; far: number; fovYRadian: number; near: number }
      • aspectRatio: number
      • far: number
      • fovYRadian: number
      • near: number

    Returns Matrix4x4

Static rotationAround

Static rotationX

Static rotationY

Static rotationZ

Static scaling

  • scaling(sx: number, sy: number, sz: number): Matrix4x4

Static translation

  • translation(tx: number, ty: number, tz: number): Matrix4x4
  • Returns translation matrix.

    Parameters

    • tx: number
    • ty: number
    • tz: number

    Returns Matrix4x4

Generated using TypeDoc