import Vector4 from "../../../../core/geom/Vector4.js";
import { computeBoundingSphereFromVertexData } from "../computeBoundingSphereFromVertexData.js";

/**
 *
 * @param {BufferGeometry} geometry
 * @returns {Vector4} x,y,z are sphere center and w is radius
 */
export function computeGeometryBoundingSphereMiniball(geometry) {
    const vertexData = geometry.attributes.position.array;


    const result = new Vector4();
    computeBoundingSphereFromVertexData(vertexData, result);

    return result;
}
