The Traits template-parameter should be instantiated with a model of the concept GeneralPolygonSetTraits_2. The traits class defines the types of points, -monotone curves, general polygons, and general polygons with holes, that is Traits::Point_2, Traits::X_monotone_curve_2, Traits::Polygon_2, and Traits::Polygon_with_holes_2 respectively. Traits::Point_2 must be the type of the endpoints of Traits::X_monotone_curve_2, and Traits::X_monotone_curve_2 must be the type of the curves that comprise the boundaries of the general polygons. The traits class supports geometric operations on the types above. We sometimes use the term polygon instead of general polygon for simplicity hereafter.
The template parameter Dcel should be instantiated with a model of the concept GeneralPolygonSetDcel. It is instantiated by default with the type Gps_default_dcel<Traits>. You can override this default, with a different DCEL class, typically an extension of the Gps_default_dcel class template. Overriding the default is necessary only if you intend to obtain the undelying internal arrangement and process it further.
The input and output of the Boolean set-operations methods consist of one or more general polygons, some of which may have holes. In particular, these methods operate on pairs of objects of type General_polygon_set_2<Traits,Dcel>, or directly on objects of type Traits::Polygon_2 or Traits::Polygon_with_holes_2. An object of type Traits::Polygon_2 is a valid operand, only if it is strictly simple and its boundary is oriented counterclockwise. An object of type Traits::Polygon_with_holes_2 is valid, only if its outer boundary is simple and oriented counterclockwise, and each one of its holes is a strictly simple polygon that oriented clockwise, contained inside its outer boundary, and they are all together pairwise disjoint, except perhaps at the vertices.
| |
constructs an empty set of polygons represented by an empty arrangement.
| |
| |
copy constructor.
| |
| |
constructs an empty set of polygons that uses the given
traits instance for performing the geometric operations.
| |
| |
constructs a set of polygons that consists of the single polygon pgn.
| |
| |
constructs a set of polygons that consists of the single polygon with
holes pgn_with_holes.
|
| ||
|
| |
obtains the polygons with holes represented by gps. | ||
|
| |
returns the total number of general polygons represented by gps. | ||
|
| returns true if gps represents an empty set. |
|
| returns true if gps represents the entire plane. |
|
| obtains an instance of the traits. If the traits was passed as a parameter to the constructor of gps, it is returned. Otherwise, a newly created instance is returned. |
|
| obtains the arrangement data structure that internally represtns the general-polygon set. |
|
| clears gps. | ||
|
|
inserts pgn into gps.
| ||
|
| |||
inserts pgn_with_holes into gps.
| ||||
| ||||
|
| |||
inserts the range of polygons (or polygons with holes) into gps. (The
value type of the input iterator is used to distinguish between the two.)
| ||||
| ||||
|
| |||
inserts the two ranges of polygons and polygons with holes into gps.
| ||||
|
| computes the complement of gps. | ||
|
| |||
computes the complement of other. gps is overriden by the result. |
|
| |||
computes the intersection of gps and other. | ||||
|
| |||
computes the intersection of gps and pgn. | ||||
|
| |||
computes the intersection of gps and pgn. | ||||
| ||||
|
| |||
computes the intersection of a collection of point sets. The collection consists of the polygons (or polygons with holes) in the given range and the point set represented by gps. (The value type of the input iterator is used to distinguish between the two options.) | ||||
| ||||
|
| |||
computes the intersection of a collection of point sets. The collection consists of the polygons and polygons with holes in the given two ranges and the point set represented by gps. | ||||
|
| |||
computes the union of gps and other. | ||||
|
| computes the union of gps and pgn. | ||
|
| |||
computes the union of gps and pgn. | ||||
| ||||
|
| |||
computes the union of the polygons (or polygons with holes) in the given range and the point set represented by gps. (The value type of the input iterator is used to distinguish between the two options.) | ||||
| ||||
|
| |||
computes the union of the polygons and polygons with holes in the given two ranges and the point set represented by gps. | ||||
|
| |||
computes the difference between gps and other. | ||||
|
| computes the difference between gps and pgn. | ||
|
| |||
computes the difference between gps and pgn. | ||||
|
| |||
computes the symmetric difference between gps and other. | ||||
|
| |||
computes the symmetric difference between gps and pgn. | ||||
|
| |||
computes the symmetric difference between gps and pgn. | ||||
| ||||
|
| |||
computes the symmetric difference (xor) of a collection of point sets. The collection consists of the polygons (or polygons with holes) in the given range and the point set represented by gps. (The value type of the input iterator is used to distinguish between the two options.) | ||||
| ||||
|
| |||
computes the symmetric difference (xor) of a collection of point sets. The collection consists of the polygons and polygons with holes in the given two ranges and the point set represented by gps. |
|
| |
computes the intersection of gps1 and gps2. | ||
|
| |
computes the union of gps1 and gps2. | ||
|
| |
computes the difference between gps1 and gps2. | ||
|
| |
computes the symmetric difference between gps1 and gps2. |
|
| |||
returns true if gps and other intersect in their interior, and false otherwise. | ||||
|
| |||
returns true if gps and pgn intersect in their interior, and false otherwise. | ||||
|
| |||
returns true if gps and pgn intersect in their interior, and false otherwise. | ||||
| ||||
|
| |||
returns true if the interior of the point sets in a collection intersect, and false otherwise. The collection consists of the polygons (or polygons with holes) in the given range and the point set represented by gps. (The value type of the input iterator is used to distinguish between the two options.) | ||||
| ||||
|
| |||
returns true if the interior of the point sets in a collection intersect, and false otherwise. The collection consists of the polygons and polygons with holes in the given two ranges and the point set represented by gps. | ||||
|
| |||
obtains a polygon with holes that contains the query point p, if exists, through pgn, and returns true. Otherwise, returns flase. | ||||
|
| returns either the constant ON_ORIENTED_BOUNDARY, ON_POSITIVE_SIDE, or ON_NEGATIVE_SIDE, iff p lies on the boundary, properly on the positive side, or properly on the negative side of gps respectively. | ||
|
| |||
returns either the constant ON_NEGATIVE_SIDE, ON_ORIENTED_BOUNDARY, or ON_POSITIVE_SIDE, iff other and gps are completely disjoint, in contact, or intersect in their interior, respectively. | ||||
|
| |||
returns either the constant ON_NEGATIVE_SIDE, ON_ORIENTED_BOUNDARY, or ON_POSITIVE_SIDE, iff pgn and gps are completely disjoint, in contact, or intersect in their interior, respectively. | ||||
|
| |||
returns either the constant ON_NEGATIVE_SIDE, ON_ORIENTED_BOUNDARY, or ON_POSITIVE_SIDE, iff pgn and gps are completely disjoint, in contact, or intersect in their interior, respectively. |
|
| returns true if gps represents a valid point set. |