Package-level declarations

Types

Link copied to clipboard
class TransformBuilder(baseTransform: Matrix44 = Matrix44.IDENTITY)

Functions

Link copied to clipboard
fun buildTransform(baseTransform: Matrix44 = Matrix44.IDENTITY, builder: TransformBuilder.() -> Unit): Matrix44

An alias for transform, useful for those cases in which the word transform is used too often

Link copied to clipboard
fun frustum(left: Double, right: Double, bottom: Double, top: Double, zNear: Double, zFar: Double): Matrix44

Creates frustum matrix with the given bounds

Link copied to clipboard
fun lookAt(eye: Vector3, target: Vector3, up: Vector3 = Vector3.UNIT_Y): Matrix44

Create a view matrix from a camera at position eye look at target

Link copied to clipboard

Construct a normal matrix from the give view matrix

Link copied to clipboard
fun ortho(xMag: Double, yMag: Double, zNear: Double, zFar: Double): Matrix44

Creates an orthographic projection matrix

fun ortho(left: Double, right: Double, bottom: Double, top: Double, zNear: Double, zFar: Double): Matrix44

Creates an orthographic projection matrix with the given bounds

Link copied to clipboard
fun perspective(fovY: Double, aspectRatio: Double, zNear: Double): Matrix44

Creates an perspective projection matrix with infinite clipping depth

fun perspective(fovY: Double, aspectRatio: Double, zNear: Double, zFar: Double): Matrix44

Creates an perspective projection matrix

fun perspective(fovY: Double, aspectRatio: Double, zNear: Double, zFar: Double, xOffset: Double, yOffset: Double): Matrix44

Creates an perspective projection matrix with a shifted apex

Link copied to clipboard
fun perspectiveHorizontal(fovY: Double, aspectRatio: Double, zNear: Double, zFar: Double, xOffset: Double, yOffset: Double): Matrix44

Creates an perspective projection matrix locking the horizontal view angle

Link copied to clipboard
fun project(point: Vector3, projection: Matrix44, view: Matrix44, width: Int, height: Int): Vector3

Project a 3D point on a 2D surface

Link copied to clipboard

Create a rotation matrix around the given axes

Link copied to clipboard

Create a rotation matrix around the X axes

Link copied to clipboard

Create a rotation matrix around the Y axes

Link copied to clipboard

Create a rotation matrix around the Z axes

Link copied to clipboard

Create a scaling matrix with the given vector

Create a scaling matrix with the given components

Link copied to clipboard
fun transform(baseTransform: Matrix44 = Matrix44.IDENTITY, builder: TransformBuilder.() -> Unit): Matrix44

Build a transform presented by a Matrix44

Link copied to clipboard

Matrix44 property transform helper

@JvmName(name = "matrix44Transform")
fun Matrix44.transform(builder: TransformBuilder.() -> Unit): Matrix44

Matrix44 transform helper

Link copied to clipboard

Create a translate matrix with the given vector

Create a scaling matrix with the given components

Link copied to clipboard
fun unproject(point: Vector3, projection: Matrix44, view: Matrix44, width: Int, height: Int): Vector3