32 lines
838 B
C#
32 lines
838 B
C#
|
using System.Runtime.InteropServices;
|
||
|
using Microsoft.Xna.Framework;
|
||
|
using Microsoft.Xna.Framework.Graphics;
|
||
|
|
||
|
namespace Kav
|
||
|
{
|
||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||
|
public struct PositionTextureOffsetInstanceVertex : IVertexType
|
||
|
{
|
||
|
VertexDeclaration IVertexType.VertexDeclaration
|
||
|
{
|
||
|
get
|
||
|
{
|
||
|
return VertexDeclarations.PositionTextureOffsetInstanceDeclaration;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public Vector3 Translation { get; set; }
|
||
|
public Vector2 UVOffset { get; set; }
|
||
|
|
||
|
public static readonly VertexDeclaration VertexDeclaration;
|
||
|
|
||
|
public PositionTextureOffsetInstanceVertex(
|
||
|
Vector3 translation,
|
||
|
Vector2 uvOffset
|
||
|
) {
|
||
|
Translation = translation;
|
||
|
UVOffset = uvOffset;
|
||
|
}
|
||
|
}
|
||
|
}
|