mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 01:07:57 -06:00
Visual hints in the 3D scene when sidebar matrix fields have focus (wip [position+scale+size] and disabled)
This commit is contained in:
parent
b7c506170d
commit
0dcdcf74fc
5 changed files with 374 additions and 0 deletions
|
@ -368,6 +368,12 @@ class GLCanvas3D
|
|||
public:
|
||||
class Selection
|
||||
{
|
||||
#if ENABLE_SIDEBAR_VISUAL_HINTS
|
||||
static const float RED[3];
|
||||
static const float GREEN[3];
|
||||
static const float BLUE[3];
|
||||
#endif // ENABLE_SIDEBAR_VISUAL_HINTS
|
||||
|
||||
public:
|
||||
typedef std::set<unsigned int> IndicesList;
|
||||
|
||||
|
@ -495,6 +501,9 @@ public:
|
|||
#if ENABLE_RENDER_SELECTION_CENTER
|
||||
GLUquadricObj* m_quadric;
|
||||
#endif // ENABLE_RENDER_SELECTION_CENTER
|
||||
#if ENABLE_SIDEBAR_VISUAL_HINTS
|
||||
mutable GLArrow m_arrow;
|
||||
#endif // ENABLE_SIDEBAR_VISUAL_HINTS
|
||||
|
||||
public:
|
||||
Selection();
|
||||
|
@ -503,6 +512,9 @@ public:
|
|||
#endif // ENABLE_RENDER_SELECTION_CENTER
|
||||
|
||||
void set_volumes(GLVolumePtrs* volumes);
|
||||
#if ENABLE_SIDEBAR_VISUAL_HINTS
|
||||
bool init(bool useVBOs);
|
||||
#endif // ENABLE_SIDEBAR_VISUAL_HINTS
|
||||
|
||||
Model* get_model() const { return m_model; }
|
||||
void set_model(Model* model);
|
||||
|
@ -580,6 +592,9 @@ public:
|
|||
#if ENABLE_RENDER_SELECTION_CENTER
|
||||
void render_center() const;
|
||||
#endif // ENABLE_RENDER_SELECTION_CENTER
|
||||
#if ENABLE_SIDEBAR_VISUAL_HINTS
|
||||
void render_sidebar_hints(const std::string& sidebar_field) const;
|
||||
#endif // ENABLE_SIDEBAR_VISUAL_HINTS
|
||||
|
||||
private:
|
||||
void _update_valid();
|
||||
|
@ -595,6 +610,16 @@ public:
|
|||
void _render_selected_volumes() const;
|
||||
void _render_synchronized_volumes() const;
|
||||
void _render_bounding_box(const BoundingBoxf3& box, float* color) const;
|
||||
#if ENABLE_SIDEBAR_VISUAL_HINTS
|
||||
void _render_sidebar_position_hints(const std::string& sidebar_field) const;
|
||||
void _render_sidebar_rotation_hints(const std::string& sidebar_field) const;
|
||||
void _render_sidebar_scale_hints(const std::string& sidebar_field) const;
|
||||
void _render_sidebar_size_hints(const std::string& sidebar_field) const;
|
||||
void _render_sidebar_position_hint(Axis axis) const;
|
||||
void _render_sidebar_rotation_hint(Axis axis, double length) const;
|
||||
void _render_sidebar_scale_hint(Axis axis) const;
|
||||
void _render_sidebar_size_hint(Axis axis, double length) const;
|
||||
#endif // ENABLE_SIDEBAR_VISUAL_HINTS
|
||||
void _synchronize_unselected_instances();
|
||||
void _synchronize_unselected_volumes();
|
||||
#if ENABLE_ENSURE_ON_BED_WHILE_SCALING
|
||||
|
@ -1055,6 +1080,9 @@ private:
|
|||
void _render_camera_target() const;
|
||||
#endif // ENABLE_SHOW_CAMERA_TARGET
|
||||
void _render_sla_slices() const;
|
||||
#if ENABLE_SIDEBAR_VISUAL_HINTS
|
||||
void _render_selection_sidebar_hints() const;
|
||||
#endif // ENABLE_SIDEBAR_VISUAL_HINTS
|
||||
|
||||
void _update_volumes_hover_state() const;
|
||||
void _update_gizmos_data();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue