makeOrthographic method
Implementation
Matrix4 makeOrthographic(double left, double right, double top, double bottom, double near, double far, [int coordinateSystem = 2000]) {
final te = storage;
final w = 1.0 / (right - left);
final h = 1.0 / (top - bottom);
final p = 1.0 / (far - near);
final x = (right + left) * w;
final y = (top + bottom) * h;
double z, zInv;
if ( coordinateSystem == 2000 ) {
z = ( far + near ) * p;
zInv = - 2 * p;
} else if ( coordinateSystem == 2001 ) {
z = near * p;
zInv = - 1 * p;
} else {
throw( 'THREE.Matrix4.makeOrthographic(): Invalid coordinate system: $coordinateSystem');
}
te[0] = 2 * w;
te[4] = 0;
te[8] = 0;
te[12] = -x;
te[1] = 0;
te[5] = 2 * h;
te[9] = 0;
te[13] = -y;
te[2] = 0;
te[6] = 0;
te[10] = zInv;
te[14] = -z;
te[3] = 0;
te[7] = 0;
te[11] = 0;
te[15] = 1;
return this;
}