diff options
author | Enrico Turri <enricoturri@seznam.cz> | 2019-06-13 09:47:38 +0300 |
---|---|---|
committer | Enrico Turri <enricoturri@seznam.cz> | 2019-06-13 09:47:38 +0300 |
commit | 9805417028c142784900ec5efbca9cd7f150c80b (patch) | |
tree | 93b34fe80afcb6116ee075a1b91624fe6b28d375 /src | |
parent | 7bfb0aaac0a8f6ba257610a12347247a6621dbb8 (diff) |
Fixed method Camera::get_position()
Diffstat (limited to 'src')
-rw-r--r-- | src/slic3r/GUI/Camera.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/slic3r/GUI/Camera.hpp b/src/slic3r/GUI/Camera.hpp index adb148807..1c75ef4b6 100644 --- a/src/slic3r/GUI/Camera.hpp +++ b/src/slic3r/GUI/Camera.hpp @@ -58,7 +58,7 @@ public: Vec3d get_dir_up() const { return m_view_matrix.matrix().block(0, 0, 3, 3).row(1); } Vec3d get_dir_forward() const { return -m_view_matrix.matrix().block(0, 0, 3, 3).row(2); } - Vec3d get_position() const { return m_view_matrix.matrix().block(0, 3, 3, 1); } + Vec3d get_position() const { return m_view_matrix.matrix().inverse().block(0, 3, 3, 1); } void apply_viewport(int x, int y, unsigned int w, unsigned int h) const; void apply_view_matrix() const; |