summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--gui/main-window.cpp2
-rw-r--r--pose-widget/glwidget.cpp11
-rw-r--r--pose-widget/glwidget.h1
3 files changed, 10 insertions, 4 deletions
diff --git a/gui/main-window.cpp b/gui/main-window.cpp
index 21a47ef4..21e5a3b4 100644
--- a/gui/main-window.cpp
+++ b/gui/main-window.cpp
@@ -352,7 +352,7 @@ void MainWindow::stopTracker()
//ui.game_name->setText("Not connected");
pose_update_timer.stop();
- ui.pose_display->rotateBy(0, 0, 0, 0, 0, 0);
+ ui.pose_display->rotateBy_real(0, 0, 0, 0, 0, 0);
if (pTrackerDialog)
pTrackerDialog->unregister_tracker();
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;
diff --git a/pose-widget/glwidget.h b/pose-widget/glwidget.h
index 03ca5d48..95be2914 100644
--- a/pose-widget/glwidget.h
+++ b/pose-widget/glwidget.h
@@ -31,6 +31,7 @@ public:
GLWidget(QWidget *parent);
~GLWidget();
void rotateBy(double xAngle, double yAngle, double zAngle, double x, double y, double z);
+ void rotateBy_real(double xAngle, double yAngle, double zAngle, double x, double y, double z);
protected:
void paintEvent (QPaintEvent *event) override;
private: