import { assert } from "../../../assert.js";
import { aabb3_from_min_max } from "./aabb3_from_min_max.js";

/**
 *
 * @param {number[]|ArrayLike<number>|Float32Array} result
 * @param {BufferGeometry} geometry
 */
export function aabb3_from_threejs_geometry(result, geometry) {
    const gbb = geometry.boundingBox;

    assert.notNull(gbb, 'boundingBox');

    const min = gbb.min;
    const max = gbb.max;

    aabb3_from_min_max(result, min, max);
}
