mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-23 08:41:11 -06:00
Better polymorphism for ExPolygon::XS->rotate
This commit is contained in:
parent
28a4f1a61e
commit
06de21b154
6 changed files with 32 additions and 21 deletions
|
@ -20,7 +20,7 @@ class ExPolygon
|
|||
SV* arrayref();
|
||||
void scale(double factor);
|
||||
void translate(double x, double y);
|
||||
void _rotate(double angle, Point* center);
|
||||
void rotate(double angle, Point* center);
|
||||
};
|
||||
|
||||
typedef std::vector<ExPolygon> ExPolygons;
|
||||
|
@ -44,11 +44,11 @@ ExPolygon::translate(double x, double y)
|
|||
}
|
||||
|
||||
void
|
||||
ExPolygon::_rotate(double angle, Point* center)
|
||||
ExPolygon::rotate(double angle, Point* center)
|
||||
{
|
||||
contour._rotate(angle, center);
|
||||
contour.rotate(angle, center);
|
||||
for (Polygons::iterator it = holes.begin(); it != holes.end(); ++it) {
|
||||
(*it)._rotate(angle, center);
|
||||
(*it).rotate(angle, center);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue