Grabbers of different length in rotate 3D gizmo to avoid overlap at 90 degrees

This commit is contained in:
Enrico Turri 2018-11-13 11:52:13 +01:00
parent 03390c594f
commit 5089c4e2e0

View File

@ -494,7 +494,7 @@ void GLGizmoRotate::render_angle() const
void GLGizmoRotate::render_grabber(const BoundingBoxf3& box) const
{
double grabber_radius = (double)m_radius * (1.0 + (double)GrabberOffset);
double grabber_radius = (double)m_radius * (1.0 + (double)GrabberOffset) + 2.0 * (double)m_axis * box.max_size() * (double)Grabber::SizeFactor;
m_grabbers[0].center = Vec3d(::cos(m_angle) * grabber_radius, ::sin(m_angle) * grabber_radius, 0.0);
m_grabbers[0].angles(2) = m_angle;