Hilo3d API - v2.0.0
    Preparing search index...

    Class Matrix4

    4x4 矩阵

    Hierarchy (View Summary)

    Index
    className: string = 'Matrix4'

    类名

    elements: mat4
    isMatrix4: boolean = true
    • Calculates the determinant of this

      Returns number

      this

    • Returns whether or not the matrices have approximately the same elements in the same position.

      Parameters

      • a: Matrix4
      • Optionalb: Matrix4

        如果不传,比较 this 和 a 是否近似相等

      Returns boolean

    • Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)

      Parameters

      • a: Matrix4
      • Optionalb: Matrix4

        如果不传,比较 this 和 a 是否相等

      Returns boolean

    • Returns Frobenius norm of a mat4

      Returns number

      Frobenius norm

    • 从数组赋值

      Parameters

      • array: ArrayLike<number>

        数组

      • offset: number = 0

        数组偏移值

      Returns this

      this

    • Creates a matrix from a given angle around a given axis

      Parameters

      • rad: number

        the angle to rotate the matrix by

      • axis: Vector3

        the axis to rotate around

      Returns this

      this

    • Creates a matrix from a quaternion rotation, vector translation and vector scale, rotating and scaling around the given origin

      Parameters

      Returns this

      this

    • Creates a matrix from a vector translation

      Parameters

      Returns this

      this

    • Creates a matrix from the given angle around the X axis

      Parameters

      • rad: number

        the angle to rotate the matrix by

      Returns this

      this

    • Creates a matrix from the given angle around the Y axis

      Parameters

      • rad: number

        the angle to rotate the matrix by

      Returns this

      this

    • Creates a matrix from the given angle around the Z axis

      Parameters

      • rad: number

        the angle to rotate the matrix by

      Returns this

      this

    • Generates a frustum matrix with the given bounds

      Parameters

      • left: number

        Left bound of the frustum

      • right: number

        Right bound of the frustum

      • bottom: number

        Bottom bound of the frustum

      • top: number

        Top bound of the frustum

      • near: number

        Near bound of the frustum

      • far: number

        Far bound of the frustum

      Returns this

      this

    • Returns a quaternion representing the rotational component of a transformation matrix. If a matrix is built with fromRotationTranslation, the returned quaternion will be the same as the quaternion originally supplied.

      Parameters

      • out: Quaternion = ...

        Quaternion to receive the rotation component

      Returns Quaternion

      out

    • Returns the scaling factor component of a transformation matrix. If a matrix is built with fromRotationTranslationScale with a normalized Quaternion paramter, the returned vector will be the same as the scaling vector originally supplied.

      Parameters

      • out: Vector3 = ...

        Vector to receive scaling factor component

      Returns Vector3

      out

    • Returns the translation vector component of a transformation matrix. If a matrix is built with fromRotationTranslation, the returned vector will be the same as the translation vector originally supplied.

      Parameters

      • out: Vector3 = ...

        Vector to receive translation component

      Returns Vector3

      out

    • Set this to the identity matrix

      Returns this

      this

    • Generates a orthogonal projection matrix with the given bounds

      Parameters

      • left: number

        Left bound of the frustum

      • right: number

        Right bound of the frustum

      • bottom: number

        Bottom bound of the frustum

      • top: number

        Top bound of the frustum

      • near: number

        Near bound of the frustum

      • far: number

        Far bound of the frustum

      Returns this

      this

    • Generates a perspective projection matrix with the given bounds

      Parameters

      • fovy: number

        Vertical field of view in radians

      • aspect: number

        Aspect ratio. typically viewport width/height

      • near: number

        Near bound of the frustum

      • far: number

        Far bound of the frustum

      Returns this

      this

    • Generates a perspective projection matrix with the given field of view.

      Parameters

      • fov: unknown

        Object containing the following values: upDegrees, downDegrees, leftDegrees, rightDegrees

      • near: number

        Near bound of the frustum

      • far: number

        Far bound of the frustum

      Returns this

      this

    • Rotates this by the given angle

      Parameters

      • rad: number

        the angle to rotate the matrix by

      • axis: Vector3

        the axis to rotate around

      Returns this

      this

    • Rotates this by the given angle around the X axis

      Parameters

      • rad: number

        the angle to rotate the matrix by

      Returns this

      this

    • Rotates this by the given angle around the Y axis

      Parameters

      • rad: number

        the angle to rotate the matrix by

      Returns this

      this

    • Rotates this by the given angle around the Z axis

      Parameters

      • rad: number

        the angle to rotate the matrix by

      Returns this

      this

    • Scales the mat3 by the dimensions in the given vec2

      Parameters

      • v: Vector3

        the vec3 to scale the matrix by

      Returns this

      this

    • Set the components of a mat3 to the given values

      Parameters

      • m00: number
      • m01: number
      • m02: number
      • m03: number
      • m10: number
      • m11: number
      • m12: number
      • m13: number
      • m20: number
      • m21: number
      • m22: number
      • m23: number
      • m30: number
      • m31: number
      • m32: number
      • m33: number

      Returns this

      this

    • Transpose the values of this

      Returns this

      this