MachineIntelligenceCore:Visualization
|
Parent class of all OpenGL-based windows (abstract). More...
#include <Window.hpp>
Public Member Functions | |
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 | displayHandler (void)=0 |
virtual void | mouseHandler (int button, int state, int x, int y) |
virtual void | reshapeHandler (int width_, int height_) |
Public Member Functions inherited from mic::opengl::visualization::DrawingUtils | |
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) |
Protected Member Functions | |
void | keyhandlerFullscreen (void) |
Protected Attributes | |
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 |
Parent class of all OpenGL-based windows (abstract).
Definition at line 51 of file Window.hpp.
mic::opengl::visualization::Window::Window | ( | std::string | name_ = "OpenGlWindow" , |
unsigned int | position_x_ = 0 , |
||
unsigned int | position_y_ = 0 , |
||
unsigned int | width_ = 512 , |
||
unsigned int | height_ = 512 |
||
) |
Public constructor. Initializes GLUT window, sets window parameters (size, position, name), sets OpenGL parameters (e.g. antialiasing), registers FullWindow key handler and registers the window in manager.
name_ | Window name. As default set to "OpenGlWindow". |
height_ | Window height. As default set to 512. |
width_ | Window width. As default set to 512. |
position_x_ | X coordinate of the upper left window corner. |
position_y_ | Y coordinate of the upper left window corner. |
Definition at line 30 of file Window.cpp.
References fullscreen_mode, height, keyhandlerFullscreen(), name, position_x, position_y, VGL_MANAGER, and width.
|
virtual |
Destructor.
Definition at line 72 of file Window.cpp.
|
pure virtual |
Refreshes the content of the window - abstract method.
Implemented in mic::opengl::visualization::WindowRGBTensor< eT >, mic::opengl::visualization::WindowGrayscaleBatch< eT >, mic::opengl::visualization::WindowCollectorChart< eT >, mic::opengl::visualization::WindowMazeOfDigits, mic::opengl::visualization::WindowMNISTDigit, mic::opengl::visualization::WindowProbability, and mic::opengl::visualization::WindowMatrix2D.
Referenced by mic::opengl::visualization::WindowManager::displayHandler().
unsigned int mic::opengl::visualization::Window::getId | ( | ) | const |
Returns id of the window.
Definition at line 77 of file Window.cpp.
References id.
Referenced by mic::opengl::visualization::WindowManager::registerWindow().
std::string mic::opengl::visualization::Window::getName | ( | ) | const |
Returns name of the window.
Definition at line 81 of file Window.cpp.
References name.
|
protected |
Keyhandler: toggles fullscreen on/off.
Definition at line 103 of file Window.cpp.
References fullscreen_mode, height, position_x, position_y, previous_height, previous_width, and width.
Referenced by Window().
|
inlinevirtual |
Mouse handler - virtual method, to be overridden if necessary.
Definition at line 92 of file Window.hpp.
Referenced by mic::opengl::visualization::WindowManager::mouseHandler().
|
virtual |
Changes size of the window.
width_ | New width. |
height_ | New height. |
Definition at line 85 of file Window.cpp.
Referenced by mic::opengl::visualization::WindowManager::reshapeHandler().
|
protected |
Full screen mode.
Definition at line 145 of file Window.hpp.
Referenced by keyhandlerFullscreen(), and Window().
|
protected |
Window height.
Definition at line 125 of file Window.hpp.
Referenced by mic::opengl::visualization::WindowCollectorChart< eT >::displayHandler(), mic::opengl::visualization::WindowRGBTensor< eT >::displayHandler(), keyhandlerFullscreen(), mic::opengl::visualization::WindowCollectorChart< eT >::redrawMainChartWindow(), mic::opengl::visualization::WindowCollectorChart< eT >::redrawSingleContainer(), reshapeHandler(), and Window().
|
protected |
|
protected |
Name of the window.
Definition at line 105 of file Window.hpp.
|
protected |
Window left corner position x.
Definition at line 110 of file Window.hpp.
Referenced by keyhandlerFullscreen(), and Window().
|
protected |
Window left corner position y.
Definition at line 115 of file Window.hpp.
Referenced by keyhandlerFullscreen(), and Window().
|
protected |
Window height before entered the full-screen mode.
Definition at line 135 of file Window.hpp.
Referenced by keyhandlerFullscreen().
|
protected |
Window width before entered the full-screen mode.
Definition at line 130 of file Window.hpp.
Referenced by keyhandlerFullscreen().
|
protected |
Window width.
Definition at line 120 of file Window.hpp.
Referenced by mic::opengl::visualization::WindowRGBTensor< eT >::displayHandler(), keyhandlerFullscreen(), mic::opengl::visualization::WindowCollectorChart< eT >::redrawMainChartWindow(), mic::opengl::visualization::WindowCollectorChart< eT >::redrawSingleContainer(), reshapeHandler(), and Window().