Kav/Geometry/Model.cs

29 lines
624 B
C#

using Microsoft.Xna.Framework;
namespace Kav
{
public class Model
{
public Mesh[] Meshes { get; }
public Model(Mesh[] meshes)
{
Meshes = meshes;
}
public void ApplyTransform(Matrix transform)
{
foreach (var mesh in Meshes)
{
foreach (var meshPart in mesh.MeshParts)
{
if (meshPart.Effect is TransformEffect transformEffect)
{
transformEffect.World = transform;
}
}
}
}
}
}