-
-
Notifications
You must be signed in to change notification settings - Fork 8
Matrix4f
Matrix4f
represents the type of a 4x4 float matrix.
Type | Size | Memory Management Model | File |
---|---|---|---|
Matrix4f |
64 bytes | None | 2.7/Matrix4f.adept |
struct Matrix4f (array 16 float)
Name | Type | Description |
---|---|---|
array |
16 float |
Values of elements, left to right, top to bottom |
-
func zero(this *Matrix4f) void
Sets all elements of matrix to
0.0f
. -
func identity(this *Matrix4f) void
Sets matrix to the identity matrix.
-
func identity(this *Matrix4f, scale float) void
Sets matrix to a scaled identity matrix.
-
func transpose(this *Matrix4f) void
Sets a matrix to its transpose.
-
func determinant(this *Matrix4f) float
Computes a matrix's determinant.
-
func inverse(this *Matrix4f) void
Sets a matrix to its inverse if possible.
-
func toRotationMatrix(this *Matrix4f) void
Converts a matrix to a rotation matrix.
-
func multiply(this *Matrix4f, other Matrix4f) void
Multiplies a matrix by another matrix.
-
func translate(this *Matrix4f, x, y, z float) void
Translates a matrix.
-
func translate(this *Matrix4f, xyz Vector3f) void
Translates a matrix.
-
func translateFromIdentity(this *Matrix4f, x, y, z float) void
Translates a matrix after setting it to the identity matrix.
-
func translateFromIdentity(this *Matrix4f, xyz Vector3f) void
Translates a matrix after setting it to the identity matrix.
-
func scale(this *Matrix4f, x, y, z float) void
Scales a matrix.
-
func scale(this *Matrix4f, xyz Vector3f) void
Scales a matrix.
-
func scaleFromIdentity(this *Matrix4f, x, y, z float) void
Scales a matrix after setting it to the identity matrix.
-
func scaleFromIdentity(this *Matrix4f, xyz Vector3f) void
Scales a matrix after setting it to the identity matrix.
-
func rotate(this *Matrix4f, angle, x, y, z float) void
Rotates a matrix by
angle
in radians. -
func rotate(this *Matrix4f, angle float, axis Vector3f) void
Rotates a matrix by
angle
in radians. -
func rotateFromIdentity(this *Matrix4f, angle, x, y, z float) void
Rotates a matrix by
angle
in radians after setting it to the identity matrix. -
func rotateFromIdentity(this *Matrix4f, angle float, axis Vector3f) void
Rotates a matrix by
angle
in radians after setting it to the identity matrix. -
func frustum(this *Matrix4f, left, right, bottom, top, near, far float) void
Sets a matrix to a perspective matrix from a frustum.
-
func perspective(this *Matrix4f, fovy, aspect, near, far float) void
Sets a matrix to a perspective matrix.
-
func ortho(this *Matrix4f, left, right, bottom, top, near, far float) void
Sets a matrix to an orthographic matrix.
-
func lookAt(this *Matrix4f, eye Vector3f, center Vector3f, up Vector3f) void
Sets a matrix to a perspective matrix via lookAt.
-
func toString(this *Matrix4f) String
Converts a matrix to a
String
-
func print(this *Matrix4f) void
Prints a matrix to stdout