MachineIntelligenceCore:Visualization
|
OpenGL-based window responsible for displaying data collected in DataCollector objects in the form of a chart. More...
#include <WindowCollectorChart.hpp>
Public Member Functions | |
WindowCollectorChart (std::string name_="Chart", unsigned int position_x_=0, unsigned int position_y_=0, unsigned int width_=1024, unsigned int height_=256) | |
virtual | ~WindowCollectorChart () |
void | displayHandler (void) |
void | setDataCollectorPtr (mic::utils::DataCollectorPtr< std::string, eT > collector_ptr_) |
void | redrawMainChartWindow () |
void | redrawSingleContainer (std::string &label_, std::vector< eT > &data_, eT min_value_, eT max_value_, mic::types::color_rgba color_, eT line_width_, unsigned short label_x_offset_, unsigned short label_y_offset_) |
![]() | |
Window (std::string name_="OpenGlWindow", unsigned int position_x_=0, unsigned int position_y_=0, unsigned int width_=512, unsigned int height_=512) | |
virtual | ~Window () |
unsigned int | getId () const |
std::string | getName () const |
virtual void | mouseHandler (int button, int state, int x, int y) |
virtual void | reshapeHandler (int width_, int height_) |
![]() | |
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) |
Private Member Functions | |
void | keyhandlerZoomIn (void) |
void | keyhandlerZoomOut (void) |
void | keyhandlerZoomReset (void) |
Private Attributes | |
mic::utils::DataCollectorPtr < std::string, eT > | collector_ptr |
Data collector associated with . More... | |
float | zoom_factor |
Zoom factor - used for zoomin in and out in the chart window. More... | |
double | chart_width |
Chart width. More... | |
double | chart_height |
Chart width. More... | |
double | label_offset_x |
Label offset x. More... | |
double | label_offset_y |
Label offset y. More... | |
double | number_of_horizontal_bars |
Number of horizontal bars in chart. More... | |
Additional Inherited Members | |
![]() | |
void | keyhandlerFullscreen (void) |
![]() | |
std::string | name |
unsigned int | position_x |
unsigned int | position_y |
unsigned int | width |
unsigned int | height |
unsigned int | previous_width |
unsigned int | previous_height |
unsigned int | id |
bool | fullscreen_mode |
OpenGL-based window responsible for displaying data collected in DataCollector objects in the form of a chart.
LABEL_TYPE | Template parameter denoting the label type. @tparam eT Precission (float/double) (DEFAULT=float). |
Definition at line 43 of file WindowCollectorChart.hpp.
|
inline |
Constructor.
Definition at line 48 of file WindowCollectorChart.hpp.
References mic::opengl::visualization::WindowCollectorChart< eT >::chart_height, mic::opengl::visualization::WindowCollectorChart< eT >::chart_width, mic::opengl::visualization::WindowCollectorChart< eT >::keyhandlerZoomIn(), mic::opengl::visualization::WindowCollectorChart< eT >::keyhandlerZoomOut(), mic::opengl::visualization::WindowCollectorChart< eT >::keyhandlerZoomReset(), mic::opengl::visualization::WindowCollectorChart< eT >::label_offset_x, mic::opengl::visualization::WindowCollectorChart< eT >::label_offset_y, mic::opengl::visualization::WindowCollectorChart< eT >::number_of_horizontal_bars, VGL_MANAGER, and mic::opengl::visualization::WindowCollectorChart< eT >::zoom_factor.
|
inlinevirtual |
Destructor. Empty for now.
Definition at line 79 of file WindowCollectorChart.hpp.
|
inlinevirtual |
Refreshes the content of the window.
Implements mic::opengl::visualization::Window.
Definition at line 84 of file WindowCollectorChart.hpp.
References mic::opengl::visualization::WindowCollectorChart< eT >::chart_height, mic::opengl::visualization::WindowCollectorChart< eT >::collector_ptr, mic::opengl::visualization::Window::height, mic::opengl::visualization::WindowCollectorChart< eT >::label_offset_y, mic::opengl::visualization::WindowCollectorChart< eT >::redrawMainChartWindow(), and mic::opengl::visualization::WindowCollectorChart< eT >::redrawSingleContainer().
|
inlineprivate |
Keyhandler: zoom in (upscale chart).
Definition at line 268 of file WindowCollectorChart.hpp.
References mic::opengl::visualization::WindowCollectorChart< eT >::zoom_factor.
Referenced by mic::opengl::visualization::WindowCollectorChart< eT >::WindowCollectorChart().
|
inlineprivate |
Keyhandler: zoom out (downscale chart).
Definition at line 275 of file WindowCollectorChart.hpp.
References mic::opengl::visualization::WindowCollectorChart< eT >::zoom_factor.
Referenced by mic::opengl::visualization::WindowCollectorChart< eT >::WindowCollectorChart().
|
inlineprivate |
Keyhandler: reset zoom (set zoom_factor to default: 1.0).
Definition at line 282 of file WindowCollectorChart.hpp.
References mic::opengl::visualization::WindowCollectorChart< eT >::zoom_factor.
Referenced by mic::opengl::visualization::WindowCollectorChart< eT >::WindowCollectorChart().
|
inline |
Redraws main chart window.
Definition at line 157 of file WindowCollectorChart.hpp.
References mic::opengl::visualization::WindowCollectorChart< eT >::chart_height, mic::opengl::visualization::WindowCollectorChart< eT >::chart_width, mic::opengl::visualization::DrawingUtils::draw_rectangle(), mic::opengl::visualization::DrawingUtils::draw_text(), mic::opengl::visualization::Window::height, mic::opengl::visualization::WindowCollectorChart< eT >::label_offset_y, mic::opengl::visualization::WindowCollectorChart< eT >::number_of_horizontal_bars, and mic::opengl::visualization::Window::width.
Referenced by mic::opengl::visualization::WindowCollectorChart< eT >::displayHandler().
|
inline |
Redraws single container.
label_ | Label of data. |
data_ | Vector containing data. |
min_value_ | Min value. |
max_value_ | Max value. |
color_ | Colour of line/label. |
line_width_ | Line width. |
label_x_offset_ | Label x offset. |
label_y_offset_ | Label y offset. |
Definition at line 198 of file WindowCollectorChart.hpp.
References mic::opengl::visualization::WindowCollectorChart< eT >::chart_height, mic::opengl::visualization::WindowCollectorChart< eT >::chart_width, mic::opengl::visualization::DrawingUtils::draw_text(), mic::opengl::visualization::Window::height, mic::opengl::visualization::WindowCollectorChart< eT >::label_offset_y, mic::opengl::visualization::Window::width, and mic::opengl::visualization::WindowCollectorChart< eT >::zoom_factor.
Referenced by mic::opengl::visualization::WindowCollectorChart< eT >::displayHandler().
|
inline |
Sets data collector.
collector_ptr_ | Data collector. |
Definition at line 146 of file WindowCollectorChart.hpp.
References mic::opengl::visualization::WindowCollectorChart< eT >::collector_ptr.
|
private |
Chart width.
Definition at line 254 of file WindowCollectorChart.hpp.
Referenced by mic::opengl::visualization::WindowCollectorChart< eT >::displayHandler(), mic::opengl::visualization::WindowCollectorChart< eT >::redrawMainChartWindow(), mic::opengl::visualization::WindowCollectorChart< eT >::redrawSingleContainer(), and mic::opengl::visualization::WindowCollectorChart< eT >::WindowCollectorChart().
|
private |
Chart width.
Definition at line 251 of file WindowCollectorChart.hpp.
Referenced by mic::opengl::visualization::WindowCollectorChart< eT >::redrawMainChartWindow(), mic::opengl::visualization::WindowCollectorChart< eT >::redrawSingleContainer(), and mic::opengl::visualization::WindowCollectorChart< eT >::WindowCollectorChart().
|
private |
Data collector associated with .
Definition at line 245 of file WindowCollectorChart.hpp.
Referenced by mic::opengl::visualization::WindowCollectorChart< eT >::displayHandler(), and mic::opengl::visualization::WindowCollectorChart< eT >::setDataCollectorPtr().
|
private |
Label offset x.
Definition at line 257 of file WindowCollectorChart.hpp.
Referenced by mic::opengl::visualization::WindowCollectorChart< eT >::WindowCollectorChart().
|
private |
Label offset y.
Definition at line 260 of file WindowCollectorChart.hpp.
Referenced by mic::opengl::visualization::WindowCollectorChart< eT >::displayHandler(), mic::opengl::visualization::WindowCollectorChart< eT >::redrawMainChartWindow(), mic::opengl::visualization::WindowCollectorChart< eT >::redrawSingleContainer(), and mic::opengl::visualization::WindowCollectorChart< eT >::WindowCollectorChart().
|
private |
Number of horizontal bars in chart.
Definition at line 263 of file WindowCollectorChart.hpp.
Referenced by mic::opengl::visualization::WindowCollectorChart< eT >::redrawMainChartWindow(), and mic::opengl::visualization::WindowCollectorChart< eT >::WindowCollectorChart().
|
private |
Zoom factor - used for zoomin in and out in the chart window.
Definition at line 248 of file WindowCollectorChart.hpp.
Referenced by mic::opengl::visualization::WindowCollectorChart< eT >::keyhandlerZoomIn(), mic::opengl::visualization::WindowCollectorChart< eT >::keyhandlerZoomOut(), mic::opengl::visualization::WindowCollectorChart< eT >::keyhandlerZoomReset(), mic::opengl::visualization::WindowCollectorChart< eT >::redrawSingleContainer(), and mic::opengl::visualization::WindowCollectorChart< eT >::WindowCollectorChart().