Kav/Geometry/Mesh.cs

24 lines
540 B
C#
Raw Normal View History

2020-10-20 01:22:54 +00:00
using Microsoft.Xna.Framework;
2020-08-04 09:32:02 +00:00
namespace Kav
{
public class Mesh
{
public MeshPart[] MeshParts { get; }
2020-10-20 01:22:54 +00:00
public BoundingBox BoundingBox { get; }
2020-08-04 09:32:02 +00:00
public Mesh(MeshPart[] meshParts)
{
MeshParts = meshParts;
2020-10-20 01:22:54 +00:00
BoundingBox boundingBox = new BoundingBox();
foreach (var meshPart in MeshParts)
{
boundingBox = BoundingBox.CreateMerged(boundingBox, meshPart.BoundingBox);
}
BoundingBox = boundingBox;
2020-08-04 09:32:02 +00:00
}
}
}