makeFrustumMatrix function

Matrix4 makeFrustumMatrix (double left, double right, double bottom, double top, double near, double far)

Constructs a new OpenGL perspective projection matrix.

left, right specify the coordinates for the left and right vertical clipping planes. bottom, top specify the coordinates for the bottom and top horizontal clipping planes. near, far specify the coordinates to the near and far depth clipping planes.

Implementation

Matrix4 makeFrustumMatrix(double left, double right, double bottom, double top,
    double near, double far) {
  final Matrix4 view = new Matrix4.zero();
  setFrustumMatrix(view, left, right, bottom, top, near, far);
  return view;
}