From f20a0f978d4b443a5784c496969f338996d85ca2 Mon Sep 17 00:00:00 2001 From: ccolin Date: Tue, 22 Dec 2020 16:35:25 +0100 Subject: drone models (broken) and animation --- src/opengl_widget.hh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/opengl_widget.hh') diff --git a/src/opengl_widget.hh b/src/opengl_widget.hh index 48cb276..9259784 100644 --- a/src/opengl_widget.hh +++ b/src/opengl_widget.hh @@ -16,6 +16,16 @@ class OpenGLWidget : public QOpenGLWidget, public QOpenGLFunctions_4_4_Core { GLuint pos_attr, proj_attr, view_attr, model_attr; + QMatrix4x4 rot, rot_start; + GLfloat cam_dist = 1; + QPoint mouse_pos; + +protected: + virtual void mousePressEvent(QMouseEvent *e); + virtual void mouseReleaseEvent(QMouseEvent *e); + virtual void mouseMoveEvent(QMouseEvent *e); + virtual void wheelEvent(QWheelEvent *e); + public: static OpenGLWidget *instance; -- cgit v1.2.3-70-g09d2