FIX: GizmoScale3D
jira: no-jira Change-Id: I486e10e3241de6ae8a8a350f424d05a4ce0f17b8
This commit is contained in:
parent
94ceedf97f
commit
3719059c39
|
@ -99,8 +99,10 @@ void GLGizmoRotate::on_update(const UpdateData& data)
|
||||||
|
|
||||||
double len = mouse_pos.norm();
|
double len = mouse_pos.norm();
|
||||||
|
|
||||||
|
const auto& scale_factor = Geometry::Transformation(m_base_model_matrix).get_scaling_factor();
|
||||||
|
const float radius = scale_factor.maxCoeff()* m_radius;
|
||||||
// snap to coarse snap region
|
// snap to coarse snap region
|
||||||
if ((m_snap_coarse_in_radius <= len) && (len <= m_snap_coarse_out_radius))
|
if ((m_snap_coarse_in_radius * radius <= len) && (len <= m_snap_coarse_out_radius * radius))
|
||||||
{
|
{
|
||||||
double step = 2.0 * (double)PI / (double)SnapRegionsCount;
|
double step = 2.0 * (double)PI / (double)SnapRegionsCount;
|
||||||
theta = step * (double)std::round(theta / step);
|
theta = step * (double)std::round(theta / step);
|
||||||
|
@ -108,7 +110,7 @@ void GLGizmoRotate::on_update(const UpdateData& data)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// snap to fine snap region (scale)
|
// snap to fine snap region (scale)
|
||||||
if ((m_snap_fine_in_radius <= len) && (len <= m_snap_fine_out_radius))
|
if ((m_snap_fine_in_radius * radius <= len) && (len <= m_snap_fine_out_radius * radius))
|
||||||
{
|
{
|
||||||
double step = 2.0 * (double)PI / (double)ScaleStepsCount;
|
double step = 2.0 * (double)PI / (double)ScaleStepsCount;
|
||||||
theta = step * (double)std::round(theta / step);
|
theta = step * (double)std::round(theta / step);
|
||||||
|
|
Loading…
Reference in New Issue