MachineIntelligenceCore:Visualization
mic::opengl::visualization::DrawingUtils Class Reference

Class offering methods for drawing in OpenGL windows. More...

#include <DrawingUtils.hpp>

Inheritance diagram for mic::opengl::visualization::DrawingUtils:

Public Member Functions

virtual ~DrawingUtils ()
 
void draw_frame (float x1, float y1, float x2, float y2, float r, float g, float b, float a)
 
void draw_grid (float r, float g, float b, float a, float cells_h, float cells_v, float line_width_=1.0)
 
void draw_mark (mark m, float x, float y, float size, float line_width, float r, float g, float b, float a)
 
void draw_circle (float x, float y, float size, float line_width, float r, float g, float b, float a)
 
void draw_plus (float x, float y, float size, float line_width, float r, float g, float b, float a)
 
void draw_cross (float x, float y, float size, float line_width, float r, float g, float b, float a)
 
void draw_square (float x, float y, float size, float line_width, float r, float g, float b, float a)
 
void draw_square_in_place (float size, float line_width, float r, float g, float b, float a)
 
void draw_filled_square (float x, float y, float size, float r, float g, float b, float a)
 
void draw_rectangle (float x, float y, float h, float w, float r, float g, float b, float a)
 
void draw_filled_rectangle (float x, float y, float h, float w, float r, float g, float b, float a)
 
void draw_texture_in_place (float size)
 
void draw_filled_square_in_place (float radius, float line_width, float r, float g, float b, float a)
 
void draw_filled_rectangle_in_place (float radius_x, float radius_y, float line_width, float r, float g, float b, float a)
 
void draw_cuboid (float radius, float line_width, float height, float r, float g, float b, float a)
 
void draw_text (float x, float y, char *string, float r, float g, float b, float a, void *font)
 
void draw_text_3i (float x, float y, float z, char *string, float r, float g, float b, float a, void *font)
 
void draw_cursor (float x, float y, float r, float g, float b, float a)
 
void draw_text_3d (GLfloat x, GLfloat y, char *text)
 
float to_radians (float degrees)
 

Detailed Description

Class offering methods for drawing in OpenGL windows.

Author
krocki

Definition at line 63 of file DrawingUtils.hpp.

Constructor & Destructor Documentation

virtual mic::opengl::visualization::DrawingUtils::~DrawingUtils ( )
inlinevirtual

Virtual destructor. Empty.

Definition at line 69 of file DrawingUtils.hpp.

Member Function Documentation

void mic::opengl::visualization::DrawingUtils::draw_circle ( float  x,
float  y,
float  size,
float  line_width,
float  r,
float  g,
float  b,
float  a 
)

Draws circle mark.

Parameters
x
y
size
line_width
r
g
b
a

Definition at line 198 of file DrawingUtils.cpp.

Referenced by mic::opengl::visualization::WindowMazeOfDigits::displayHandler(), mic::opengl::visualization::WindowMNISTDigit::displayHandler(), and draw_mark().

void mic::opengl::visualization::DrawingUtils::draw_cross ( float  x,
float  y,
float  size,
float  line_width,
float  r,
float  g,
float  b,
float  a 
)

Draws cross mark.

Parameters
x
y
size
line_width
r
g
b
a

Definition at line 221 of file DrawingUtils.cpp.

Referenced by mic::opengl::visualization::WindowMazeOfDigits::displayHandler(), mic::opengl::visualization::WindowMNISTDigit::displayHandler(), and draw_mark().

void mic::opengl::visualization::DrawingUtils::draw_cuboid ( float  radius,
float  line_width,
float  height,
float  r,
float  g,
float  b,
float  a 
)

Draws cuboid.

Parameters
radius
line_width
height
r
g
b
a

Definition at line 312 of file DrawingUtils.cpp.

void mic::opengl::visualization::DrawingUtils::draw_cursor ( float  x,
float  y,
float  r,
float  g,
float  b,
float  a 
)

Draws cursos

Parameters
x
y
r
g
b
a

Definition at line 447 of file DrawingUtils.cpp.

References draw_text().

Here is the call graph for this function:

void mic::opengl::visualization::DrawingUtils::draw_filled_rectangle ( float  x,
float  y,
float  h,
float  w,
float  r,
float  g,
float  b,
float  a 
)
void mic::opengl::visualization::DrawingUtils::draw_filled_rectangle_in_place ( float  radius_x,
float  radius_y,
float  line_width,
float  r,
float  g,
float  b,
float  a 
)

Draws filled rectangle in the center of the window.

Parameters
radius_x
radius_y
line_width
r
g
b
a

Definition at line 294 of file DrawingUtils.cpp.

void mic::opengl::visualization::DrawingUtils::draw_filled_square ( float  x,
float  y,
float  size,
float  r,
float  g,
float  b,
float  a 
)

Draws filled square.

Parameters
x
y
size
r
g
b
a

Definition at line 379 of file DrawingUtils.cpp.

References draw_filled_rectangle().

Here is the call graph for this function:

void mic::opengl::visualization::DrawingUtils::draw_filled_square_in_place ( float  radius,
float  line_width,
float  r,
float  g,
float  b,
float  a 
)

Draws filled square in the center of the window.

Parameters
radius
line_width
r
g
b
a

Definition at line 276 of file DrawingUtils.cpp.

void mic::opengl::visualization::DrawingUtils::draw_frame ( float  x1,
float  y1,
float  x2,
float  y2,
float  r,
float  g,
float  b,
float  a 
)

Draws image in current window.

Parameters
img
w
h
show_grid

Draws image ROI.

Parameters
img
w
h
x1
y1
x2
y2
r
g
b
a

Draws frame.

Parameters
x1
y1
x2
y2
r
g
b
a

Definition at line 128 of file DrawingUtils.cpp.

void mic::opengl::visualization::DrawingUtils::draw_grid ( float  r,
float  g,
float  b,
float  a,
float  cells_h,
float  cells_v,
float  line_width_ = 1.0 
)
void mic::opengl::visualization::DrawingUtils::draw_mark ( mark  m,
float  x,
float  y,
float  size,
float  line_width,
float  r,
float  g,
float  b,
float  a 
)
void mic::opengl::visualization::DrawingUtils::draw_plus ( float  x,
float  y,
float  size,
float  line_width,
float  r,
float  g,
float  b,
float  a 
)

Draws plus mark.

Parameters
x
y
size
line_width
r
g
b
a

Definition at line 208 of file DrawingUtils.cpp.

Referenced by draw_mark().

void mic::opengl::visualization::DrawingUtils::draw_rectangle ( float  x,
float  y,
float  h,
float  w,
float  r,
float  g,
float  b,
float  a 
)
void mic::opengl::visualization::DrawingUtils::draw_square ( float  x,
float  y,
float  size,
float  line_width,
float  r,
float  g,
float  b,
float  a 
)

Draws square mark.

Parameters
x
y
size
line_width
r
g
b
a

Definition at line 239 of file DrawingUtils.cpp.

Referenced by draw_mark().

void mic::opengl::visualization::DrawingUtils::draw_square_in_place ( float  size,
float  line_width,
float  r,
float  g,
float  b,
float  a 
)

Draws square.

Parameters
size
line_width
r
g
b
a

Definition at line 257 of file DrawingUtils.cpp.

void mic::opengl::visualization::DrawingUtils::draw_text ( float  x,
float  y,
char *  string,
float  r,
float  g,
float  b,
float  a,
void *  font 
)
void mic::opengl::visualization::DrawingUtils::draw_text_3d ( GLfloat  x,
GLfloat  y,
char *  text 
)

Draws text in 3D.

Parameters
x
y
text
void mic::opengl::visualization::DrawingUtils::draw_text_3i ( float  x,
float  y,
float  z,
char *  string,
float  r,
float  g,
float  b,
float  a,
void *  font 
)

Draws text.

Parameters
x
y
z
string
r
g
b
a
font

Definition at line 433 of file DrawingUtils.cpp.

void mic::opengl::visualization::DrawingUtils::draw_texture_in_place ( float  size)

Draws texture in the center of the window.

Parameters
size

Definition at line 361 of file DrawingUtils.cpp.

float mic::opengl::visualization::DrawingUtils::to_radians ( float  degrees)

Recalculate degrees to radians.

Parameters
degrees
Returns

Definition at line 457 of file DrawingUtils.cpp.


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