Companion

Functions

Link copied to clipboard
Link copied to clipboard
fun orthographic(left: Float, right: Float, bottom: Float, top: Float, near: Float, far: Float): Matrix4f

Right-handed orthographic projection with normalized depth -1, 1 and finite ordered bounds.

Link copied to clipboard
fun perspective(verticalFieldOfViewRadians: Float, aspectRatio: Float, near: Float, far: Float): Matrix4f

Right-handed perspective, looking down negative Z, with normalized depth -1, 1. Requires finite 0 < field of view < PI, aspect > 0 and 0 < near < far.

Link copied to clipboard
fun rotationX(angleRadians: Float): Matrix4f

Right-handed rotation around X, in radians.

Link copied to clipboard
fun rotationY(angleRadians: Float): Matrix4f

Right-handed rotation around Y, in radians.

Link copied to clipboard
fun rotationZ(angleRadians: Float): Matrix4f

Right-handed rotation around Z, in radians.

Link copied to clipboard
fun scale(factor: Float): Matrix4f
fun scale(factors: Vector3f): Matrix4f
Link copied to clipboard