[][src]Function gramit::transform::ortho

pub fn ortho(
    left: f32,
    right: f32,
    bottom: f32,
    top: f32,
    near: f32,
    far: f32
) -> Mat4

Build an orthographic normalization matrix.

The resulting clipping volume is a right, axis-aligned parallelepiped. The left and right planes are at the given positions on the x axis, the top and bottom planes at the given positions on the y axis, and the near and far planes at z = -near and -far.

This volume is mapped to the canonical viewing volume (the 2x2x2 cube centered at the origin). The z axis is inverted, so that the near and far planes are mapped to normalized z coordinates -1 and 1 respectively (the OpenGL convention).