MeVisLab Toolbox Reference
View2DDraw.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2007, MeVis Medical Solutions AG
4 **
5 ** The user may use this file in accordance with the license agreement provided with
6 ** the Software or, alternatively, in accordance with the terms contained in a
7 ** written agreement between the user and MeVis Medical Solutions AG.
8 **
9 ** For further information use the contact form at https://www.mevislab.de/contact
10 **
11 **************************************************************************************/
12 
13 
15 
16 #pragma once
17 
18 #include "SoView2DSystem.h"
19 #include "mlLinearAlgebra.h"
20 #include <vector>
21 
24 {
25 public:
28  static void drawCircle(ml::Vector2 c, double r, int n = 50, bool fill = false);
29 
33  static void drawEllipse(ml::Vector2 c, ml::Vector2 r1, ml::Vector2 r2, int n = 50, bool fill = false);
34 
41  static void drawEllipseBand(ml::Vector2 c, ml::Vector2 r1, ml::Vector2 r2, double b1, double b2, int n = 50, bool fill = false);
42 
57  static void drawHalfEllipse(ml::Vector2 c, ml::Vector2 r1, ml::Vector2 r2, double b1, double b2, int n = 50, bool fill = false, bool stippled = false);
58 
61  static void drawRing(ml::Vector2 c, double r1, double r2, int n = 50);
62 
65  static void drawCross(ml::Vector2 c, double r);
66 
69  static void drawBorderRect(float left, float top, float right, float bottom);
70 
71 protected:
73  static ml::Vector2 vecCosSin(int i, int n = 50);
74 };
#define SOVIEW2D_API
File to resolve system dependencies in View2D library.
GL extended drawing routines, used by SoView2DExtensions, e.g. SoView2DSphere.
Definition: View2DDraw.h:24
static void drawEllipse(ml::Vector2 c, ml::Vector2 r1, ml::Vector2 r2, int n=50, bool fill=false)
draws ellipse with two half axes r1 and r2, subdivided into n segments, using LINE_LOOP cx,...
static ml::Vector2 vecCosSin(int i, int n=50)
TODO: documentation.
static void drawRing(ml::Vector2 c, double r1, double r2, int n=50)
draws ring or disk subdivided into n segments, using TRIANGLE_STRIP c, r1, and r2 are given in device...
static void drawBorderRect(float left, float top, float right, float bottom)
draws border rectangle using glRect to prevent missing corners previously set glLineWidth is used
static void drawEllipseBand(ml::Vector2 c, ml::Vector2 r1, ml::Vector2 r2, double b1, double b2, int n=50, bool fill=false)
draws ellipse Band with two half axes r1 and r2, band is perpendicular to short axis and takes two ar...
static void drawCircle(ml::Vector2 c, double r, int n=50, bool fill=false)
draws circle subdivided into n segments, using LINE_LOOP c and r are given in device coordinates
static void drawHalfEllipse(ml::Vector2 c, ml::Vector2 r1, ml::Vector2 r2, double b1, double b2, int n=50, bool fill=false, bool stippled=false)
Draws a part of a ellipse.
static void drawCross(ml::Vector2 c, double r)
draws cross centered at (cx,cy) with half width r, using LINES cx, cy, and r are given in device coor...