12345678910111213141516171819202122232425262728293031323334353637 |
- using System;
- using System.Collections.Generic;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using OpenTK.Graphics.OpenGL;
- using MathNet.Numerics.LinearAlgebra.Single;
- namespace bbiwarg.Graphics
- {
- class Point : IGraphicElement
- {
- private Vector position;
- private Color color;
- private float size;
- public Point(Vector 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[0] - size/2, position[1] + size/2, -position[2]);
- GL.Vertex3(position[0] + size/2, position[1] + size/2, -position[2]);
- GL.Vertex3(position[0] + size/2, position[1] - size/2, -position[2]);
- GL.Vertex3(position[0] - size/2, position[1] - size/2, -position[2]);
- GL.End();
- }
- }
- }
|