MachineIntelligenceCore:Visualization
|
Class offering methods for drawing in OpenGL windows. More...
#include <DrawingUtils.hpp>
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) |
Class offering methods for drawing in OpenGL windows.
Definition at line 63 of file DrawingUtils.hpp.
|
inlinevirtual |
Virtual destructor. Empty.
Definition at line 69 of file DrawingUtils.hpp.
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.
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.
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.
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
x | |
y | |
r | |
g | |
b | |
a |
Definition at line 447 of file DrawingUtils.cpp.
References draw_text().
void mic::opengl::visualization::DrawingUtils::draw_filled_rectangle | ( | float | x, |
float | y, | ||
float | h, | ||
float | w, | ||
float | r, | ||
float | g, | ||
float | b, | ||
float | a | ||
) |
Draws filled rectangle.
x | |
y | |
h | |
w | |
r | |
g | |
b | |
a |
Definition at line 385 of file DrawingUtils.cpp.
Referenced by mic::opengl::visualization::WindowMatrix2D::displayHandler(), mic::opengl::visualization::WindowMazeOfDigits::displayHandler(), mic::opengl::visualization::WindowMNISTDigit::displayHandler(), mic::opengl::visualization::WindowGrayscaleBatch< eT >::displayHandler(), mic::opengl::visualization::WindowRGBTensor< eT >::displayHandler(), and draw_filled_square().
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.
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.
x | |
y | |
size | |
r | |
g | |
b | |
a |
Definition at line 379 of file DrawingUtils.cpp.
References draw_filled_rectangle().
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.
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.
img | |
w | |
h | |
show_grid |
Draws image ROI.
img | |
w | |
h | |
x1 | |
y1 | |
x2 | |
y2 | |
r | |
g | |
b | |
a |
Draws frame.
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 |
||
) |
Draws grid (i.e. horizontal and vertical lines).
r | |
g | |
b | |
a | |
cells_h | |
cells_v | |
line_width_ | Width of the grid line (DEFAULT = 1.0) |
Definition at line 145 of file DrawingUtils.cpp.
Referenced by mic::opengl::visualization::WindowMatrix2D::displayHandler(), mic::opengl::visualization::WindowMNISTDigit::displayHandler(), mic::opengl::visualization::WindowMazeOfDigits::displayHandler(), mic::opengl::visualization::WindowGrayscaleBatch< eT >::displayHandler(), and mic::opengl::visualization::WindowRGBTensor< eT >::displayHandler().
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 | ||
) |
Draws mark.
m | |
x | |
y | |
size | |
line_width | |
r | |
g | |
b | |
a |
Definition at line 174 of file DrawingUtils.cpp.
References mic::opengl::visualization::CIRCLE, mic::opengl::visualization::CROSS, draw_circle(), draw_cross(), draw_plus(), draw_square(), mic::opengl::visualization::NO_LINE, mic::opengl::visualization::NO_MARK, mic::opengl::visualization::ONE_CIRCLE, mic::opengl::visualization::PLUS, and mic::opengl::visualization::SQUARE.
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.
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 | ||
) |
Draws rectangle.
x | |
y | |
h | |
w | |
r | |
g | |
b | |
a |
Definition at line 401 of file DrawingUtils.cpp.
Referenced by mic::opengl::visualization::WindowProbability::displayHandler(), and mic::opengl::visualization::WindowCollectorChart< eT >::redrawMainChartWindow().
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.
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 | ||
) |
void mic::opengl::visualization::DrawingUtils::draw_text | ( | float | x, |
float | y, | ||
char * | string, | ||
float | r, | ||
float | g, | ||
float | b, | ||
float | a, | ||
void * | font | ||
) |
Draws text.
x | |
y | |
string | |
r | |
g | |
b | |
a | |
font |
Definition at line 418 of file DrawingUtils.cpp.
Referenced by mic::opengl::visualization::WindowProbability::displayHandler(), draw_cursor(), mic::opengl::visualization::WindowCollectorChart< eT >::redrawMainChartWindow(), and mic::opengl::visualization::WindowCollectorChart< eT >::redrawSingleContainer().
void mic::opengl::visualization::DrawingUtils::draw_text_3d | ( | GLfloat | x, |
GLfloat | y, | ||
char * | text | ||
) |
Draws text in 3D.
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 | ||
) |
void mic::opengl::visualization::DrawingUtils::draw_texture_in_place | ( | float | size | ) |
Draws texture in the center of the window.
size |
Definition at line 361 of file DrawingUtils.cpp.
float mic::opengl::visualization::DrawingUtils::to_radians | ( | float | degrees | ) |
Recalculate degrees to radians.
degrees |
Definition at line 457 of file DrawingUtils.cpp.