setAsOrthographic method

void setAsOrthographic(
  1. double nearPlaneWidth,
  2. double aspectRatio,
  3. double zNear,
  4. double zFar,
)

Set the matrix to use a orthographic view.

Implementation

void setAsOrthographic(
  double nearPlaneWidth,
  double aspectRatio,
  double zNear,
  double zFar,
) {
  final top = nearPlaneWidth / 2.0;
  final right = top * aspectRatio;
  setOrthographicMatrix(this, -right, right, -top, top, zNear, zFar);
}