Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2020-02-28 16:59:59 +0300
committerbubnikv <bubnikv@gmail.com>2020-02-28 16:59:59 +0300
commit0a0219961b8b96fadbcf780b8756347573ff2c9f (patch)
tree1cbbb18c71b9116d6e51dcb3a4bccf380b82971e /src/slic3r/GUI/Mouse3DController.cpp
parentb6068b6278441f084ccacb37e047f9cd9844cc2a (diff)
Free rotating camera reworked to rotate around the free rotation
axis in a single step.
Diffstat (limited to 'src/slic3r/GUI/Mouse3DController.cpp')
-rw-r--r--src/slic3r/GUI/Mouse3DController.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/slic3r/GUI/Mouse3DController.cpp b/src/slic3r/GUI/Mouse3DController.cpp
index 2be017e54..c92557417 100644
--- a/src/slic3r/GUI/Mouse3DController.cpp
+++ b/src/slic3r/GUI/Mouse3DController.cpp
@@ -162,8 +162,8 @@ bool Mouse3DController::State::apply(Camera& camera)
if (has_rotation())
{
- Vec3d rotation = (m_rotation_params.scale * m_rotation.queue.front()).cast<double>();
- camera.rotate_local_around_target(Vec3d(Geometry::deg2rad(rotation(0)), Geometry::deg2rad(-rotation(2)), Geometry::deg2rad(-rotation(1))));
+ Vec3d rot = (m_rotation_params.scale * m_rotation.queue.front()).cast<double>() * (PI / 180.);
+ camera.rotate_local_around_target(Vec3d(rot.x(), - rot.z(), rot.y()));
m_rotation.queue.pop();
ret = true;
}