Files
OrcaSlicer-bambulab/src/libslic3r/ExPolygonCollection.hpp
T

42 lines
1.1 KiB
C++
Raw Normal View History

2013-07-14 00:38:01 +02:00
#ifndef slic3r_ExPolygonCollection_hpp_
#define slic3r_ExPolygonCollection_hpp_
2015-12-08 00:39:54 +01:00
#include "libslic3r.h"
2013-07-14 00:38:01 +02:00
#include "ExPolygon.hpp"
#include "Line.hpp"
#include "Polyline.hpp"
2013-07-14 00:38:01 +02:00
namespace Slic3r {
class ExPolygonCollection;
typedef std::vector<ExPolygonCollection> ExPolygonCollections;
2013-07-14 00:38:01 +02:00
class ExPolygonCollection
{
public:
2013-08-08 02:10:34 +02:00
ExPolygons expolygons;
ExPolygonCollection() {};
ExPolygonCollection(const ExPolygon &expolygon);
ExPolygonCollection(const ExPolygons &expolygons) : expolygons(expolygons) {};
operator Points() const;
operator Polygons() const;
operator ExPolygons&();
2013-07-14 00:38:01 +02:00
void scale(double factor);
void translate(double x, double y);
void rotate(double angle, const Point &center);
template <class T> bool contains(const T &item) const;
bool contains_b(const Point &point) const;
void simplify(double tolerance);
Polygon convex_hull() const;
Lines lines() const;
Polygons contours() const;
2015-10-26 23:23:03 +01:00
void append(const ExPolygons &expolygons);
2013-07-14 00:38:01 +02:00
};
extern BoundingBox get_extents(const ExPolygonCollection &expolygon);
2013-07-14 00:38:01 +02:00
}
#endif