Added method const GLVolume* Selection::get_first_volume() const to simplify client code
Fixed conflicts during rebase with master
This commit is contained in:
parent
9f503b95e8
commit
0e3490620e
13 changed files with 1094 additions and 1092 deletions
|
@ -94,7 +94,7 @@ void GLGizmoHollow::on_render_for_picking()
|
|||
{
|
||||
const Selection& selection = m_parent.get_selection();
|
||||
//#if ENABLE_RENDER_PICKING_PASS
|
||||
// m_z_shift = selection.get_volume(*selection.get_volume_idxs().begin())->get_sla_shift_z();
|
||||
// m_z_shift = selection.get_first_volume()->get_sla_shift_z();
|
||||
//#endif
|
||||
|
||||
glsafe(::glEnable(GL_DEPTH_TEST));
|
||||
|
@ -117,7 +117,7 @@ void GLGizmoHollow::render_points(const Selection& selection, bool picking)
|
|||
ScopeGuard guard([shader]() { if (shader) shader->stop_using(); });
|
||||
#endif // ENABLE_LEGACY_OPENGL_REMOVAL
|
||||
|
||||
const GLVolume* vol = selection.get_volume(*selection.get_volume_idxs().begin());
|
||||
const GLVolume* vol = selection.get_first_volume();
|
||||
Geometry::Transformation trafo = vol->get_instance_transformation() * vol->get_volume_transformation();
|
||||
|
||||
#if ENABLE_GL_SHADERS_ATTRIBUTES
|
||||
|
@ -242,7 +242,7 @@ bool GLGizmoHollow::unproject_on_mesh(const Vec2d& mouse_pos, std::pair<Vec3f, V
|
|||
|
||||
const Camera& camera = wxGetApp().plater()->get_camera();
|
||||
const Selection& selection = m_parent.get_selection();
|
||||
const GLVolume* volume = selection.get_volume(*selection.get_volume_idxs().begin());
|
||||
const GLVolume* volume = selection.get_first_volume();
|
||||
Geometry::Transformation trafo = volume->get_instance_transformation() * volume->get_volume_transformation();
|
||||
trafo.set_offset(trafo.get_offset() + Vec3d(0., 0., m_c->selection_info()->get_sla_shift()));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue