mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-22 06:04:01 -06:00
Painting gizmos: show painted triangles inside modifier meshes
This commit is contained in:
parent
8bcdbb7a60
commit
b155e58a9d
8 changed files with 42 additions and 6 deletions
|
@ -59,6 +59,8 @@ class GLGizmoPainterBase : public GLGizmoBase
|
|||
private:
|
||||
ObjectID m_old_mo_id;
|
||||
size_t m_old_volumes_size = 0;
|
||||
virtual void on_render() const {}
|
||||
virtual void on_render_for_picking() const {}
|
||||
|
||||
public:
|
||||
GLGizmoPainterBase(GLCanvas3D& parent, const std::string& icon_filename, unsigned int sprite_id);
|
||||
|
@ -66,6 +68,12 @@ public:
|
|||
void set_painter_gizmo_data(const Selection& selection);
|
||||
bool gizmo_event(SLAGizmoEventType action, const Vec2d& mouse_position, bool shift_down, bool alt_down, bool control_down);
|
||||
|
||||
// Following function renders the triangles and cursor. Having this separated
|
||||
// from usual on_render method allows to render them before transparent objects,
|
||||
// so they can be seen inside them. The usual on_render is called after all
|
||||
// volumes (including transparent ones) are rendered.
|
||||
virtual void render_painter_gizmo() const = 0;
|
||||
|
||||
protected:
|
||||
void render_triangles(const Selection& selection) const;
|
||||
void render_cursor() const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue