1 #ifndef CWINDOWMANAGER_H 2 #define CWINDOWMANAGER_H 11 namespace mrpt {
namespace graphslam {
25 this->initCWindowManager();
30 this->initCWindowManager();
31 this->setCDisplayWindow3DPtr(win_in);
37 this->initCWindowManager();
39 this->setWindowObserverPtr(observer_in);
40 this->setCDisplayWindow3DPtr(win_in);
51 m_fetched_displaywindow_pointer =
true;
61 m_fetched_observer_pointer =
true;
62 observer = obsever_in;
76 double* offset_y,
int* text_index) {
78 *offset_y = m_curr_offset_y;
79 m_curr_offset_y += m_offset_y_step;
81 *text_index = m_curr_text_index;
82 m_curr_text_index += m_index_text_step;
102 const double x,
const double y,
105 const size_t unique_index=0) {
110 win->addTextMessage(
x,
y,
113 m_font_name, m_font_size,
128 *
width = m_viewp_width;
131 m_viewp_y -= m_viewp_height + m_viewp_margin;
140 m_fetched_displaywindow_pointer =
false;
141 m_fetched_observer_pointer=
false;
145 m_offset_y_step = 20.0;
146 m_index_text_step = 1;
147 m_font_name =
"sans";
149 m_curr_offset_y = 30;
150 m_curr_text_index = 1;
153 m_viewp_height = 0.2;
155 m_viewp_margin = 0.01;
159 this->setLoggerName(
"CWindowManager");
void setCDisplayWindow3DPtr(mrpt::gui::CDisplayWindow3D *win_in)
Store the CDisplayWindow3D pointer in the CWindowManager instance.
CWindowManager(mrpt::gui::CDisplayWindow3D *win_in, mrpt::graphslam::CWindowObserver *observer_in)
Class constructor.
void setWindowObserverPtr(mrpt::graphslam::CWindowObserver *obsever_in)
Store the CWindowObserver pointer in the CWindowManager instance.
double m_viewp_y
vertical layout of the viewports
void addTextMessage(const double x, const double y, const std::string &text, const mrpt::utils::TColorf &color=mrpt::utils::TColorf(1.0, 1.0, 1.0), const size_t unique_index=0)
Wrapper around the CDisplayWindow3D::addTextMessage method, so that the user does not have to specify...
void assignViewportParameters(double *x, double *y, double *width, double *height)
Assign position and size values for the placement of the next viewport.
bool isOpen()
Wrapper call around the CWindowDisplay3D.
~CWindowManager()
Class destructor.
mrpt::gui::CDisplayWindow3D * win
CDisplayWindow instance.
mrpt::graphslam::CWindowObserver * observer
CWindowObserver instance.
bool m_fetched_displaywindow_pointer
CWindowManager()
Default class constructor.
GLsizei const GLchar ** string
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
bool m_fetched_observer_pointer
Monitor events in the visualization window.
renders glyphs filled with antialiased outlines
A RGB color - floats in the range [0,1].
void initCWindowManager()
Initialization method, to be called from the various Constructors.
CWindowManager(mrpt::gui::CDisplayWindow3D *win_in)
Class constructor.
GLenum GLsizei GLsizei height
#define MRPT_LOG_DEBUG_STREAM(__CONTENTS)
Class acts as a container for storing pointers to mrpt::gui::CDisplayWindow3D, mrpt::graphslam::CWind...
void assignTextMessageParameters(double *offset_y, int *text_index)
Assign the next available offset_y and text_index for the textMessage under construction.
A graphical user interface (GUI) for efficiently rendering 3D scenes in real-time.