MatrixFrustum function
Implementation
Matrix4 MatrixFrustum(
double left,
double right,
double bottom,
double top,
double near,
double far,
) {
final mat = Matrix4.zero();
mat[0] = 2 * near / (right - left);
mat[5] = 2 * near / (top - bottom);
mat[8] = (right + left) / (right - left);
mat[9] = (top + bottom) / (top - bottom);
mat[10] = -(far + near) / (far - near);
mat[11] = -1;
mat[14] = -2 * far * near / (far - near);
return mat;
}