Skip to content

Matrix4f

IsaacShelton edited this page Nov 13, 2022 · 6 revisions

Matrix4f

Matrix4f represents the type of a 4x4 float matrix.

Specifications

Type Size Memory Management Model File
Matrix4f 64 bytes None 2.7/Matrix4f.adept

Definition

struct Matrix4f (array 16 float)

Fields

Name Type Description
array 16 float Values of elements, left to right, top to bottom

Methods

  • func zero(this *Matrix4f) void

    Sets all elements of matrix to 0.0f.

    [view src]

  • func identity(this *Matrix4f) void

    Sets matrix to the identity matrix.

    [view src]

  • func identity(this *Matrix4f, scale float) void

    Sets matrix to a scaled identity matrix.

    [view src]

  • func transpose(this *Matrix4f) void

    Sets a matrix to its transpose.

    [view src]

  • func determinant(this *Matrix4f) float

    Computes a matrix's determinant.

    [view src]

  • func inverse(this *Matrix4f) void

    Sets a matrix to its inverse if possible.

    [view src]

  • func toRotationMatrix(this *Matrix4f) void

    Converts a matrix to a rotation matrix.

    [view src]

  • func multiply(this *Matrix4f, other Matrix4f) void

    Multiplies a matrix by another matrix.

    [view src]

  • func translate(this *Matrix4f, x, y, z float) void

    Translates a matrix.

    [view src]

  • func translate(this *Matrix4f, xyz Vector3f) void

    Translates a matrix.

    [view src]

  • func translateFromIdentity(this *Matrix4f, x, y, z float) void

    Translates a matrix after setting it to the identity matrix.

    [view src]

  • func translateFromIdentity(this *Matrix4f, xyz Vector3f) void

    Translates a matrix after setting it to the identity matrix.

    [view src]

  • func scale(this *Matrix4f, x, y, z float) void

    Scales a matrix.

    [view src]

  • func scale(this *Matrix4f, xyz Vector3f) void

    Scales a matrix.

    [view src]

  • func scaleFromIdentity(this *Matrix4f, x, y, z float) void

    Scales a matrix after setting it to the identity matrix.

    [view src]

  • func scaleFromIdentity(this *Matrix4f, xyz Vector3f) void

    Scales a matrix after setting it to the identity matrix.

    [view src]

  • func rotate(this *Matrix4f, angle, x, y, z float) void

    Rotates a matrix by angle in radians.

    [view src]

  • func rotate(this *Matrix4f, angle float, axis Vector3f) void

    Rotates a matrix by angle in radians.

    [view src]

  • func rotateFromIdentity(this *Matrix4f, angle, x, y, z float) void

    Rotates a matrix by angle in radians after setting it to the identity matrix.

    [view src]

  • func rotateFromIdentity(this *Matrix4f, angle float, axis Vector3f) void

    Rotates a matrix by angle in radians after setting it to the identity matrix.

    [view src]

  • func frustum(this *Matrix4f, left, right, bottom, top, near, far float) void

    Sets a matrix to a perspective matrix from a frustum.

    [view src]

  • func perspective(this *Matrix4f, fovy, aspect, near, far float) void

    Sets a matrix to a perspective matrix.

    [view src]

  • func ortho(this *Matrix4f, left, right, bottom, top, near, far float) void

    Sets a matrix to an orthographic matrix.

    [view src]

  • func lookAt(this *Matrix4f, eye Vector3f, center Vector3f, up Vector3f) void

    Sets a matrix to a perspective matrix via lookAt.

    [view src]

  • func toString(this *Matrix4f) String

    Converts a matrix to a String

    [view src]

  • func print(this *Matrix4f) void

    Prints a matrix to stdout

    [view src]

Clone this wiki locally