makeOrthographicMatrix function

Matrix4 makeOrthographicMatrix(
  1. double left,
  2. double right,
  3. double bottom,
  4. double top,
  5. double near,
  6. double far,
)

Constructs a new OpenGL orthographic 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 makeOrthographicMatrix(double left, double right, double bottom,
    double top, double near, double far) {
  final r = Matrix4.zero();
  setOrthographicMatrix(r, left, right, bottom, top, near, far);
  return r;
}