CGAL 5.4 - 2D Regularized Boolean Set-Operations

There are several overloaded function templates called do_intersect() that determine whether the interior of two or more polygons intersect.

A function template in this group that accepts two input polygons has one of the following signatures:

1.1.bool do_intersect(const Type1& pgn1, const Type2& pgn2, UsePolylines = Tag_true());
1.2.bool do_intersect(const Type1& pgn1, const Type2& pgn2);
2.bool do_intersect(const Type1& pgn1, const Type2& pgn2, const GpsTraits& traits);

There are also function templates that accept one or two ranges of input polygons:

3.1.bool do_intersect(InputIterator begin, InputIterator end, UsePolylines = Tag_true());
3.2.bool do_intersect(InputIterator begin, InputIterator end);
4.bool do_intersect(InputIterator begin, InputIterator end, const GpsTraits& traits);
5.1.bool do_intersect(InputIterator1 begin1, InputIterator1 end1, InputIterator2 begin2, InputIterator2 end2, UsePolylines = Tag_true());
5.2.bool do_intersect(InputIterator1 begin1, InputIterator1 end1, InputIterator2 begin2, InputIterator2 end2);
6.bool do_intersect(InputIterator1 begin1, InputIterator1 end1, InputIterator2 begin2, InputIterator2 end2, const GpsTraits& traits);
Template Parameters
UsePolylinesdetermines whether the boundary of the input polygons are treated as a cyclic sequence of single ( \(x\)-monotone) segments or as a cyclic sequence of ( \(x\)-monotone) polylines. If substituted with CGAL::Tag_true, which is the default, the input polygons are converted to general polygons bounded by polylines before the operation is actually performed. If substituted with CGAL::Tag_false, the input polygons are used as is. Refer to Traits Selection for more information.
 Type1 Type2
1Polygon_2 Polygon_2
2Polygon_2 Polygon_with_holes_2
3Polygon_with_holes_2 Polygon_2
4Polygon_with_holes_2 Polygon_with_holes_2
5General_polygon_2 General_polygon_2
6General_polygon_2 General_polygon_with_holes_2
7General_polygon_with_holes_2General_polygon_2
8General_polygon_with_holes_2General_polygon_with_holes_2
Parameters
pgn1,pgn2the input polygons.
(end,begin)a range of input polygons.
(end1,begin1)the first range of input polygons.
(end2,begin2)the second range of input polygons.
traitsan optional traits object.
See also
CGAL::complement()
CGAL::intersection()
CGAL::join()
CGAL::difference()
CGAL::symmetric_difference()

Functions

template<typename Kernel , typename Container >
bool CGAL::do_intersect (const Polygon_2< Kernel, Container > &pgn1, const Polygon_2< Kernel, Container > &pgn2)
 determines whether two polygons intersect in their interior. More...
 
template<typename Kernel , typename Container , typename UsePolylines >
bool CGAL::do_intersect (const Polygon_2< Kernel, Container > &pgn1, const Polygon_2< Kernel, Container > &pgn2, UsePolylines=Tag_true())
 determines whether two polygons intersect in their interior. More...
 
template<typename Kernel , typename Container >
bool CGAL::do_intersect (const Polygon_2< Kernel, Container > &pgn1, const Polygon_with_holes_2< Kernel, Container > &pgn2)
 determines whether two polygons intersect in their interior. More...
 
template<typename Kernel , typename Container , typename UsePolylines >
bool CGAL::do_intersect (const Polygon_2< Kernel, Container > &pgn1, const Polygon_with_holes_2< Kernel, Container > &pgn2, UsePolylines=Tag_true())
 determines whether two polygons intersect in their interior. More...
 
template<typename Kernel , typename Container >
bool CGAL::do_intersect (const Polygon_with_holes_2< Kernel, Container > &pgn1, const Polygon_2< Kernel, Container > &pgn2)
 determines whether two polygons intersect in their interior. More...
 
template<typename Kernel , typename Container , typename UsePolylines >
bool CGAL::do_intersect (const Polygon_with_holes_2< Kernel, Container > &pgn1, const Polygon_2< Kernel, Container > &pgn2, UsePolylines=Tag_true())
 determines whether two polygons intersect in their interior. More...
 
template<typename Kernel , typename Container >
bool CGAL::do_intersect (const Polygon_with_holes_2< Kernel, Container > &pgn1, const Polygon_with_holes_2< Kernel, Container > &pgn2)
 determines whether two polygons with holes intersect in their interior. More...
 
template<typename Kernel , typename Container , typename UsePolylines >
bool CGAL::do_intersect (const Polygon_with_holes_2< Kernel, Container > &pgn1, const Polygon_with_holes_2< Kernel, Container > &pgn2, UsePolylines=Tag_true())
 determines whether two polygons with holes intersect in their interior. More...
 
template<typename ArrTraits >
bool CGAL::do_intersect (const General_polygon_2< ArrTraits > &pgn1, const General_polygon_2< ArrTraits > &pgn2)
 determines whether two general polygons intersect in their interior. More...
 
template<typename ArrTraits >
bool CGAL::do_intersect (const General_polygon_2< ArrTraits > &pgn1, const General_polygon_with_holes_2< General_polygon_2< ArrTraits >> &pgn2)
 determines whether two general polygons intersect in their interior. More...
 
template<typename ArrTraits >
bool CGAL::do_intersect (const General_polygon_with_holes_2< General_polygon_2< ArrTraits >> &pgn1, const General_polygon_2< ArrTraits > &pgn2)
 determines whether two general polygons intersect in their interior. More...
 
template<typename Polygon >
bool CGAL::do_intersect (const General_polygon_with_holes_2< Polygon > &pgn1, const General_polygon_with_holes_2< Polygon > &pgn2)
 determines whether two general polygons with holes intersect in their interior. More...
 
template<typename InputIterator >
bool CGAL::do_intersect (InputIterator begin, InputIterator end)
 Given a range of polygons or a range of polygons with holes (resp. More...
 
template<typename InputIterator , typename UsePolylines >
bool CGAL::do_intersect (InputIterator begin, InputIterator end, UsePolylines=Tag_true())
 Given a range of polygons or a range of polygons with holes (resp. More...
 
template<typename InputIterator1 , typename InputIterator2 >
bool CGAL::do_intersect (InputIterator1 begin1, InputIterator1 end1, InputIterator2 begin2, InputIterator2 end2)
 Given a range of polygons (resp. More...
 
template<typename InputIterator1 , typename InputIterator2 , typename UsePolylines >
bool CGAL::do_intersect (InputIterator1 begin1, InputIterator1 end1, InputIterator2 begin2, InputIterator2 end2, UsePolylines=Tag_true())
 Given a range of polygons (resp. More...
 
template<typename Kernel , typename Container , typename GpsTraits >
bool CGAL::do_intersect (const Polygon_2< Kernel, Container > &pgn1, const Polygon_2< Kernel, Container > &pgn2, const GpsTraits &traits)
 determines whether two polygons intersect in their interior. More...
 
template<typename Kernel , typename Container , typename GpsTraits >
bool CGAL::do_intersect (const Polygon_2< Kernel, Container > &pgn1, const Polygon_with_holes_2< Kernel, Container > &pgn2, const GpsTraits &traits, const GpsTraits &traits)
 determines whether two polygons intersect in their interior. More...
 
template<typename Kernel , typename Container , typename GpsTraits >
bool CGAL::do_intersect (const Polygon_with_holes_2< Kernel, Container > &pgn1, const Polygon_2< Kernel, Container > &pgn2, const GpsTraits &traits)
 determines whether two polygons intersect in their interior. More...
 
template<typename Kernel , typename Container , typename GpsTraits >
bool CGAL::do_intersect (const Polygon_with_holes_2< Kernel, Container > &pgn1, const Polygon_with_holes_2< Kernel, Container > &pgn2, const GpsTraits &traits)
 determines whether two polygons with holes intersect in their interior. More...
 
template<typename ArrTraits , typename GpsTraits >
bool CGAL::do_intersect (const General_polygon_2< ArrTraits > &pgn1, const General_polygon_2< ArrTraits > &pgn2, const GpsTraits &traits)
 determines whether two general polygons intersect in their interior. More...
 
template<typename ArrTraits , typename GpsTraits >
bool CGAL::do_intersect (const General_polygon_2< ArrTraits > &pgn1, const General_polygon_with_holes_2< General_polygon_2< ArrTraits >> &pgn2, const GpsTraits &traits)
 determines whether two general polygons intersect in their interior. More...
 
template<typename ArrTraits , typename GpsTraits >
bool CGAL::do_intersect (const General_polygon_with_holes_2< General_polygon_2< ArrTraits >> &pgn1, const General_polygon_2< ArrTraits > &pgn2, const GpsTraits &traits)
 determines whether two general polygons intersect in their interior. More...
 
template<typename Polygon , typename GpsTraits >
bool CGAL::do_intersect (const General_polygon_with_holes_2< Polygon > &pgn1, const General_polygon_with_holes_2< Polygon > &pgn2, const GpsTraits &traits)
 determines whether two general polygons with holes intersect in their interior. More...
 
template<typename InputIterator , typename GpsTraits >
bool CGAL::do_intersect (InputIterator begin, InputIterator end, const GpsTraits &traits)
 Given a range of polygons or a range of polygons with holes (resp. More...
 
template<typename InputIterator1 , typename InputIterator2 , typename GpsTraits >
bool CGAL::do_intersect (InputIterator1 begin1, InputIterator1 end1, InputIterator2 begin2, InputIterator2 end2, const GpsTraits &traits)
 Given a range of polygons (resp. More...
 

Function Documentation

◆ do_intersect() [1/26]

template<typename Kernel , typename Container >
bool CGAL::do_intersect ( const Polygon_2< Kernel, Container > &  pgn1,
const Polygon_2< Kernel, Container > &  pgn2 
)

#include <CGAL/Boolean_set_operations_2.h>

determines whether two polygons intersect in their interior.

Parameters
pgn1the 1st input polygon.
pgn2the 2nd input polygon.
Returns
true if pgn1 and pgn2 intersect in their interiro and false otherwise.

◆ do_intersect() [2/26]

template<typename Kernel , typename Container , typename UsePolylines >
bool CGAL::do_intersect ( const Polygon_2< Kernel, Container > &  pgn1,
const Polygon_2< Kernel, Container > &  pgn2,
UsePolylines  = Tag_true() 
)

#include <CGAL/Boolean_set_operations_2.h>

determines whether two polygons intersect in their interior.

Template Parameters
UsePolylinesdetermines whether the boundaries of pgn1 and pgn2 are treated as cyclic sequences of single ( \(x\)-monotone) segments or as a cyclic sequences of ( \(x\)-monotone) polylines. If substituted with CGAL::Tag_true, which is the default, pgn1 and pgn2 are converted to general polygons, bounded by polylines before the operation is actually performed. If substituted with CGAL::Tag_false, pgn1 and pgn2 are used as is. Refer to Traits Selection for more information.
Parameters
pgn1the 1st input polygon.
pgn2the 2nd input polygon.
Returns
true if pgn1 and pgn2 intersect in their interiro and false otherwise.

◆ do_intersect() [3/26]

template<typename Kernel , typename Container >
bool CGAL::do_intersect ( const Polygon_2< Kernel, Container > &  pgn1,
const Polygon_with_holes_2< Kernel, Container > &  pgn2 
)

#include <CGAL/Boolean_set_operations_2.h>

determines whether two polygons intersect in their interior.

Parameters
pgn1the 1st input polygon.
pgn2the 2nd input polygon.
Returns
true if pgn1 and pgn2 intersect in their interiro and false otherwise.

◆ do_intersect() [4/26]

template<typename Kernel , typename Container , typename UsePolylines >
bool CGAL::do_intersect ( const Polygon_2< Kernel, Container > &  pgn1,
const Polygon_with_holes_2< Kernel, Container > &  pgn2,
UsePolylines  = Tag_true() 
)

#include <CGAL/Boolean_set_operations_2.h>

determines whether two polygons intersect in their interior.

Template Parameters
UsePolylinesdetermines whether the boundaries of pgn1 and pgn2 are treated as cyclic sequences of single ( \(x\)-monotone) segments or as a cyclic sequences of ( \(x\)-monotone) polylines. If substituted with CGAL::Tag_true, which is the default, pgn1 and pgn2 are converted to a general polygon and a general polygon with holes, respectively, bounded by polylines before the operation is actually performed. If substituted with CGAL::Tag_false, pgn1 and pgn2 are used as is. Refer to Traits Selection for more information.
Parameters
pgn1the 1st input polygon.
pgn2the 2nd input polygon.
Returns
true if pgn1 and pgn2 intersect in their interiro and false otherwise.

◆ do_intersect() [5/26]

template<typename Kernel , typename Container >
bool CGAL::do_intersect ( const Polygon_with_holes_2< Kernel, Container > &  pgn1,
const Polygon_2< Kernel, Container > &  pgn2 
)

#include <CGAL/Boolean_set_operations_2.h>

determines whether two polygons intersect in their interior.

Parameters
pgn1the 1st input polygon.
pgn2the 2nd input polygon.
Returns
true if pgn1 and pgn2 intersect in their interiro and false otherwise.

◆ do_intersect() [6/26]

template<typename Kernel , typename Container , typename UsePolylines >
bool CGAL::do_intersect ( const Polygon_with_holes_2< Kernel, Container > &  pgn1,
const Polygon_2< Kernel, Container > &  pgn2,
UsePolylines  = Tag_true() 
)

#include <CGAL/Boolean_set_operations_2.h>

determines whether two polygons intersect in their interior.

Template Parameters
UsePolylinesdetermines whether the boundaries of pgn1 and pgn2 are treated as cyclic sequences of single ( \(x\)-monotone) segments or as a cyclic sequences of ( \(x\)-monotone) polylines. If substituted with CGAL::Tag_true, which is the default, pgn1 and pgn2 are converted to a general polygon with holes and a general polygon, respectively, bounded by polylines before the operation is actually performed. If substituted with CGAL::Tag_false, pgn1 and pgn2 are used as is. Refer to Traits Selection for more information.
Parameters
pgn1the 1st input polygon.
pgn2the 2nd input polygon.
Returns
true if pgn1 and pgn2 intersect in their interiro and false otherwise.

◆ do_intersect() [7/26]

template<typename Kernel , typename Container >
bool CGAL::do_intersect ( const Polygon_with_holes_2< Kernel, Container > &  pgn1,
const Polygon_with_holes_2< Kernel, Container > &  pgn2 
)

#include <CGAL/Boolean_set_operations_2.h>

determines whether two polygons with holes intersect in their interior.

Parameters
pgn1the 1st input polygon.
pgn2the 2nd input polygon.
Returns
true if pgn1 and pgn2 intersect in their interiro and false otherwise.

◆ do_intersect() [8/26]

template<typename Kernel , typename Container , typename UsePolylines >
bool CGAL::do_intersect ( const Polygon_with_holes_2< Kernel, Container > &  pgn1,
const Polygon_with_holes_2< Kernel, Container > &  pgn2,
UsePolylines  = Tag_true() 
)

#include <CGAL/Boolean_set_operations_2.h>

determines whether two polygons with holes intersect in their interior.

Template Parameters
UsePolylinesdetermines whether the boundaries of pgn1 and pgn2 are treated as cyclic sequences of single ( \(x\)-monotone) segments or as a cyclic sequences of ( \(x\)-monotone) polylines. If substituted with CGAL::Tag_true, which is the default, pgn1 and pgn2 are converted to general polygon with holes , bounded by polylines before the operation is actually performed. If substituted with CGAL::Tag_false, pgn1 and pgn2 are used as is. Refer to Traits Selection for more information.
Parameters
pgn1the 1st input polygon.
pgn2the 2nd input polygon.
Returns
true if pgn1 and pgn2 intersect in their interiro and false otherwise.

◆ do_intersect() [9/26]

template<typename ArrTraits >
bool CGAL::do_intersect ( const General_polygon_2< ArrTraits > &  pgn1,
const General_polygon_2< ArrTraits > &  pgn2 
)

#include <CGAL/Boolean_set_operations_2.h>

determines whether two general polygons intersect in their interior.

Parameters
pgn1the 1st input polygon.
pgn2the 2nd input polygon.
Returns
true if pgn1 and pgn2 intersect in their interiro and false otherwise.
Precondition
ArrTraits must be a model of the concept ArrangementDirectionalXMonotoneTraits_2.

◆ do_intersect() [10/26]

template<typename ArrTraits >
bool CGAL::do_intersect ( const General_polygon_2< ArrTraits > &  pgn1,
const General_polygon_with_holes_2< General_polygon_2< ArrTraits >> &  pgn2 
)

#include <CGAL/Boolean_set_operations_2.h>

determines whether two general polygons intersect in their interior.

Parameters
pgn1the 1st input polygon.
pgn2the 2nd input polygon.
Returns
true if pgn1 and pgn2 intersect in their interiro and false otherwise.
Precondition
ArrTraits must be a model of the concept ArrangementDirectionalXMonotoneTraits_2.

◆ do_intersect() [11/26]

template<typename ArrTraits >
bool CGAL::do_intersect ( const General_polygon_with_holes_2< General_polygon_2< ArrTraits >> &  pgn1,
const General_polygon_2< ArrTraits > &  pgn2 
)

#include <CGAL/Boolean_set_operations_2.h>

determines whether two general polygons intersect in their interior.

Parameters
pgn1the 1st input polygon.
pgn2the 2nd input polygon.
Returns
true if pgn1 and pgn2 intersect in their interiro and false otherwise.
Precondition
ArrTraits must be a model of the concept ArrangementDirectionalXMonotoneTraits_2.

◆ do_intersect() [12/26]

template<typename Polygon >
bool CGAL::do_intersect ( const General_polygon_with_holes_2< Polygon > &  pgn1,
const General_polygon_with_holes_2< Polygon > &  pgn2 
)

#include <CGAL/Boolean_set_operations_2.h>

determines whether two general polygons with holes intersect in their interior.

Parameters
pgn1the 1st input polygon.
pgn2the 2nd input polygon.
Returns
true if pgn1 and pgn2 intersect in their interiro and false otherwise.

◆ do_intersect() [13/26]

template<typename InputIterator >
bool CGAL::do_intersect ( InputIterator  begin,
InputIterator  end 
)

#include <CGAL/Boolean_set_operations_2.h>

Given a range of polygons or a range of polygons with holes (resp.

a range of general polygons or a range of general polygons with holes) determines whether the open polygons (resp. general polygons) in the range have a common point.

Parameters
beginthe first iterator of the input range. Its value type is either Polygon_2 (resp. General_polygon_2) or Polygon_with_holes_2 (resp. General_polygon_with_holes_2).
endthe past-the-end iterator of the input range. Its value type is either Polygon_2 (resp. General_polygon_2) or Polygon_with_holes_2 (resp. General_polygon_with_holes_2).
Returns
true if the pairwise intersections of all open polygons or polygons with holes (resp. general polygons or general polygons with holes) in the range [*begin,*end) overlap, and false otherwise.

◆ do_intersect() [14/26]

template<typename InputIterator , typename UsePolylines >
bool CGAL::do_intersect ( InputIterator  begin,
InputIterator  end,
UsePolylines  = Tag_true() 
)

#include <CGAL/Boolean_set_operations_2.h>

Given a range of polygons or a range of polygons with holes (resp.

a range of general polygons or a range of general polygons with holes) determines whether the open polygons (resp. general polygons) in the range have a common point.

Template Parameters
UsePolylinesdetermines whether the boundaries of the polygons in the input range are treated as cyclic sequences of single ( \(x\)-monotone) segments or as a cyclic sequences of ( \(x\)-monotone) polylines. If substituted with CGAL::Tag_true, which is the default, the input polygons are converted to general polygon with holes , bounded by polylines before the operation is actually performed. If substituted with CGAL::Tag_false, pgn1 and pgn2 are used as is. Refer to Traits Selection for more information.
Parameters
beginthe first iterator of the input range. Its value type is either Polygon_2 (resp. General_polygon_2) or Polygon_with_holes_2 (resp. General_polygon_with_holes_2).
endthe past-the-end iterator of the input range. Its value type is either Polygon_2 (resp. General_polygon_2) or Polygon_with_holes_2 (resp. General_polygon_with_holes_2).
Returns
true if the pairwise intersections of all open polygons or polygons with holes (resp. general polygons or general polygons with holes) in the range [*begin,*end) overlap, and false otherwise.

◆ do_intersect() [15/26]

template<typename InputIterator1 , typename InputIterator2 >
bool CGAL::do_intersect ( InputIterator1  begin1,
InputIterator1  end1,
InputIterator2  begin2,
InputIterator2  end2 
)

#include <CGAL/Boolean_set_operations_2.h>

Given a range of polygons (resp.

general polygons) and a range of polygons with holes (resp. general polygons with holes) determines whether the open polygons (resp. general polygons) in the two ranges have a common point.

Parameters
begin1the first iterator of the 1st input range. Its value type is Polygon_2 (resp. General_polygon_2).
end1the past-the-end iterator of the 1st input range. Its value type is Polygon_2 (resp. General_polygon_2).
begin2the first iterator of the 2nd input range. Its value type is Polygon_with_holes_2 (resp. General_polygon_with_holes_2).
end2the past-the-end iterator of the 2nd input range. Its value type is Polygon_with_holes_2 (resp. General_polygon_with_holes_2).
Returns
true if the pairwise intersections of all open polygons (resp. general polygons) and polygons with holes (resp. general polygons with holes) in the ranges [*begin1,*end1) and [*begin2,*end2), respectively, overlap, and false otherwise.

◆ do_intersect() [16/26]

template<typename InputIterator1 , typename InputIterator2 , typename UsePolylines >
bool CGAL::do_intersect ( InputIterator1  begin1,
InputIterator1  end1,
InputIterator2  begin2,
InputIterator2  end2,
UsePolylines  = Tag_true() 
)

#include <CGAL/Boolean_set_operations_2.h>

Given a range of polygons (resp.

general polygons) and a range of polygons with holes (resp. general polygons with holes) determines whether the open polygons (resp. general polygons) in the two ranges have a common point.

Template Parameters
UsePolylinesdetermines whether the boundaries of the polygons in the input ranges are treated as cyclic sequences of single ( \(x\)-monotone) segments or as a cyclic sequences of ( \(x\)-monotone) polylines. If substituted with CGAL::Tag_true, which is the default, the input polygons are converted to general polygon with holes , bounded by polylines before the operation is actually performed. If substituted with CGAL::Tag_false, pgn1 and pgn2 are used as is. Refer to Traits Selection for more information.
Parameters
begin1the first iterator of the 1st input range. Its value type is Polygon_2 (resp. General_polygon_2).
end1the past-the-end iterator of the 1st input range. Its value type is Polygon_2 (resp. General_polygon_2).
begin2the first iterator of the 2nd input range. Its value type is Polygon_with_holes_2 (resp. General_polygon_with_holes_2).
end2the past-the-end iterator of the 2nd input range. Its value type is Polygon_with_holes_2 (resp. General_polygon_with_holes_2).
Returns
true if the pairwise intersections of all open polygons (resp. general polygons) and polygons with holes (resp. general polygons with holes) in the ranges [*begin1,*end1) and [*begin2,*end2), respectively, overlap, and false otherwise.

◆ do_intersect() [17/26]

template<typename Kernel , typename Container , typename GpsTraits >
bool CGAL::do_intersect ( const Polygon_2< Kernel, Container > &  pgn1,
const Polygon_2< Kernel, Container > &  pgn2,
const GpsTraits &  traits 
)

#include <CGAL/Boolean_set_operations_2.h>

determines whether two polygons intersect in their interior.

Parameters
pgn1the 1st input polygon.
pgn2the 2nd input polygon.
traitsa traits object.
Returns
true if pgn1 and pgn2 intersect in their interiro and false otherwise.
Precondition
GpsTraits must be a model of the concept GeneralPolygonSetTraits_2.

◆ do_intersect() [18/26]

template<typename Kernel , typename Container , typename GpsTraits >
bool CGAL::do_intersect ( const Polygon_2< Kernel, Container > &  pgn1,
const Polygon_with_holes_2< Kernel, Container > &  pgn2,
const GpsTraits &  traits,
const GpsTraits &  traits 
)

#include <CGAL/Boolean_set_operations_2.h>

determines whether two polygons intersect in their interior.

Parameters
pgn1the 1st input polygon.
pgn2the 2nd input polygon.
traitsa traits object.
Returns
true if pgn1 and pgn2 intersect in their interiro and false otherwise.
Precondition
GpsTraits must be a model of the concept GeneralPolygonSetTraits_2.

◆ do_intersect() [19/26]

template<typename Kernel , typename Container , typename GpsTraits >
bool CGAL::do_intersect ( const Polygon_with_holes_2< Kernel, Container > &  pgn1,
const Polygon_2< Kernel, Container > &  pgn2,
const GpsTraits &  traits 
)

#include <CGAL/Boolean_set_operations_2.h>

determines whether two polygons intersect in their interior.

Parameters
pgn1the 1st input polygon.
pgn2the 2nd input polygon.
traitsa traits object.
Returns
true if pgn1 and pgn2 intersect in their interiro and false otherwise.
Precondition
GpsTraits must be a model of the concept GeneralPolygonSetTraits_2.

◆ do_intersect() [20/26]

template<typename Kernel , typename Container , typename GpsTraits >
bool CGAL::do_intersect ( const Polygon_with_holes_2< Kernel, Container > &  pgn1,
const Polygon_with_holes_2< Kernel, Container > &  pgn2,
const GpsTraits &  traits 
)

#include <CGAL/Boolean_set_operations_2.h>

determines whether two polygons with holes intersect in their interior.

Parameters
pgn1the 1st input polygon.
pgn2the 2nd input polygon.
traitsa traits object.
Returns
true if pgn1 and pgn2 intersect in their interiro and false otherwise.
Precondition
GpsTraits must be a model of the concept GeneralPolygonSetTraits_2.

◆ do_intersect() [21/26]

template<typename ArrTraits , typename GpsTraits >
bool CGAL::do_intersect ( const General_polygon_2< ArrTraits > &  pgn1,
const General_polygon_2< ArrTraits > &  pgn2,
const GpsTraits &  traits 
)

#include <CGAL/Boolean_set_operations_2.h>

determines whether two general polygons intersect in their interior.

Parameters
pgn1the 1st input polygon.
pgn2the 2nd input polygon.
traitsa traits object.
Returns
true if pgn1 and pgn2 intersect in their interiro and false otherwise.
Precondition
GpsTraits must be a model of the concept GeneralPolygonSetTraits_2.
ArrTraits must be a model of the concept ArrangementDirectionalXMonotoneTraits_2.

◆ do_intersect() [22/26]

template<typename ArrTraits , typename GpsTraits >
bool CGAL::do_intersect ( const General_polygon_2< ArrTraits > &  pgn1,
const General_polygon_with_holes_2< General_polygon_2< ArrTraits >> &  pgn2,
const GpsTraits &  traits 
)

#include <CGAL/Boolean_set_operations_2.h>

determines whether two general polygons intersect in their interior.

Parameters
pgn1the 1st input polygon.
pgn2the 2nd input polygon.
traitsa traits object.
Returns
true if pgn1 and pgn2 intersect in their interiro and false otherwise.
Precondition
GpsTraits must be a model of the concept GeneralPolygonSetTraits_2.
ArrTraits must be a model of the concept ArrangementDirectionalXMonotoneTraits_2.

◆ do_intersect() [23/26]

template<typename ArrTraits , typename GpsTraits >
bool CGAL::do_intersect ( const General_polygon_with_holes_2< General_polygon_2< ArrTraits >> &  pgn1,
const General_polygon_2< ArrTraits > &  pgn2,
const GpsTraits &  traits 
)

#include <CGAL/Boolean_set_operations_2.h>

determines whether two general polygons intersect in their interior.

Parameters
pgn1the 1st input polygon.
pgn2the 2nd input polygon.
traitsa traits object.
Returns
true if pgn1 and pgn2 intersect in their interiro and false otherwise.
Precondition
GpsTraits must be a model of the concept GeneralPolygonSetTraits_2.
ArrTraits must be a model of the concept ArrangementDirectionalXMonotoneTraits_2.

◆ do_intersect() [24/26]

template<typename Polygon , typename GpsTraits >
bool CGAL::do_intersect ( const General_polygon_with_holes_2< Polygon > &  pgn1,
const General_polygon_with_holes_2< Polygon > &  pgn2,
const GpsTraits &  traits 
)

#include <CGAL/Boolean_set_operations_2.h>

determines whether two general polygons with holes intersect in their interior.

Parameters
pgn1the 1st input polygon.
pgn2the 2nd input polygon.
traitsa traits object.
Returns
true if pgn1 and pgn2 intersect in their interiro and false otherwise.
Precondition
GpsTraits must be a model of the concept GeneralPolygonSetTraits_2.
GpsTraits must be a model of the concept GeneralPolygonSetTraits_2.

◆ do_intersect() [25/26]

template<typename InputIterator , typename GpsTraits >
bool CGAL::do_intersect ( InputIterator  begin,
InputIterator  end,
const GpsTraits &  traits 
)

#include <CGAL/Boolean_set_operations_2.h>

Given a range of polygons or a range of polygons with holes (resp.

a range of general polygons or a range of general polygons with holes) determines whether the open polygons (resp. general polygons) in the range have a common point.

Parameters
beginthe first iterator of the input range. Its value type is either Polygon_2 (resp. General_polygon_2) or Polygon_with_holes_2 (resp. General_polygon_with_holes_2).
endthe past-the-end iterator of the input range. Its value type is either Polygon_2 (resp. General_polygon_2) or Polygon_with_holes_2 (resp. General_polygon_with_holes_2).
traitsa traits object.
Returns
true if the pairwise intersections of all open polygons or polygons with holes (resp. general polygons or general polygons with holes) in the range [*begin,*end) overlap, and false otherwise.
Precondition
GpsTraits must be a model of the concept GeneralPolygonSetTraits_2.

◆ do_intersect() [26/26]

template<typename InputIterator1 , typename InputIterator2 , typename GpsTraits >
bool CGAL::do_intersect ( InputIterator1  begin1,
InputIterator1  end1,
InputIterator2  begin2,
InputIterator2  end2,
const GpsTraits &  traits 
)

#include <CGAL/Boolean_set_operations_2.h>

Given a range of polygons (resp.

general polygons) and a range of polygons with holes (resp. general polygons with holes) determines whether the open polygons (resp. general polygons) in the two ranges have a common point.

Parameters
begin1the first iterator of the 1st input range. Its value type is Polygon_2 (resp. General_polygon_2).
end1the past-the-end iterator of the 1st input range. Its value type is Polygon_2 (resp. General_polygon_2).
begin2the first iterator of the 2nd input range. Its value type is Polygon_with_holes_2 (resp. General_polygon_with_holes_2).
end2the past-the-end iterator of the 2nd input range. Its value type is Polygon_with_holes_2 (resp. General_polygon_with_holes_2).
traitsa traits object.
Returns
true if the pairwise intersections of all open polygons (resp. general polygons) and polygons with holes (resp. general polygons with holes) in the ranges [*begin1,*end1) and [*begin2,*end2), respectively, overlap, and false otherwise.