fromPoints
fun fromPoints(positions: ReadonlyArray<Cartesian3>, result: AxisAlignedBoundingBox? = definedExternally): AxisAlignedBoundingBox(source)
Computes an instance of an AxisAlignedBoundingBox. The box is determined by finding the points spaced the farthest apart on the x, y, and z axes.
// Compute an axis aligned bounding box enclosing two points.
const box = AxisAlignedBoundingBox.fromPoints([new Cartesian3(2, 0, 0), new Cartesian3(-2, 0, 0)]);
Content copied to clipboard
Return
The modified result parameter or a new AxisAlignedBoundingBox instance if one was not provided.
Parameters
positions
List of points that the bounding box will enclose. Each point must have a x
, y
, and z
properties.
result
The object onto which to store the result.