mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Free rotating camera reworked to rotate around the free rotation
axis in a single step.
This commit is contained in:
parent
b6068b6278
commit
0a0219961b
3 changed files with 15 additions and 14 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue