3
/** A convex cover is a sequence of convex polygons that completely
4
* cover the path. For now a convex hull class is included here.
10
* A convexhull is a convex region - every point between two points in the convex hull is also in
11
* the convex hull. It is defined by a set of points travelling in a clockwise direction.
15
std::vector<Point> boundary;
17
void add_point(Point p);
18
bool contains_point(Point p);
21
ConvexHull intersection(ConvexHull a, ConvexHull b);
22
ConvexHull merge(ConvexHull a, ConvexHull b);
24
// we should be concerned about singular tranforms here.
25
template <class T> ConvexHull operator*(ConvexHull const &p, T const &m) {
29
pr.boundary.reserve(p.boundary.size());
31
for(unsigned i = 0; i < p.boundary.size(); i++) {
32
pr.boundary.push_back(p.boundary[i]*m);
49
c-file-style:"stroustrup"
50
c-file-offsets:((innamespace . 0)(substatement-open . 0))
55
vim: filetype=c++:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :