using System; using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using OpenTK.Graphics.OpenGL; namespace bbiwarg.Graphics { class Point : IGraphicElement { public Vertex position; public Color color; public float size; public Point(Vertex position, Color color, float size) { this.position = position; this.color = color; this.size = size; } public void draw(int width, int height) { GL.Color4(color); float relX = position.x - width/2; float relY = height/2-position.y; GL.Begin(BeginMode.Polygon); GL.Vertex3(relX - size, relY + size, -position.z); GL.Vertex3(relX + size, relY + size, -position.z); GL.Vertex3(relX + size, relY - size, -position.z); GL.Vertex3(relX - size, relY - size, -position.z); GL.End(); } } }