static public void DrawPointCircle(float radius, Vector2 position, Vector2 globalPosition) { GL.Color3(GraphicUtilities.GetColorFromHEX("#bcea64")); GL.Begin(BeginMode.QuadStrip); int i; for (i = 0; i < 370; i += 40) { double degInRad = i * 3.1416 / 180; GL.Vertex2(Math.Cos(degInRad) * radius + position.X + globalPosition.X, Math.Sin(degInRad) * radius + position.Y + globalPosition.Y); GL.Vertex2(Math.Cos(degInRad) * (radius + 2f) + position.X + globalPosition.X, Math.Sin(degInRad) * (radius + 2f) + position.Y + globalPosition.Y); } GL.End(); GL.Color3(ApplicationConstants.BACKGROUND_COLOR); GL.Begin(BeginMode.TriangleFan); for (i = 0; i < 370; i += 40) { double degInRad = i * 3.1416 / 180; GL.Vertex2(Math.Cos(degInRad) * radius + position.X + globalPosition.X, Math.Sin(degInRad) * radius + position.Y + globalPosition.Y); } GL.End(); }
static public void DrawLittleCircle(float radius, Vector2 position, Vector2 globalPosition) { GL.Color3(GraphicUtilities.GetColorFromHEX("#ffffff")); GL.Begin(BeginMode.TriangleFan); for (int i = 0; i < 370; i += 40) { double degInRad = i * 3.1416 / 180; GL.Vertex2(Math.Cos(degInRad) * radius + position.X + globalPosition.X, Math.Sin(degInRad) * radius + position.Y + globalPosition.Y); } GL.End(); }
static public void DrawLine(Vector2 startPos, Vector2 endPos, Vector2 position) { startPos += position; endPos += position; GL.LineWidth(1.5f); GL.Enable(EnableCap.LineSmooth); GL.Hint(HintTarget.LineSmoothHint, HintMode.Nicest); GL.Begin(PrimitiveType.Lines); GL.Color3(GraphicUtilities.GetColorFromHEX("#e92066")); GL.Vertex2(startPos); GL.Color3(GraphicUtilities.GetColorFromHEX("#e92066")); GL.Vertex2(endPos); GL.End(); }