Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "math/Matrixes4"

Index

Functions

inverse

  • inverse(matrix: Array<number>): Array<number>
  • Computes the inverse of a matrix.

    Parameters

    • matrix: Array<number>

      matrix to compute inverse of.

    Returns Array<number>

    new result matrix.

multiply

  • multiply(matrix1: Array<number>, matrix2: Array<number>): Array<number>
  • Returns multiply of two matrixes.

    Parameters

    • matrix1: Array<number>
    • matrix2: Array<number>

    Returns Array<number>

multiplyScalar

  • multiplyScalar(matrix: Array<number>, scalar: number): Array<number>
  • Multiply matrix on scalar

    Parameters

    • matrix: Array<number>
    • scalar: number

      a number which will multiply matrix

    Returns Array<number>

multiplyVector4

  • multiplyVector4(matrix: Array<number>, vector4: Array<number>): Array<number>
  • Parameters

    • matrix: Array<number>
    • vector4: Array<number>

    Returns Array<number>

perspective

  • perspective(fieldOfViewInRadians: number, width: number, height: number, near: number, far: number): Array<number>
  • Setting this matrix as perspective projection matrix.

    Parameters

    • fieldOfViewInRadians: number

      fieldOfView of camera.

    • width: number

      canvas width.

    • height: number

      canvas height.

    • near: number

      range of drawn z-coordinates start.

    • far: number

      range of drawn z-coordinates end.

    Returns Array<number>

projection

  • projection(width: number, height: number): number[]
  • Sets this matrix to projection matrix without perspective.

    Parameters

    • width: number
    • height: number

    Returns number[]

rotation

  • rotation(x: number, y: number, z: number): Array<number>
  • Return matrix of all three rotations

    Parameters

    • x: number

      angle

    • y: number

      angle

    • z: number

      angle

    Returns Array<number>

rotationX

  • rotationX(angle: number): Array<number>
  • Returns rotation matrix for x axis.

    Parameters

    • angle: number

    Returns Array<number>

rotationY

  • rotationY(angle: number): Array<number>
  • Returns rotation matrix for y axis.

    Parameters

    • angle: number

    Returns Array<number>

rotationZ

  • rotationZ(angle: number): Array<number>
  • Returns rotation matrix for z axis.

    Parameters

    • angle: number

    Returns Array<number>

scaling

  • scaling(x: number, y: number, z: number): Array<number>
  • Returns scaling matrix for every axis.

    Parameters

    • x: number
    • y: number
    • z: number

    Returns Array<number>

transformVector

  • transformVector(matrix: Array<number>, vector4: Array<number>): Array<number>
  • Transform vector by matrix

    Parameters

    • matrix: Array<number>
    • vector4: Array<number>

    Returns Array<number>

    vector4 [x, y, z, w]

translateX

  • translateX(matrix: number[], x: number): number[]
  • Translate matrix by X

    Parameters

    • matrix: number[]
    • x: number

    Returns number[]

translateY

  • translateY(matrix: number[], y: number): number[]
  • Translate matrix by Y

    Parameters

    • matrix: number[]
    • y: number

    Returns number[]

translateZ

  • translateZ(matrix: number[], z: number): number[]
  • Translate matrix by Z

    Parameters

    • matrix: number[]
    • z: number

    Returns number[]

translation

  • translation(x: number, y: number, z: number): Array<number>
  • Returns translation matrix.

    Parameters

    • x: number
    • y: number
    • z: number

    Returns Array<number>

transpose

  • transpose(matrix: Array<number>): Array<number>
  • Computes the transpose of a matrix.

    Parameters

    • matrix: Array<number>

      matrix to compute inverse of.

    Returns Array<number>

    new result matrix.

unit

  • unit(): Array<number>

Generated using TypeDoc