Properties

Link copied to clipboard

Provides a new instance of the identity 4x4 matrix.

Functions

Link copied to clipboard
fun add(result: ZMatrix4, m1: ZMatrix4, m2: ZMatrix4)

Adds two 4x4 matrices and stores the result in the provided result matrix.

Link copied to clipboard

Converts a quaternion into a 4x4 matrix representing the same rotation.

Link copied to clipboard
fun identity(result: ZMatrix4)

Sets the given matrix to be the identity matrix.

Link copied to clipboard
fun invert(result: ZMatrix4, m: ZMatrix4): Boolean

Computes the invert matrix from the given one

Link copied to clipboard
fun lookAt(result: ZMatrix4, eye: ZVector3, center: ZVector3, up: ZVector3)

Sets up a view transformation matrix to represent a camera looking at a specified target.

Link copied to clipboard
fun mult(result: ZMatrix4, lm: ZMatrix4, rm: ZMatrix4)

Multiplies two 4x4 matrices, storing the result in the result matrix.

Link copied to clipboard
fun perspective(result: ZMatrix4, fov: Float, aspect: Float, near: Float, far: Float)

Computes the perspective projection matrix

Link copied to clipboard
fun rotate(result: ZMatrix4, q: ZQuaternion)

Rotates the given ZMatrix4 result by the specified ZQuaternion.

Link copied to clipboard
fun scale(result: ZMatrix4, s: ZVector3)
fun scale(result: ZMatrix4, m: ZMatrix4, s: ZVector3)

fun scale(result: ZMatrix4, m: ZMatrix4, x: Float, y: Float, z: Float)

Scales a given 4x4 matrix by specified x, y, and z scaling factors.

Link copied to clipboard
fun setTranslation(result: ZMatrix4, translation: ZVector3)

Sets the translation component of a matrix using the specified translation vector.

fun setTranslation(result: ZMatrix4, x: Float, y: Float, z: Float)

Sets the translation components of the provided 4x4 matrix to the specified x, y, and z values.

Link copied to clipboard
fun subtract(result: ZMatrix4, m1: ZMatrix4, m2: ZMatrix4)

Subtracts two 4x4 matrices and stores the result in the provided result matrix.

Link copied to clipboard
fun translate(result: ZMatrix4, translation: ZVector3)
fun translate(result: ZMatrix4, m: ZMatrix4, translation: ZVector3)
fun translate(result: ZMatrix4, x: Float, y: Float, z: Float)
Link copied to clipboard
fun transpose(result: ZMatrix4, m: ZMatrix4)

Transposes the given 4x4 matrix m and stores the result in result.

Link copied to clipboard
fun transposeIp(result: ZMatrix4)