mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-22 06:04:01 -06:00
Add Rendering wire frame when simplify
This commit is contained in:
parent
6b08cc4d22
commit
e3459c7c46
4 changed files with 75 additions and 72 deletions
|
@ -57,30 +57,32 @@ private:
|
|||
std::array<GLIndexedVertexArray, 3> m_varrays;
|
||||
};
|
||||
|
||||
class GLGizmoTransparentRender
|
||||
{
|
||||
public:
|
||||
// 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;
|
||||
};
|
||||
|
||||
// Following class is a base class for a gizmo with ability to paint on mesh
|
||||
// using circular blush (such as FDM supports gizmo and seam painting gizmo).
|
||||
// The purpose is not to duplicate code related to mesh painting.
|
||||
class GLGizmoPainterBase : public GLGizmoBase
|
||||
class GLGizmoPainterBase : public GLGizmoTransparentRender, public GLGizmoBase
|
||||
{
|
||||
private:
|
||||
ObjectID m_old_mo_id;
|
||||
size_t m_old_volumes_size = 0;
|
||||
void on_render() override {}
|
||||
void on_render_for_picking() override {}
|
||||
|
||||
public:
|
||||
GLGizmoPainterBase(GLCanvas3D& parent, const std::string& icon_filename, unsigned int sprite_id);
|
||||
~GLGizmoPainterBase() override = default;
|
||||
virtual void set_painter_gizmo_data(const Selection& selection);
|
||||
virtual 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 bool use_polygon_offset_fill = true) const;
|
||||
void render_cursor() const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue