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 virtual ~CQtGlCanvasBase() =
default;
32 virtual void initializeGL()
override;
33 virtual void paintGL()
override;
34 virtual void resizeGL(
int width,
int height)
override;
40 float getCameraZoomDistance()
const;
43 virtual void mousePressEvent(QMouseEvent* event)
override;
44 virtual void mouseMoveEvent(QMouseEvent* event)
override;
45 virtual void mouseReleaseEvent(QMouseEvent* event)
override;
46 virtual void wheelEvent(QWheelEvent* event)
override;
48 virtual void swapBuffers()
override {}
49 virtual void preRender()
override {}
50 virtual void postRender()
override {}
51 virtual 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;
66 bool m_isPressRMouseButton;
73 #endif // MRPT_HAS_Qt5 std::shared_ptr< CRenderizable > Ptr
GLsizei const GLchar ** string
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...
GLenum GLsizei GLsizei height