FDM supports gizmo 'autoset by angle' improvements:

- Extra dialog for autosetting by angle in FDM supports gizmo was removed
- Highlighting facets by angle is now controlled by a slider in the main gizmo dialog
- User is allowed to paint even when using the slope highlighter
- The button to turn highlighted facets to blockers was removed, it made no sense
- Highlighted facets are now rendered in light blue
This commit is contained in:
Lukas Matena 2021-01-14 13:00:54 +01:00
parent 672ed99320
commit cd1322ce3f
6 changed files with 212 additions and 188 deletions

View file

@ -63,8 +63,9 @@ protected:
public:
// Use TriangleSelector::push_triangle to create a new triangle.
// It increments/decrements reference counter on vertices.
Triangle(int a, int b, int c)
Triangle(int a, int b, int c, const Vec3f& normal_)
: verts_idxs{a, b, c},
normal{normal_},
state{EnforcerBlockerType(0)},
number_of_splits{0},
special_side_idx{0},
@ -73,6 +74,9 @@ protected:
// Indices into m_vertices.
std::array<int, 3> verts_idxs;
// Triangle normal (a shader might need it).
Vec3f normal;
// Is this triangle valid or marked to be removed?
bool valid{true};
@ -158,7 +162,7 @@ protected:
void remove_useless_children(int facet_idx); // No hidden meaning. Triangles are meant.
bool is_pointer_in_triangle(int facet_idx) const;
bool is_edge_inside_cursor(int facet_idx) const;
void push_triangle(int a, int b, int c);
void push_triangle(int a, int b, int c, const Vec3f& normal);
void perform_split(int facet_idx, EnforcerBlockerType old_state);
};