12345678910111213141516171819202122232425262728293031323334 |
- 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
- {
- private Vertex position;
- private Color color;
- private float size;
- public Point(Vertex position, Color color, float size) {
- this.position = position;
- this.color = color;
- this.size = size;
- }
- public void draw() {
- GL.Color4(color);
- GL.Begin(BeginMode.Polygon);
- GL.Vertex3(position.getX() - size, position.getY() + size, -position.getZ());
- GL.Vertex3(position.getX() + size, position.getY() + size, -position.getZ());
- GL.Vertex3(position.getX() + size, position.getY() - size, -position.getZ());
- GL.Vertex3(position.getX() - size, position.getY() - size, -position.getZ());
- GL.End();
- }
- }
- }
|