\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.4 - 2D Regularized Boolean Set-Operations
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages

Each one of these functions computes if the interior of two given polygons p1 and p2 intersect.

The signature of the function is

bool do_intersect(const Type1 & p1, const Type2 & p2);

Parameters

The types of the paramters of the do_intersect() function are any of the following combinations.

Type1 Type2
Polygon_2Polygon_2
Polygon_2Polygon_with_holes_2
Polygon_with_holes_2Polygon_2
Polygon_with_holes_2Polygon_with_holes_2
General_polygon_2General_polygon_2
General_polygon_2General_polygon_with_holes_2
General_polygon_with_holes_2General_polygon_2
General_polygon_with_holes_2General_polygon_with_holes_2
See Also
CGAL::intersection()
CGAL::join()
CGAL::difference()
CGAL::symmetric_difference()

Functions

template<class Kernel , class Container >
bool CGAL::do_intersect (const Polygon_2< Kernel, Container > &p1, const Polygon_2< Kernel, Container > &p2)
 returns true if the polygons p1 and p2 intersect in their interior.
 
template<class Kernel , class Container >
bool CGAL::do_intersect (const Polygon_2< Kernel, Container > &p1, const Polygon_with_holes_2< Kernel, Container > &p2)
 returns true if the polygons p1 and p2 intersect in their interior.
 
template<class Kernel , class Container >
bool CGAL::do_intersect (const Polygon_with_holes_2< Kernel, Container > &p1, const Polygon_2< Kernel, Container > &p2)
 returns true if the polygons p1 and p2 intersect in their interior. More...
 
template<class Kernel , class Container >
bool CGAL::do_intersect (const Polygon_with_holes_2< Kernel, Container > &p1, const Polygon_with_holes_2< Kernel, Container > &p2)
 returns true if the polygons p1 and p2 intersect in their interior.
 
template<class Traits >
bool CGAL::do_intersect (const General_polygon_2< Traits > &p1, const General_polygon_2< Traits > &p2)
 returns true if the general polygons p1 and p2 intersect in their interior.
 
template<class Traits >
bool CGAL::do_intersect (const General_polygon_2< Traits > &p1, const General_polygon_with_holes_2< General_polygon_2< Traits > > &p2)
 returns true if the general polygons p1 and p2 intersect in their interior.
 
template<class Traits >
bool CGAL::do_intersect (const General_polygon_with_holes_2< General_polygon_2< Traits > > &p1, const General_polygon_2< Traits > &p2)
 returns true if the general polygons p1 and p2 intersect in their interior.
 
template<class Polygon >
bool CGAL::do_intersect (const General_polygon_with_holes_2< Polygon > &p1, const General_polygon_with_holes_2< Polygon > &p2)
 returns true if the general polygons p1 and p2 intersect in their interior.
 
template<class InputIterator >
bool CGAL::do_intersect (InputIterator begin, InputIterator end)
 returns true, if the set of general polygons (or general polygons with holes) in the given range intersect in their interior, and false otherwise. More...
 
template<class InputIterator1 , class InputIterator2 >
bool CGAL::do_intersect (InputIterator1 pgn_begin1, InputIterator1 pgn_end1, InputIterator2 pgn_begin2, InputIterator2 pgn_end2)
 returns true, if the set of general polygons and general polygons with holes in the given two ranges respectively intersect in their interior, and false otherwise.
 

Function Documentation

template<class Kernel , class Container >
bool CGAL::do_intersect ( const Polygon_with_holes_2< Kernel, Container > &  p1,
const Polygon_2< Kernel, Container > &  p2 
)

returns true if the polygons p1 and p2 intersect in their interior.

returns true if the interior of polygons p1 and p2 intersect.

#include <CGAL/Boolean_set_operations_2.h>

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

returns true, if the set of general polygons (or general polygons with holes) in the given range intersect in their interior, and false otherwise.

(The value type of the input iterator is used to distinguish between the two).

#include <CGAL/Boolean_set_operations_2.h>