diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-08-10 09:48:59 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-08-10 10:42:00 +0200 |
commit | 30f659b74a063677954b23c405be3b7229b10856 (patch) | |
tree | 1b9bfcd12e352432f3e4915192a00c6942e1b247 /pose-widget/glwidget.cpp | |
parent | 41a9c95dd2e250e8d9735880236f30662c149fe0 (diff) |
pose-widget, gui: allow for drawing regardless if window visible
Diffstat (limited to 'pose-widget/glwidget.cpp')
-rw-r--r-- | pose-widget/glwidget.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/pose-widget/glwidget.cpp b/pose-widget/glwidget.cpp index 9523cd1f..2e36a095 100644 --- a/pose-widget/glwidget.cpp +++ b/pose-widget/glwidget.cpp @@ -13,13 +13,15 @@ #include <QPainter> #include <QPaintEvent> +#include <QDebug> + GLWidget::GLWidget(QWidget *parent) : QWidget(parent), visible(true) { Q_INIT_RESOURCE(posewidget); front = QImage(QString(":/images/side1.png")); back = QImage(QString(":/images/side6.png")); - rotateBy(0, 0, 0, 0, 0, 0); + rotateBy_real(0, 0, 0, 0, 0, 0); } GLWidget::~GLWidget() @@ -41,9 +43,12 @@ void GLWidget::rotateBy(double xAngle, double yAngle, double zAngle, double x, d visible_timer.start(); } - if (!visible) - return; + if (visible) + rotateBy_real(xAngle, yAngle, zAngle, x, y, z); +} +void GLWidget::rotateBy_real(double xAngle, double yAngle, double zAngle, double x, double y, double z) +{ using std::sin; using std::cos; |