Implemented rotation of the support structure.

This commit is contained in:
bubnikv 2017-06-08 14:02:37 +02:00
parent 27003dc0fd
commit f9f0940297
5 changed files with 52 additions and 29 deletions

View file

@ -91,8 +91,10 @@ inline void polygons_append(Polygons &dst, Polygons &&src)
inline void polygons_rotate(Polygons &polys, double angle)
{
for (Polygons::iterator p = polys.begin(); p != polys.end(); ++p)
p->rotate(angle);
const double cos_angle = cos(angle);
const double sin_angle = sin(angle);
for (Polygon &p : polys)
p.rotate(cos_angle, sin_angle);
}
inline Points to_points(const Polygon &poly)