Added Summeries
This commit is contained in:
parent
71a22df8bd
commit
8296d9b8a9
47 changed files with 812 additions and 177 deletions
|
|
@ -7,17 +7,36 @@ using OpenTK.Graphics;
|
|||
|
||||
namespace SM2D.Object
|
||||
{
|
||||
/// <summary>
|
||||
/// Allows storing more information inside a vertex.
|
||||
/// </summary>
|
||||
public struct PolygonVertex
|
||||
{
|
||||
public Vector2 Vertex;
|
||||
/// <summary>
|
||||
/// The position in the polygon.
|
||||
/// </summary>
|
||||
public Vector2 Position;
|
||||
/// <summary>
|
||||
/// The color of the vertex.
|
||||
/// </summary>
|
||||
public Color4 Color;
|
||||
|
||||
public PolygonVertex(Vector2 vertex = default, Color4 color = default)
|
||||
/// <summary>
|
||||
/// Creates a polygon vertex.
|
||||
/// </summary>
|
||||
/// <param name="position"></param>
|
||||
/// <param name="color"></param>
|
||||
public PolygonVertex(Vector2 position = default, Color4 color = default)
|
||||
{
|
||||
Vertex = vertex;
|
||||
Position = position;
|
||||
Color = color;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Automaticly translates Vector2s to PolygonVertex
|
||||
/// </summary>
|
||||
/// <param name="vec"></param>
|
||||
/// <returns></returns>
|
||||
public static implicit operator PolygonVertex(Vector2 vec) => new PolygonVertex(vec, Color4.White);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue