Preparing search index...

    4x4 matrix used for 3D transformations including rotation, scale, translation, and projection.

    Index

    Constructors

    • Constructs a new identity mat4.

      Returns mat4

    Properties

    column0: vec4

    First column of the matrix as a vec4.

    column1: vec4

    Second column of the matrix as a vec4.

    column2: vec4

    Third column of the matrix as a vec4.

    column3: vec4

    Fourth column of the matrix as a vec4.

    description: string

    Returns a string representation of the matrix.

    Methods

    • Adds another mat4 to this matrix and returns the result.

      Parameters

      Returns mat4

    • Performs component-wise multiplication of two mat4 matrices and returns the result.

      Parameters

      Returns mat4

    • Constructs a mat4 from translation, rotation quaternion, and scale components.

      Parameters

      Returns mat4

    • Returns the scalar determinant of this matrix.

      Returns number

    • Divides this matrix by another mat4 element-wise and returns the result.

      Parameters

      Returns mat4

    • Returns true if this matrix equals the given mat4.

      Parameters

      Returns boolean

    • Extracts and returns the Euler angles as a vec3 from this matrix.

      Returns vec3

    • Creates a mat4 rotation matrix from Euler angles in radians.

      Parameters

      Returns mat4

    • Creates a mat4 rotation matrix for a rotation around the X axis.

      Parameters

      • angle: number

      Returns mat4

    • Creates a mat4 rotation matrix for a rotation around the Y axis.

      Parameters

      • angle: number

      Returns mat4

    • Creates a mat4 rotation matrix for a rotation around the Z axis.

      Parameters

      • angle: number

      Returns mat4

    • Creates a mat4 rotation matrix from a quaternion.

      Parameters

      Returns mat4

    • Creates a mat4 scale matrix from a vec3.

      Parameters

      Returns mat4

    • Creates a mat4 translation matrix from a vec3.

      Parameters

      Returns mat4

    • Returns a mat4 identity matrix.

      Returns mat4

    • Returns the inverse of this matrix.

      Returns mat4

    • Creates a view matrix that orients toward a target from an eye position.

      Parameters

      Returns mat4

    • Multiplies this matrix by another mat4 and returns the result.

      Parameters

      Returns mat4

    • Transforms a direction vector by this matrix, ignoring translation.

      Parameters

      Returns vec3

    • Transforms a point by this matrix, applying translation.

      Parameters

      Returns vec3

    • Multiplies this matrix by a scalar value and returns the result.

      Parameters

      • scalar: number

      Returns mat4

    • Multiplies this matrix by a vec4 and returns the result.

      Parameters

      Returns vec4

    • Creates an orthographic projection matrix.

      Parameters

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

      Returns mat4

    • Computes the outer product of two vec4 vectors and returns the resulting mat4.

      Parameters

      Returns mat4

    • Creates a perspective projection matrix.

      Parameters

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

      Returns mat4

    • Subtracts another mat4 from this matrix and returns the result.

      Parameters

      Returns mat4

    • Returns a string representation of this matrix.

      Returns string

    • Returns the transpose of this matrix.

      Returns mat4

    • Returns a mat4 with all elements set to zero.

      Returns mat4