Companion

Functions

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

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

Link copied to clipboard
fun perspective(verticalFieldOfViewRadians: Double, aspectRatio: Double, near: Double, far: Double): Matrix4d

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: Double): Matrix4d

Right-handed rotation around X, in radians.

Link copied to clipboard
fun rotationY(angleRadians: Double): Matrix4d

Right-handed rotation around Y, in radians.

Link copied to clipboard
fun rotationZ(angleRadians: Double): Matrix4d

Right-handed rotation around Z, in radians.

Link copied to clipboard
fun scale(factor: Double): Matrix4d
fun scale(factors: Vector3d): Matrix4d
Link copied to clipboard