#region usings using OpenTK; using OpenTK.Graphics; #endregion namespace SM2D.Object { /// /// Allows storing more information inside a vertex. /// public struct PolygonVertex { /// /// The position in the polygon. /// public Vector2 Position; /// /// The color of the vertex. /// public Color4 Color; /// /// Creates a polygon vertex. /// /// /// public PolygonVertex(Vector2 position = default, Color4 color = default) { Position = position; Color = color; } /// /// Automaticly translates Vector2s to PolygonVertex /// /// /// public static implicit operator PolygonVertex(Vector2 vec) => new PolygonVertex(vec, Color4.White); } }