From 9fec162fd5ac3f94850653c63f45ed0a83c5a9d0 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 21 Jul 2016 14:25:03 +0200 Subject: pose-widget: don't do barycentric lookup twice In the affine transformation (aka the pose widget) of The Octopus we use barycentric coordinates of two triangles making up The Octopus rectangle. Triangles are symmetrical. Take advantage of the symmetry (no perspective transform applied) and take barycentric coordinates only once. --- pose-widget/glwidget.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pose-widget/glwidget.h') diff --git a/pose-widget/glwidget.h b/pose-widget/glwidget.h index 25823985..0d48ede9 100644 --- a/pose-widget/glwidget.h +++ b/pose-widget/glwidget.h @@ -31,7 +31,7 @@ public: ~GLWidget(); void rotateBy(float xAngle, float yAngle, float zAngle, float x, float y, float z); protected: - void paintEvent ( QPaintEvent * event ) override; + void paintEvent (QPaintEvent *event) override; private: vec2 project(const vec3& point); vec3 project2(const vec3& point); -- cgit v1.2.3