Kav/Data/MeshPartDrawData.cs

36 lines
1.1 KiB
C#

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
namespace Kav.Data
{
public struct MeshPartDrawData : IGBufferDrawable, IUVDrawable, ICullable, IIndexDrawable
{
public MeshPart MeshPart { get; }
public Matrix TransformMatrix { get; }
public UVData UVData { get; }
public BoundingBox BoundingBox => MeshPart.BoundingBox;
public IndexBuffer IndexBuffer => MeshPart.IndexBuffer;
public VertexBuffer VertexBuffer => MeshPart.VertexBuffer;
public Vector3 Albedo => MeshPart.Albedo;
public float Metallic => MeshPart.Metallic;
public float Roughness => MeshPart.Roughness;
public Texture2D AlbedoTexture => MeshPart.AlbedoTexture;
public Texture2D NormalTexture => MeshPart.NormalTexture;
public Texture2D MetallicRoughnessTexture => MeshPart.MetallicRoughnessTexture;
public MeshPartDrawData(
MeshPart meshPart,
Matrix transformMatrix,
UVData uvData
) {
MeshPart = meshPart;
TransformMatrix = transformMatrix;
UVData = uvData;
}
}
}