The concept SnapRoundingTraits_2 lists the set of requirements that must be fulfilled by an instance of the Traits template-parameter of the function snap_rounding_2<Traits,InputIterator,OutputContainer>(). This concept provides the types of the geometric primitives used in this class and some function object types for the required predicates on those primitives.
| |
The number type. This type must fulfill the requirements on
FieldNumberType
| |
| |
The point type.
| |
| |
The segment type.
| |
| |
The iso-rectangle type.
| |
| |
Function object. Must provide the operator
Point_2 operator()(Segment_2 seg, int i), which returns the source or
target of seg. If i modulo 2 is 0, the source is returned,
otherwise the target is returned.
| |
| |
Function object. Must provide the operator
Segment_2 operator()(Point_2 p, Point_2 q), which introduces a segment
with source p and target q. The segment is directed from the
source towards the target.
| |
| |
Function object. Must provide the
operator
Iso_rectangle_2 operator()(Point_2 left, Point_2 right, Point_2 bottom, Point_2 top), which introduces an iso-oriented rectangle fo whose minimal
coordinate is the one of left, the maximal coordinate is the one
of right, the minimal coordinate is the one of bottom, the
maximal coordinate is the one of top.
| |
| |
Function object. Must provide the operator
double operator()(FT), which computes an approximation of a given number
of type FT. The precision of this operation is of not high significance,
as it is only used in the implementation of the heuristic technique to exploit
a cluster of kd-trees rather than just one.
| |
| |
Function object. Must provide the operator
Comparison_result operator()(Point_2 p, Point_2 q)
which returns
SMALLER, EQUAL or LARGER according to the
-ordering of points p and q.
| |
| |
Function object. Must provide the operator
Comparison_result operator()(Point_2 p, Point_2 q)
which returns
SMALLER, EQUAL or LARGER
according to the
-ordering of points p and q.
| |
| |
Rounds a point to a center of a pixel (unit square)
in the grid used by the Snap Rounding algorithm. Note that no conversion
to an integer grid is done yet. Must have the syntax
void operator()(Point_2 p,FT pixel_size,FT &x,FT &y) where is the
input point, pixel_size is the size of the pixel of the grid,
and and are the and -coordinates of the rounded point
respectively.
| |
| |
Convert coordinates
into an integer representation where one unit is equal to pixel size.
For instance, if a point has the coordinates and the pixel
size is , then the new point will have the coordinates of .
Note, however, that the number type remains the same here, although
integers are represented.
Must have the syntax Point_2 operator()(Point_2 p,NT pixel_size)
where is the converted point and pixel_size is the size of the pixel
of the grid.
| |
| |
Returns the vertices of a polygon,
which is the Minkowski sum of a segment and a square centered at the origin
with edge size pixel edge.
Must have the syntax
void operator()(std::list<Point_2>& vertices_list, Segment_2 s, NT unit_square)
where vertices_list is the list of the vertices of the Minkowski sum
polygon, is the input segment and unit_square is the edge size of
the pixel.
|
The following functions construct the required function objects occasionally referred as functors listed above.