MachineIntelligenceCore:Visualization
|
OpenGL-based window responsible for displaying 2D matrices. More...
#include <WindowMatrix2D.hpp>
Public Member Functions | |
WindowMatrix2D (std::string name_="Matrix2D", unsigned int position_x_=0, unsigned int position_y_=0, unsigned int width_=512, unsigned int height_=512) | |
virtual | ~WindowMatrix2D () |
void | displayHandler (void) |
void | setMatrixSynchronized (mic::types::MatrixXf &displayed_matrix_) |
void | setMatrixUnsynchronized (mic::types::MatrixXf &displayed_matrix_) |
void | setMatrixPointerSynchronized (mic::types::MatrixXfPtr displayed_matrix_ptr_) |
void | setMatrixPointerUnsynchronized (mic::types::MatrixXfPtr displayed_matrix_ptr_) |
Public Member Functions inherited from 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) | |
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_) |
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) |
Private Attributes | |
mic::types::MatrixXfPtr | displayed_matrix_ptr |
Additional Inherited Members | |
Protected Member Functions inherited from mic::opengl::visualization::Window | |
void | keyhandlerFullscreen (void) |
Protected Attributes inherited from mic::opengl::visualization::Window | |
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 2D matrices.
Definition at line 40 of file WindowMatrix2D.hpp.
mic::opengl::visualization::WindowMatrix2D::WindowMatrix2D | ( | std::string | name_ = "Matrix2D" , |
unsigned int | position_x_ = 0 , |
||
unsigned int | position_y_ = 0 , |
||
unsigned int | width_ = 512 , |
||
unsigned int | height_ = 512 |
||
) |
Constructor. NULLs the image pointer.
Definition at line 30 of file WindowMatrix2D.cpp.
References displayed_matrix_ptr.
|
virtual |
Destructor.
Definition at line 40 of file WindowMatrix2D.cpp.
|
virtual |
Refreshes the content of the window.
Implements mic::opengl::visualization::Window.
Definition at line 45 of file WindowMatrix2D.cpp.
References displayed_matrix_ptr, mic::opengl::visualization::DrawingUtils::draw_filled_rectangle(), and mic::opengl::visualization::DrawingUtils::draw_grid().
void mic::opengl::visualization::WindowMatrix2D::setMatrixPointerSynchronized | ( | mic::types::MatrixXfPtr | displayed_matrix_ptr_ | ) |
Sets pointer to displayed matrix.
displayed_matrix_ |
Definition at line 114 of file WindowMatrix2D.cpp.
References displayed_matrix_ptr.
void mic::opengl::visualization::WindowMatrix2D::setMatrixPointerUnsynchronized | ( | mic::types::MatrixXfPtr | displayed_matrix_ptr_ | ) |
Sets pointer to displayed matrix. Unsynchronized i.e. must be used inside of manually synchronized section.
displayed_matrix_ |
Definition at line 122 of file WindowMatrix2D.cpp.
References displayed_matrix_ptr.
void mic::opengl::visualization::WindowMatrix2D::setMatrixSynchronized | ( | mic::types::MatrixXf & | displayed_matrix_ | ) |
Sets displayed matrix.
displayed_matrix_ |
Definition at line 92 of file WindowMatrix2D.cpp.
References displayed_matrix_ptr.
void mic::opengl::visualization::WindowMatrix2D::setMatrixUnsynchronized | ( | mic::types::MatrixXf & | displayed_matrix_ | ) |
Sets displayed matrix. Unsynchronized i.e. must be used inside of manually synchronized section.
displayed_matrix_ |
Definition at line 104 of file WindowMatrix2D.cpp.
References displayed_matrix_ptr.
|
private |
Pointer to displayed matrix.
Definition at line 90 of file WindowMatrix2D.hpp.
Referenced by displayHandler(), setMatrixPointerSynchronized(), setMatrixPointerUnsynchronized(), setMatrixSynchronized(), setMatrixUnsynchronized(), and WindowMatrix2D().