diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-08-08 17:15:58 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-08-08 17:16:14 +0200 |
commit | 4e98241bac583b65aa29bd8b37ea360e11961d6b (patch) | |
tree | 523aa6eefb953536027b0ab59888d83d7c2f372e /pose-widget/glwidget.cpp | |
parent | 2778ac50551c5175125a066ba6b59cad6ce4e45b (diff) |
gui: make octopus pitch the right way
Diffstat (limited to 'pose-widget/glwidget.cpp')
-rw-r--r-- | pose-widget/glwidget.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pose-widget/glwidget.cpp b/pose-widget/glwidget.cpp index 27e6becd..9523cd1f 100644 --- a/pose-widget/glwidget.cpp +++ b/pose-widget/glwidget.cpp @@ -33,7 +33,7 @@ void GLWidget::paintEvent (QPaintEvent * event) p.drawImage(event->rect(), image); } -void GLWidget::rotateBy(float xAngle, float yAngle, float zAngle, float x, float y, float z) +void GLWidget::rotateBy(double xAngle, double yAngle, double zAngle, double x, double y, double z) { if (visible_timer.elapsed_ms() > 250) { @@ -47,11 +47,11 @@ void GLWidget::rotateBy(float xAngle, float yAngle, float zAngle, float x, float using std::sin; using std::cos; - static constexpr num d2r = float(OPENTRACK_PI / 180); + static constexpr double d2r = OPENTRACK_PI / 180; translation = vec3(x, y, z); - euler::euler_t euler(-zAngle * d2r, xAngle * d2r, yAngle * d2r); + euler::euler_t euler(-zAngle * d2r, xAngle * d2r, -yAngle * d2r); euler::rmat r = euler::euler_to_rmat(euler); for (int i = 0; i < 3; i++) |