class mrpt::graphslam::CWindowManager¶
Class acts as a container for storing pointers to mrpt::gui::CDisplayWindow3D, mrpt::graphslam::CWindowObserver instances.
CWindowManager also provides methods for adding/positioning textMessages and viewports in the CDisplayWindow in a compact and consistent way.
#include <mrpt/graphslam/misc/CWindowManager.h> class CWindowManager: public mrpt::system::COutputLogger { public: // fields mrpt::gui::CDisplayWindow3D* win; mrpt::graphslam::CWindowObserver* observer; // construction CWindowManager(); CWindowManager(mrpt::gui::CDisplayWindow3D* win_in); CWindowManager(mrpt::gui::CDisplayWindow3D* win_in, mrpt::graphslam::CWindowObserver* observer_in); // methods void setCDisplayWindow3DPtr(mrpt::gui::CDisplayWindow3D* win_in); void setWindowObserverPtr(mrpt::graphslam::CWindowObserver* obsever_in); void assignTextMessageParameters(double* offset_y, int* text_index); bool isOpen(); void addTextMessage( const double x, const double y, const std::string& text, const mrpt::img::TColorf& color = mrpt::img::TColorf(1.0, 1.0, 1.0), const size_t unique_index = 0 ); void assignViewportParameters(double* x, double* y, double* width, double* height); };
Fields¶
mrpt::gui::CDisplayWindow3D* win
CDisplayWindow instance.
mrpt::graphslam::CWindowObserver* observer
CWindowObserver instance.
Construction¶
CWindowManager()
Default class constructor.
CWindowManager(mrpt::gui::CDisplayWindow3D* win_in)
Class constructor.
CWindowManager(mrpt::gui::CDisplayWindow3D* win_in, mrpt::graphslam::CWindowObserver* observer_in)
Class constructor.
Methods¶
void setCDisplayWindow3DPtr(mrpt::gui::CDisplayWindow3D* win_in)
Store the CDisplayWindow3D pointer in the CWindowManager instance.
See also:
void setWindowObserverPtr(mrpt::graphslam::CWindowObserver* obsever_in)
Store the CWindowObserver pointer in the CWindowManager instance.
See also:
void assignTextMessageParameters(double* offset_y, int* text_index)
Assign the next available offset_y and text_index for the textMessage under construction.
Used for consistent positioning of textMessages in the CDisplayWindow3D.
See also:
assignViewPortParameters
bool isOpen()
Wrapper call around the CWindowDisplay3D.
void addTextMessage( const double x, const double y, const std::string& text, const mrpt::img::TColorf& color = mrpt::img::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 the font name and size.
see initCWindowManager method for the default fontName and fontSize used.
void assignViewportParameters( double* x, double* y, double* width, double* height )
Assign position and size values for the placement of the next viewport.
Used for consistent positioning of the Viewports in the CDisplayWindow3D
See also: