mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-07-28 04:14:27 +03:00
Eradicated most of Pointf extras compared to pure Eigen::Vector2d.
This commit is contained in:
@@ -24,11 +24,12 @@ public:
|
||||
explicit Polygon(const Points &points): MultiPoint(points) {}
|
||||
Polygon(const Polygon &other) : MultiPoint(other.points) {}
|
||||
Polygon(Polygon &&other) : MultiPoint(std::move(other.points)) {}
|
||||
static Polygon new_scale(std::vector<Pointf> points) {
|
||||
Points int_points;
|
||||
for (auto pt : points)
|
||||
int_points.push_back(Point::new_scale(pt(0), pt(1)));
|
||||
return Polygon(int_points);
|
||||
static Polygon new_scale(const std::vector<Pointf> &points) {
|
||||
Polygon pgn;
|
||||
pgn.points.reserve(points.size());
|
||||
for (const Pointf &pt : points)
|
||||
pgn.points.emplace_back(Point::new_scale(pt(0), pt(1)));
|
||||
return pgn;
|
||||
}
|
||||
Polygon& operator=(const Polygon &other) { points = other.points; return *this; }
|
||||
Polygon& operator=(Polygon &&other) { points = std::move(other.points); return *this; }
|
||||
|
||||
Reference in New Issue
Block a user