frustum static method
Returns a perspective projection matrix defined by the given frustum planes.
Implementation
static MatrixBase frustum(
double left,
double right,
double bottom,
double top,
double nearPlane,
double farPlane,
) {
final result = zeroFactory();
final rl = right - left;
final tb = top - bottom;
final fn = farPlane - nearPlane;
result.m0 = (nearPlane*2.0)/rl;
result.m5 = (nearPlane*2.0)/tb;
result.m8 = (right + left)/rl;
result.m9 = (top + bottom)/tb;
result.m10 = -(farPlane + nearPlane)/fn;
result.m11 = -1.0;
result.m14 = -(farPlane*nearPlane*2.0)/fn;
return result;
}