template
<typename T>
point_iterator_type begin_points(const T& polygon) |
Expects a model of
polygon_with_holes. Returns the begin iterator over the range of
points that correspond to vertices of the polygon. |
template
<typename T>
point_iterator_type end_points(const T& polygon) |
Expects a model of
polygon_with_holes. Returns the end iterator over the range of
points that correspond to vertices of the polygon. |
template
<typename T>
hole_iterator_type begin_holes(const T& polygon) |
Expects a model of
polygon_with_holes. Returns the begin iterator over the range of
coordinates that correspond to horizontal and vertical edges. |
template
<typename T>
hole_iterator_type end_holes(const T& polygon) |
Expects a model of
polygon_with_holes. Returns the end iterator over the range of
coordinates that correspond to horizontal and vertical edges. |
template
<typename T, typename iterator>
void set_points(T& polygon, iterator b, iterator e) |
Expects a model of
polygon_with_holes. Sets the polygon to the point data
range [b,e) that corresponds to vertices of a polygon. |
template
<typename T, typename iterator>
void set_holes(T& polygon, iterator b, iterator e) |
Expects a model of
polygon_with_holes. Sets the polygon holes to the hole data
range [b,e) |
template
<typename T>
unsigned int size(const T& polygon) |
Returns the number of
edges in the outer shell of the polygon_with_holes. Does not
include sizes of the holes. |
template
<typename T1, typename T2>
T1& assign(T1& left, const T2& right) |
Copies data from right object that models
polygon_with_holes or one of its refinements into left object that
models polygon_with_holes. |
template
<typename T, typename point_type>
bool contains(const T&, const point_type& point,
bool consider_touch=true) |
Given an object that models polygon_with_holes and an
object that models point, returns true if the polygon shell contains
the point and one of its holes does not contain the point. If the
consider_touch flag is true will return true if the point lies along
the boundary of the polygon or one of its holes. |
// get the center
coordinate
template <typename T, typename point_type>
void center(point_type& p, const T& polygon) |
Sets object that models point to the center point of
the bounding box of an object that models polygon_with_holes. |
template
<typename T, typename rectangle_type>
bool extents(rectangle_type& bbox, const T& polygon) |
Sets object that models rectangle to the bounding box
of an object that models polygon_with_holes and returns true.
Returns false and leaves bbox unchanged if polygon is empty. |
template
<typename T>
manhattan_area_type area(const T& polygon) |
Returns the area of an object that models
polygon_with_holes including subtracting the area of its holes from the
area of the outer shell polygon. |
template
<typename T>
direction_1d winding(const T& polygon) |
Returns the winding direction of an object that models
polygon_with_holes, LOW == CLOCKWISE, HIGH = COUNTERCLOCKWISE. |
template
<typename T>
coordinate_difference perimeter(const T& polygon) |
Returns the perimeter length of an object that models
polygon, including the perimeters of the holes. |
template
<typename T, typename transform_type>
T& transform(T& polygon, const transform_type&) |
Applies transform() on the vertices of polygon and sets
the polygon to that described by the result of transforming its
vertices. Also applies transform() on the holes of the polygon. |
template
<typename T>
T& scale_up(T& polygon, unsigned_area_type factor) |
Scales up outer shell and holes of an object that
models polygon by unsigned factor. |
template
<typename T>
T& scale_down(T& polygon, unsigned_area_type factor) |
Scales down outer shell and holes of an object that
models polygon by unsigned factor. |
template
<typename T, scaling_type>
T& scale(T& rectangle, double scaling) |
Scales outer shell and holes of an object that models
polygon by floating point factor. |
template
<typename T>
T& move(T& polygon, orientation_2d,
coordinate_difference
displacement) |
Adds displacement value to coordinate indicated by
orientation_2d of vertices of an object that models polygon . |
template
<typename polygon_type, typename point_type>
polygon_type& convolve(polygon_type& polygon,
const point_type& point) |
Convolves coordinate values of point with the outer
shell and holes of an object that models polygon_with_holes. |