internal static Box BoxForTriangles(Triangle[] shapes) { if (shapes.Length == 0) { return(new Box()); } Box box = shapes[0].BoundingBox(); foreach (var shape in shapes) { box = box.Extend(shape.BoundingBox()); } return(box); }
Box SDF.BoundingBox() { Box result = new Box(); int i = 0; foreach (SDF item in Items) { Box box = item.BoundingBox(); if (i == 0) { result = box; } else { result = result.Extend(box); } i++; } return(result); }