mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-15 17:25:53 +08:00
Increased the gimbal lock threshold to 170 degrees from 150 degrees.
This makes it possible to look at the bottom of an object. Conflicts: lib/Slic3r/GUI/3DScene.pm
This commit is contained in:
parent
497b7fb6c4
commit
9367eb6db7
@ -63,6 +63,8 @@ use constant VIEW_BOTTOM => [0.0,180.0];
|
||||
use constant VIEW_FRONT => [0.0,90.0];
|
||||
use constant VIEW_REAR => [180.0,90.0];
|
||||
|
||||
use constant GIMBALL_LOCK_THETA_MAX => 170;
|
||||
|
||||
# make OpenGL::Array thread-safe
|
||||
{
|
||||
no warnings 'redefine';
|
||||
@ -252,7 +254,7 @@ sub mouse_event {
|
||||
if (TURNTABLE_MODE) {
|
||||
$self->_sphi($self->_sphi + ($pos->x - $orig->x) * TRACKBALLSIZE);
|
||||
$self->_stheta($self->_stheta - ($pos->y - $orig->y) * TRACKBALLSIZE); #-
|
||||
$self->_stheta(150) if $self->_stheta > 150;
|
||||
$self->_stheta(GIMBALL_LOCK_THETA_MAX) if $self->_stheta > GIMBALL_LOCK_THETA_MAX;
|
||||
$self->_stheta(0) if $self->_stheta < 0;
|
||||
} else {
|
||||
my $size = $self->GetClientSize;
|
||||
@ -353,7 +355,7 @@ sub select_view {
|
||||
$self->_sphi($dirvec->[0]);
|
||||
$self->_stheta($dirvec->[1]);
|
||||
# Avoid gimball lock.
|
||||
$self->_stheta(150) if $self->_stheta > 150;
|
||||
$self->_stheta(GIMBALL_LOCK_THETA_MAX) if $self->_stheta > GIMBALL_LOCK_THETA_MAX;
|
||||
$self->_stheta(0) if $self->_stheta < 0;
|
||||
# View everything.
|
||||
$self->zoom_to_volumes;
|
||||
|
Loading…
x
Reference in New Issue
Block a user