[][src]Function gramit::transform::frustum

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

Construct a frustum normalization matrix.

The resulting frustum has its apex at the origin, and its near and far faces centered on and perpendicular to the negative z axis at the specified distances. The near face has the given width and height. This volume is then mapped to the canonical viewing volume (the 2x2x2 cube centered at the origin).

The near and far planes are mapped to normalized z coordinates -1 and 1 respectively (the OpenGL convention).