diff --git a/PCK-Studio/Rendering/CubeMeshCollection.cs b/PCK-Studio/Rendering/CubeMeshCollection.cs index 4a07217a..e0603983 100644 --- a/PCK-Studio/Rendering/CubeMeshCollection.cs +++ b/PCK-Studio/Rendering/CubeMeshCollection.cs @@ -169,7 +169,11 @@ namespace PckStudio.Rendering public override BoundingBox GetBounds(Matrix4 transform) { - throw new NotImplementedException(); + IEnumerable boundingBoxes = cubes + .Where(c => c.Visible) + .Select(c => c.GetBounds(Transform * transform)) + .DefaultIfEmpty(); + return BoundingBox.GetEnclosingBoundingBox(boundingBoxes); } internal Vector3 GetFaceCenter(int index, Cube.Face face)