New selection -> Gizmos methods refactored to accept selection instead of bounding box and scale gizmo in local system for single instance selections

This commit is contained in:
Enrico Turri 2018-10-15 11:30:50 +02:00
parent 35c7c418e9
commit f2486bd87d
4 changed files with 301 additions and 8 deletions

View file

@ -573,7 +573,11 @@ private:
bool is_running() const;
bool is_dragging() const;
#if ENABLE_EXTENDED_SELECTION
void start_dragging(const Selection& selection);
#else
void start_dragging(const BoundingBoxf3& box);
#endif // ENABLE_EXTENDED_SELECTION
void stop_dragging();
#if ENABLE_EXTENDED_SELECTION
@ -603,16 +607,25 @@ private:
void set_flattening_data(const ModelObject* model_object);
#if ENABLE_EXTENDED_SELECTION
void render_current_gizmo(const Selection& selection) const;
void render_current_gizmo_for_picking_pass(const Selection& selection) const;
#else
void render_current_gizmo(const BoundingBoxf3& box) const;
void render_current_gizmo_for_picking_pass(const BoundingBoxf3& box) const;
#endif // ENABLE_EXTENDED_SELECTION
void render_overlay(const GLCanvas3D& canvas) const;
private:
void _reset();
void _render_overlay(const GLCanvas3D& canvas) const;
#if ENABLE_EXTENDED_SELECTION
void _render_current_gizmo(const Selection& selection) const;
#else
void _render_current_gizmo(const BoundingBoxf3& box) const;
#endif // ENABLE_EXTENDED_SELECTION
float _get_total_overlay_height() const;
GLGizmoBase* _get_current() const;