projection

fun projection(direction: Camera.Fov, fovInDegrees: Double, aspect: Double, near: Double, far: Double = Double.POSITIVE_INFINITY, out: DoubleArray? = null): DoubleArray

Returns the projection matrix from the field-of-view.

Parameters

direction

Axis on which fovInDegrees is measured

fovInDegrees

Full field-of-view in degrees (0 < fov < 180)

aspect

Aspect ratio (width / height)

near

Distance to near plane (> 0)

far

Distance to far plane (> near)

out

Optional DoubleArray for result; created if null


fun projection(focalLengthInMillimeters: Double, aspect: Double, near: Double, far: Double = Double.POSITIVE_INFINITY, out: DoubleArray? = null): DoubleArray

Returns the projection matrix from the focal length.

Parameters

focalLengthInMillimeters

Lens's focal length in millimeters (> 0)

aspect

Aspect ratio (width / height)

near

Distance to near plane (> 0)

far

Distance to far plane (> near)

out

Optional DoubleArray for result; created if null