setToScreenProjection

fun setToScreenProjection(viewportWidth: Double, viewportHeight: Double): Matrix4

Sets this matrix to a screen projection matrix for the specified viewport dimensions.
A screen projection matrix is an orthographic projection that interprets points in model coordinates as representing a screen XY and a Z depth. Screen projection matrices therefore map coordinates directly into screen coordinates without modification. A point's XY coordinates are interpreted as literal screen coordinates and must be in the viewport to be visible. A point's Z coordinate is interpreted as a depth value that ranges from 0 to 1. Additionally, the screen projection matrix preserves the depth value returned by RenderContext.project.

Parameters

viewportWidth

the viewport width in screen coordinates

viewportHeight

the viewport height in screen coordinates

Throws

If either the width or the height is less than or equal to zero