/**
 *
 * @param {BufferGeometry|Geometry} geometry
 * @returns {Box3}
 */
export function ensureGeometryBoundingBox(geometry) {
    let boundingBox = geometry.boundingBox;

    if (boundingBox === null || boundingBox === undefined) {
        geometry.computeBoundingBox();
        boundingBox = geometry.boundingBox;
    }

    return boundingBox;
}
