diff options
author | Alessandro Ranellucci <aar@cpan.org> | 2014-08-03 21:42:29 +0400 |
---|---|---|
committer | Alessandro Ranellucci <aar@cpan.org> | 2014-08-03 21:42:29 +0400 |
commit | 6adc3477c9d08d2cfa0e6902b3d241a9193e50d4 (patch) | |
tree | 98e1a403cec185a06501056d1811b4d39d731bf5 /xs/src/libslic3r/ExPolygonCollection.hpp | |
parent | b8676241e0c9f91eb9db5b6757e73edfe7f85598 (diff) |
Moved C++ code into new libslic3r directory
Diffstat (limited to 'xs/src/libslic3r/ExPolygonCollection.hpp')
-rw-r--r-- | xs/src/libslic3r/ExPolygonCollection.hpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/xs/src/libslic3r/ExPolygonCollection.hpp b/xs/src/libslic3r/ExPolygonCollection.hpp new file mode 100644 index 000000000..f6a27284f --- /dev/null +++ b/xs/src/libslic3r/ExPolygonCollection.hpp @@ -0,0 +1,32 @@ +#ifndef slic3r_ExPolygonCollection_hpp_ +#define slic3r_ExPolygonCollection_hpp_ + +#include <myinit.h> +#include "ExPolygon.hpp" + +namespace Slic3r { + +class ExPolygonCollection; +typedef std::vector<ExPolygonCollection> ExPolygonCollections; + +class ExPolygonCollection +{ + public: + ExPolygons expolygons; + + ExPolygonCollection() {}; + ExPolygonCollection(const ExPolygons &expolygons) : expolygons(expolygons) {}; + operator Points() const; + operator Polygons() const; + operator ExPolygons&(); + void scale(double factor); + void translate(double x, double y); + void rotate(double angle, const Point ¢er); + bool contains_point(const Point &point) const; + void simplify(double tolerance); + void convex_hull(Polygon* hull) const; +}; + +} + +#endif |