Gizmos' grabbers size made uniform as the mean value of the selection's bounding box sides

This commit is contained in:
Enrico Turri 2019-03-25 15:03:35 +01:00
parent 0a3500b5ab
commit 1fbdf7bdaa
5 changed files with 11 additions and 20 deletions

View file

@ -307,7 +307,8 @@ void GLGizmoRotate::render_grabber_extension(const BoundingBoxf3& box, bool pick
if (m_quadric == nullptr)
return;
double size = m_dragging ? (double)m_grabbers[0].get_dragging_half_size((float)box.max_size()) : (double)m_grabbers[0].get_half_size((float)box.max_size());
float mean_size = (float)((box.size()(0) + box.size()(1) + box.size()(2)) / 3.0);
double size = m_dragging ? (double)m_grabbers[0].get_dragging_half_size(mean_size) : (double)m_grabbers[0].get_half_size(mean_size);
float color[3];
::memcpy((void*)color, (const void*)m_grabbers[0].color, 3 * sizeof(float));