/**
 * Build orthographic frustum from an axis-aligned bounding box
 * @param {number[]} result
 * @param {number} x0
 * @param {number} y0
 * @param {number} z0
 * @param {number} x1
 * @param {number} y1
 * @param {number} z1
 */
export function aabb_build_frustum(result, x0, y0, z0, x1, y1, z1) {

    // 0 - left
    result[0] = 1;
    result[1] = 0;
    result[2] = 0;
    result[3] = -x0;

    // 1 - right
    result[4] = -1;
    result[5] = 0;
    result[6] = 0;
    result[7] = x1;

    // 2 - bottom
    result[8] = 0;
    result[9] = 1;
    result[10] = 0;
    result[11] = -y0;

    // 3 - top
    result[12] = 0;
    result[13] = -1;
    result[14] = 0;
    result[15] = y1;

    // 4 - near
    result[16] = 0;
    result[17] = 0;
    result[18] = 1;
    result[19] = -z0;

    // 5 - far
    result[20] = 0;
    result[21] = 0;
    result[22] = -1;
    result[23] = z1;
}
