aboutsummaryrefslogtreecommitdiff
path: root/src/opengl_widget.hh
diff options
context:
space:
mode:
authorccolin2020-12-22 16:35:25 +0100
committerccolin2020-12-22 16:35:25 +0100
commitf20a0f978d4b443a5784c496969f338996d85ca2 (patch)
tree4ce5b40ea6cd57b4cd654273f54ea02ef3a4705b /src/opengl_widget.hh
parent89a3f9c4020bea4b4f85f32bdc6a2af13ccd5da0 (diff)
drone models (broken) and animation
Diffstat (limited to 'src/opengl_widget.hh')
-rw-r--r--src/opengl_widget.hh10
1 files changed, 10 insertions, 0 deletions
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;