mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-23 16:51:21 -06:00
Refactored signatures of many C++ methods for more efficient and safer style. Includes a bugfix for Point::nearest_point() which was returning a pointer to freed memory. #1961
This commit is contained in:
parent
6201aacf88
commit
ca4d4211c9
30 changed files with 203 additions and 161 deletions
|
@ -15,10 +15,10 @@ typedef std::vector<Polygon> Polygons;
|
|||
class Polygon : public MultiPoint {
|
||||
public:
|
||||
operator Polygons() const;
|
||||
Point* last_point() const;
|
||||
Point last_point() const;
|
||||
Lines lines() const;
|
||||
void lines(Lines* lines) const;
|
||||
Polyline* split_at(const Point* point) const;
|
||||
Polyline* split_at(const Point &point) const;
|
||||
Polyline* split_at_index(int index) const;
|
||||
Polyline* split_at_first_point() const;
|
||||
Points equally_spaced_points(double distance) const;
|
||||
|
@ -28,7 +28,7 @@ class Polygon : public MultiPoint {
|
|||
bool make_counter_clockwise();
|
||||
bool make_clockwise();
|
||||
bool is_valid() const;
|
||||
bool contains_point(const Point* point) const;
|
||||
bool contains_point(const Point &point) const;
|
||||
Polygons simplify(double tolerance) const;
|
||||
void simplify(double tolerance, Polygons &polygons) const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue