Class Matrix3

Represents a 3x3 mathematical matrix.

Hierarchy

  • Matrix3

Constructors

  • Constructor of 3*3 matrix.

    Parameters

    • m11: number = 1

      Default 1 column 1, row 1

    • m12: number = 0

      Default 0 column 1, row 2

    • m13: number = 0

      Default 0 column 1, row 3

    • m21: number = 0

      Default 0 column 2, row 1

    • m22: number = 1

      Default 1 column 2, row 2

    • m23: number = 0

      Default 0 column 2, row 3

    • m31: number = 0

      Default 0 column 3, row 1

    • m32: number = 0

      Default 0 column 3, row 2

    • m33: number = 1

      Default 1 column 3, row 3

    Returns Matrix3

Properties

elements: Float32Array = ...

An array containing the elements of the matrix (column matrix).

Remarks

elements[0] first column and first row value m11 elements[1] first column and second row value m12 elements[2] first column and third row value m13 elements[3] second column and first row value m21 and so on

Methods

  • Determines the sum of this matrix and the specified matrix.

    Returns

    This matrix that store the sum of the two matrices

    Parameters

    • right: Matrix3

      The specified matrix

    Returns Matrix3

  • Calculate a determinant of this matrix.

    Returns

    The determinant of this matrix

    Returns number

  • Determines the product of this matrix and the specified matrix.

    Returns

    This matrix that store the product of the two matrices

    Parameters

    • right: Matrix3

      The specified matrix

    Returns Matrix3

  • This matrix rotates around an angle.

    Returns

    This matrix after rotate

    Parameters

    • r: number

      The rotation angle in radians

    Returns Matrix3

  • Set the value of this matrix, and return this matrix.

    Returns

    This matrix

    Parameters

    • m11: number
    • m12: number
    • m13: number
    • m21: number
    • m22: number
    • m23: number
    • m31: number
    • m32: number
    • m33: number

    Returns Matrix3

  • Set the value of this matrix by an array.

    Returns

    This matrix

    Parameters

    • array: ArrayLike<number>

      The array

    • offset: number = 0

      The start offset of the array

    Returns Matrix3

  • Set the value of this 3x3 matrix by the specified 4x4 matrix. upper-left principle

    Returns

    This 3x3 matrix

    Parameters

    • a: Matrix4

      The specified 4x4 matrix

    Returns Matrix3

  • Determines the difference between this matrix and the specified matrix.

    Returns

    This matrix that store the difference between the two matrices

    Parameters

    • right: Matrix3

      The specified matrix

    Returns Matrix3

  • Clone the value of this matrix to an array.

    Parameters

    • out: Float32Array | Float64Array | number[]

      The array

    • outOffset: number = 0

      The start offset of the array

    Returns void

  • Determines whether the specified matrices are equals.

    Returns

    True if the specified matrices are equals, false otherwise

    Parameters

    • left: Matrix3

      The first matrix to compare

    • right: Matrix3

      The second matrix to compare

    Returns boolean

  • Calculate the inverse of the specified matrix.

    Parameters

    • a: Matrix3

      The matrix whose inverse is to be calculated

    • out: Matrix3

      The inverse of the specified matrix

    Returns void

  • Performs a linear interpolation between two matrices.

    Parameters

    • start: Matrix3

      The first matrix

    • end: Matrix3

      The second matrix

    • t: number

      The blend amount where 0 returns start and 1 end

    • out: Matrix3

      The result of linear blending between two matrices

    Returns void

  • Calculate a 3x3 normal matrix from a 4x4 matrix.

    Remarks

    The calculation process is the transpose matrix of the inverse matrix.

    Parameters

    Returns void

  • The specified matrix rotates around an angle.

    Parameters

    • a: Matrix3

      The specified matrix

    • r: number

      The rotation angle in radians

    • out: Matrix3

      The rotated matrix

    Returns void

  • Calculate a rotation matrix from a quaternion.

    Parameters

    • quaternion: Quaternion

      The quaternion used to calculate the matrix

    • out: Matrix3

      The calculated rotation matrix

    Returns void

Generated using TypeDoc