MeVisLab Toolbox Reference
View2DDraw Class Reference

GL extended drawing routines, used by SoView2DExtensions, e.g. SoView2DSphere. More...

#include <View2DDraw.h>

Static Public Member Functions

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 More...
 
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, cy, and r are given in device coordinates More...
 
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 arguments b1 and b2 (-1 <= b <= 1) as relative limits on short axis subdivided into n segments, using TRIANGLE_STRIP cx, cy, r and b are given in device coordinates More...
 
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. More...
 
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 coordinates, r1 may be zero More...
 
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 coordinates More...
 
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 More...
 

Static Protected Member Functions

static ml::Vector2 vecCosSin (int i, int n=50)
 TODO: documentation. More...
 

Detailed Description

GL extended drawing routines, used by SoView2DExtensions, e.g. SoView2DSphere.

a static class for extended 2D drawing with GL

Definition at line 23 of file View2DDraw.h.

Member Function Documentation

◆ drawBorderRect()

static void View2DDraw::drawBorderRect ( float  left,
float  top,
float  right,
float  bottom 
)
static

draws border rectangle using glRect to prevent missing corners previously set glLineWidth is used

◆ drawCircle()

static void View2DDraw::drawCircle ( ml::Vector2  c,
double  r,
int  n = 50,
bool  fill = false 
)
static

draws circle subdivided into n segments, using LINE_LOOP c and r are given in device coordinates

◆ drawCross()

static void View2DDraw::drawCross ( ml::Vector2  c,
double  r 
)
static

draws cross centered at (cx,cy) with half width r, using LINES cx, cy, and r are given in device coordinates

◆ drawEllipse()

static void View2DDraw::drawEllipse ( ml::Vector2  c,
ml::Vector2  r1,
ml::Vector2  r2,
int  n = 50,
bool  fill = false 
)
static

draws ellipse with two half axes r1 and r2, subdivided into n segments, using LINE_LOOP cx, cy, and r are given in device coordinates

◆ drawEllipseBand()

static void View2DDraw::drawEllipseBand ( ml::Vector2  c,
ml::Vector2  r1,
ml::Vector2  r2,
double  b1,
double  b2,
int  n = 50,
bool  fill = false 
)
static

draws ellipse Band with two half axes r1 and r2, band is perpendicular to short axis and takes two arguments b1 and b2 (-1 <= b <= 1) as relative limits on short axis subdivided into n segments, using TRIANGLE_STRIP cx, cy, r and b are given in device coordinates

◆ drawHalfEllipse()

static void View2DDraw::drawHalfEllipse ( ml::Vector2  c,
ml::Vector2  r1,
ml::Vector2  r2,
double  b1,
double  b2,
int  n = 50,
bool  fill = false,
bool  stippled = false 
)
static

Draws a part of a ellipse.

Parameters
ccenter of the ellipse
r1one of the two half axes of the ellipse
r2one of the two half axes of the ellipse
b1relative limit (between [-1,1]) on short axis to define one end of the part which has to be drawn
b2see b1
ndefines in how much segments the ellipse should be devides
stippleddefines whether the part has to be drawn normally (false) or stippled (true)

◆ drawRing()

static void View2DDraw::drawRing ( ml::Vector2  c,
double  r1,
double  r2,
int  n = 50 
)
static

draws ring or disk subdivided into n segments, using TRIANGLE_STRIP c, r1, and r2 are given in device coordinates, r1 may be zero

◆ vecCosSin()

static ml::Vector2 View2DDraw::vecCosSin ( int  i,
int  n = 50 
)
staticprotected

TODO: documentation.


The documentation for this class was generated from the following file: