13 #include <mrpt/config.h> 17 #if QT_VERSION < QT_VERSION_CHECK(5, 4, 0) 19 #define QOpenGLWidget QGLWidget 21 #include <QOpenGLWidget> 29 CQtGlCanvasBase(QWidget* parent =
nullptr);
30 ~CQtGlCanvasBase()
override =
default;
32 void initializeGL()
override;
33 void paintGL()
override;
34 void resizeGL(
int width,
int height)
override;
40 float getCameraZoomDistance()
const;
43 void mousePressEvent(QMouseEvent* event)
override;
44 void mouseMoveEvent(QMouseEvent* event)
override;
45 void mouseReleaseEvent(QMouseEvent* event)
override;
46 void wheelEvent(QWheelEvent* event)
override;
48 void swapBuffers()
override {}
49 void preRender()
override {}
50 void postRender()
override {}
51 void renderError(
const std::string& err_msg)
override;
53 virtual void updateCamerasParams();
57 bool isPressLMouseButton()
const;
58 bool isPressRMouseButton()
const;
62 void unpressMouseButtons();
65 bool m_isPressLMouseButton{
false};
66 bool m_isPressRMouseButton{
false};
73 #endif // MRPT_HAS_Qt5 std::shared_ptr< CRenderizable > Ptr
Classes for creating GUI windows for 2D and 3D visualization.
This base class implements a working with opengl::Camera and a OpenGL canvas, and it's used in gui::C...