diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-08-11 06:35:43 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-08-11 06:35:43 +0200 |
commit | 9161646a6ed0b84770c9645689b98b2d4a2dfb82 (patch) | |
tree | 8fdfff62b9e6b64a8d2a169305b7ce9b4c54abba /pose-widget/glwidget.h | |
parent | 6685572195f1e3e22a803ca984d3566516488815 (diff) |
pose-widget: don't pollute global namespace
Diffstat (limited to 'pose-widget/glwidget.h')
-rwxr-xr-x | pose-widget/glwidget.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pose-widget/glwidget.h b/pose-widget/glwidget.h index aaea3e06..81517399 100755 --- a/pose-widget/glwidget.h +++ b/pose-widget/glwidget.h @@ -12,14 +12,14 @@ #include "opentrack/plugin-api.hpp" #include "opentrack/simple-mat.hpp" -typedef Mat<float, 2, 1> vec2; -typedef Mat<float, 3, 1> vec3; -typedef Mat<float, 3, 3> rmat; - class GLWidget : public QWidget { public: using num = float; + using vec2 = Mat<num, 2, 1>; + using vec3 = Mat<num, 3, 1>; + using rmat = Mat<num, 3, 3>; + GLWidget(QWidget *parent); ~GLWidget(); void rotateBy(float xAngle, float yAngle, float zAngle, float x, float y, float z); @@ -29,6 +29,7 @@ private: vec2 project(const vec3& point); vec3 project2(const vec3& point); void project_quad_texture(); + static inline vec3 normal(const vec3& p1, const vec3& p2, const vec3& p3); rmat rotation; vec3 translation; QImage front; |