diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-05-31 19:51:53 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-05-31 19:51:53 +0200 |
commit | 30e5f9beba48eb28aa5d76b98c5e923a9e7733e9 (patch) | |
tree | 54adfd2d93cd5f9d6dae47de051da87bb346a644 /pose-widget/glwidget.h | |
parent | fc0e8afb25c6fa32f299e8c7318c3bd2411673c9 (diff) |
ui: allow for octopus screen traversal
The octopus will now traverse the screen in response to translation
input. Previously it could only rotate, severely hampering its
maneuverability.
Diffstat (limited to 'pose-widget/glwidget.h')
-rw-r--r-- | pose-widget/glwidget.h | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/pose-widget/glwidget.h b/pose-widget/glwidget.h index b4756120..f54ae48d 100644 --- a/pose-widget/glwidget.h +++ b/pose-widget/glwidget.h @@ -21,19 +21,15 @@ class GLWidget : public QWidget public: GLWidget(QWidget *parent); ~GLWidget(); - void rotateBy(double xAngle, double yAngle, double zAngle); + void rotateBy(double xAngle, double yAngle, double zAngle, double x, double y, double z); protected: void paintEvent ( QPaintEvent * event ) override; private: - vec2 project(const vec3& point) { - vec3 ret = matrix * point; - return vec2 { ret(0, 0), ret(1, 0) }; - } - vec3 project2(const vec3& point) { - return matrix * point; - } + vec2 project(const vec3& point); + vec3 project2(const vec3& point); void project_quad_texture(); - rmat matrix; + rmat rotation; + vec3 translation; QImage front; QImage back; QImage texture; |