Kav/Vertices/PositionTextureOffsetInstan...

32 lines
838 B
C#
Raw Normal View History

2020-12-07 21:50:32 +00:00
using System.Runtime.InteropServices;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
namespace Kav
{
2020-12-07 21:50:32 +00:00
[StructLayout(LayoutKind.Sequential, Pack = 1)]
2020-12-09 06:20:54 +00:00
public struct PositionTextureOffsetInstanceVertex : IVertexType
{
VertexDeclaration IVertexType.VertexDeclaration
{
get
{
2020-12-09 06:20:54 +00:00
return VertexDeclarations.PositionTextureOffsetInstanceDeclaration;
}
}
public Vector3 Translation { get; set; }
2020-12-09 06:20:54 +00:00
public Vector2 UVOffset { get; set; }
public static readonly VertexDeclaration VertexDeclaration;
2020-12-09 06:20:54 +00:00
public PositionTextureOffsetInstanceVertex(
Vector3 translation,
Vector2 uvOffset
) {
Translation = translation;
2020-12-09 06:20:54 +00:00
UVOffset = uvOffset;
}
}
}