29 lines
707 B
C#
29 lines
707 B
C#
using System.Runtime.InteropServices;
|
|
using Microsoft.Xna.Framework;
|
|
using Microsoft.Xna.Framework.Graphics;
|
|
|
|
namespace Kav
|
|
{
|
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
|
public struct PositionInstanceVertex : IVertexType, IHasTranslation
|
|
{
|
|
VertexDeclaration IVertexType.VertexDeclaration
|
|
{
|
|
get
|
|
{
|
|
return VertexDeclarations.PositionInstanceDeclaration;
|
|
}
|
|
}
|
|
|
|
public Vector3 Translation { get; set; }
|
|
|
|
public static readonly VertexDeclaration VertexDeclaration;
|
|
|
|
public PositionInstanceVertex(
|
|
Vector3 translation
|
|
) {
|
|
Translation = translation;
|
|
}
|
|
}
|
|
}
|