public void DrawPoint(Vertex2D point) { Gl.glPointSize(13); Gl.glEnable(Gl.GL_POINT_SMOOTH); Gl.glBegin(Gl.GL_POINTS); Gl.glVertex2d(point.X, point.Y); Gl.glEnd(); }
public void DrawVector2D(Vertex2D begin, Vertex2D end) { Gl.glLineWidth(2); Vector2DInfo vectorInfo = new Vector2DInfo(new Point(begin.X, begin.Y), new Point(end.X, end.Y)); Gl.glBegin(Gl.GL_LINES); Gl.glVertex2d(vectorInfo.Begin.X, vectorInfo.Begin.Y); Gl.glVertex2d(vectorInfo.End.X, vectorInfo.End.Y); Gl.glVertex2d(vectorInfo.End.X, vectorInfo.End.Y); Gl.glVertex2d(vectorInfo.End.X + vectorInfo.LeftArrowPoint.X, vectorInfo.End.Y + vectorInfo.LeftArrowPoint.Y); Gl.glVertex2d(vectorInfo.End.X, vectorInfo.End.Y); Gl.glVertex2d(vectorInfo.End.X + vectorInfo.RightArrowPoint.X, vectorInfo.End.Y + vectorInfo.RightArrowPoint.Y); Gl.glEnd(); }