mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-15 01:26:10 +08:00
Tech ENABLE_WORLD_COORDINATE - Fixed Move and Rotate Gizmo size when the selected instance is scaled
This commit is contained in:
parent
d9b3386d08
commit
8c30ddc54f
@ -205,8 +205,7 @@ void GLGizmoBase::render_grabbers_for_picking(const BoundingBoxf3& box) const
|
||||
|
||||
for (unsigned int i = 0; i < (unsigned int)m_grabbers.size(); ++i) {
|
||||
if (m_grabbers[i].enabled) {
|
||||
std::array<float, 4> color = picking_color_component(i);
|
||||
m_grabbers[i].color = color;
|
||||
m_grabbers[i].color = picking_color_component(i);
|
||||
m_grabbers[i].render_for_picking(mean_size);
|
||||
}
|
||||
}
|
||||
|
@ -318,7 +318,7 @@ BoundingBoxf3 GLGizmoMove3D::get_selection_box()
|
||||
const Selection::IndicesList& ids = selection.get_volume_idxs();
|
||||
for (unsigned int id : ids) {
|
||||
const GLVolume* v = selection.get_volume(id);
|
||||
box.merge(v->transformed_convex_hull_bounding_box(v->get_volume_transformation().get_matrix()));
|
||||
box.merge(v->transformed_convex_hull_bounding_box(v->get_instance_transformation().get_matrix(true, true, false, true) * v->get_volume_transformation().get_matrix()));
|
||||
}
|
||||
}
|
||||
return box;
|
||||
|
@ -216,9 +216,9 @@ void GLGizmoRotate::init_data_from_selection(const Selection& selection)
|
||||
const Selection::IndicesList& ids = selection.get_volume_idxs();
|
||||
for (unsigned int id : ids) {
|
||||
const GLVolume* v = selection.get_volume(id);
|
||||
m_bounding_box.merge(v->transformed_convex_hull_bounding_box(v->get_volume_transformation().get_matrix()));
|
||||
m_bounding_box.merge(v->transformed_convex_hull_bounding_box(v->get_instance_transformation().get_matrix(true, true, false, true) * v->get_volume_transformation().get_matrix()));
|
||||
}
|
||||
m_center = selection.get_volume(*ids.begin())->get_instance_transformation().get_matrix() * m_bounding_box.center();
|
||||
m_center = selection.get_volume(*ids.begin())->get_instance_transformation().get_matrix(false, false, true, false) * m_bounding_box.center();
|
||||
}
|
||||
m_radius = Offset + m_bounding_box.radius();
|
||||
#else
|
||||
|
Loading…
x
Reference in New Issue
Block a user