/** @internal NOTE: Internal APIs. Subject to change. Use of these APIs in production applications is not supported. */ /** */
import { Plane } from '../loader/babylonjs-import';
/**
 * Create a default (non valid) frustum.
 */
export function createNullFrustum() {
    return [
        new Plane(0, 0, 0, 0),
        new Plane(0, 0, 0, 0),
        new Plane(0, 0, 0, 0),
        new Plane(0, 0, 0, 0),
        new Plane(0, 0, 0, 0),
        new Plane(0, 0, 0, 0)
    ];
}
/**
 * Check if `position` is within a specified frustum (`frustmPlanes`).
 * @param position Position to check
 * @param frustumPlanes Frustum to check against.
 * @returns `true` if points is within frustum, otherwise `false`.
 */
export function isPointInFrustum(position, frustumPlanes) {
    for (let i = 0; i < 6; i++) {
        if (frustumPlanes[i].dotCoordinate(position) < 0) {
            return false;
        }
    }
    return true;
}
//# sourceMappingURL=Frustum.js.map