using Microsoft.Xna.Framework; namespace Kav { public class Mesh { public MeshPart[] MeshParts { get; } public BoundingBox BoundingBox { get; } public Mesh(MeshPart[] meshParts) { MeshParts = meshParts; BoundingBox boundingBox = new BoundingBox(); foreach (var meshPart in MeshParts) { boundingBox = BoundingBox.CreateMerged(boundingBox, meshPart.BoundingBox); } BoundingBox = boundingBox; } } }