BoundingBox.FromGeometry

BoundingBox.FromGeometry method

Construct a bounding box from given geometry

public static BoundingBox FromGeometry(Geometry geometry)
ParameterTypeDescription
geometryGeometryThe geometry to calculate bounding box

Return Value

The bounding box of given geometry

Examples

The following code shows how to construct a bounding box from a geometry instance.

var sphere = (new Sphere()).ToMesh();
var boundingBox = BoundingBox.FromGeometry(sphere);
Console.WriteLine("Bounding box = " + boundingBox);

See Also