CGAL 5.3 - 2D Regularized Boolean Set-Operations

There are several overloaded function templates called Oriented_side() that compute the relative position of either (i) two polygons or (ii) a point and a polygon. This group of function templates is divided into two subgroups.

Oriented Side of two Polygons

Every function template in the first subgroup accepts two polygons pgn1 and pgn2. It returns ON_POSITIVE_SIDE if the two given polygons pgn1 and pgn2 intersect in their interiors, ON_NEGATIVE_SIDE if pgn1 and pgn2 do not intersect at all, and ON_ORIENTED_BOUNDARY if pgn1 and pgn2 intersect only in their boundaries.

A function template in this subgroup has one of the two following signatures:

Parameters

The types Type1 and Type2 of the parameters must be convertible to the types specified in a row in the following table, respectively.

Type1 Type2
Polygon_2 Polygon_2
Polygon_2 Polygon_with_holes_2
Polygon_with_holes_2 Polygon_2
Polygon_with_holes_2 Polygon_with_holes_2
General_polygon_2 General_polygon_2
General_polygon_2 General_polygon_with_holes_2
General_polygon_with_holes_2General_polygon_2
General_polygon_with_holes_2General_polygon_with_holes_2

Oriented Side of a Point and a Polygon

The functions in the second group accept a point p and a polygon pgn. Each function in this group returns ON_POSITIVE_SIDE if the point p is in the interior of pgn, ON_NEGATIVE_SIDE if p is in the exterior of pgn, and ON_ORIENTED_BOUNDARY if p is on the boundary of pgn.

A function in this subgroup has one of the two following signatures:

Parameters

Type must be convertible to one of Polygon_2, Polygon_with_holes_2, General_polygon_2, or General_polygon_with_holes_2.

See also
CGAL::do_intersect()

Functions

template<typename Kernel , typename Container >
Oriented_side CGAL::oriented_side (const Polygon_2< Kernel, Container > &pgn1, const Polygon_2< Kernel, Container > &pgn2)
 computes the relative position of two polygons. More...
 
template<typename Kernel , typename Container >
Oriented_side CGAL::oriented_side (const Polygon_2< Kernel, Container > &pgn1, const Polygon_with_holes_2< Kernel, Container > &pgn2)
 computes the relative position of two polygons. More...
 
template<typename Kernel , typename Container >
Oriented_side CGAL::oriented_side (const Polygon_with_holes_2< Kernel, Container > &pgn1, const Polygon_2< Kernel, Container > &pgn2)
 computes the relative position of two polygons. More...
 
template<typename Kernel , typename Container >
Oriented_side CGAL::oriented_side (const Polygon_with_holes_2< Kernel, Container > &pgn1, const Polygon_with_holes_2< Kernel, Container > &pgn2)
 computes the relative position of two polygons. More...
 
template<typename ArrTraits >
Oriented_side CGAL::oriented_side (const General_polygon_2< ArrTraits > &pgn1, const General_polygon_2< ArrTraits > &pgn2)
 computes the relative position of two polygons. More...
 
template<typename ArrTraits >
Oriented_side CGAL::oriented_side (const General_polygon_2< ArrTraits > &pgn1, const General_polygon_with_holes_2< General_polygon_2< ArrTraits > > &pgn2)
 computes the relative position of two polygons. More...
 
template<typename ArrTraits >
Oriented_side CGAL::oriented_side (const General_polygon_with_holes_2< General_polygon_2< ArrTraits > > &pgn1, const General_polygon_2< ArrTraits > &pgn2)
 computes the relative position of two polygons. More...
 
template<typename Polygon >
Oriented_side CGAL::oriented_side (const General_polygon_with_holes_2< Polygon > &pgn1, const General_polygon_with_holes_2< Polygon > &pgn2)
 computes the relative position of two polygons. More...
 
template<typename Kernel , typename Container , typename GpsTraits >
Oriented_side CGAL::oriented_side (const Polygon_2< Kernel, Container > &pgn1, const Polygon_2< Kernel, Container > &pgn2, const GpsTraits &traits)
 computes the relative position of two polygons. More...
 
template<typename Kernel , typename Container , typename GpsTraits >
Oriented_side CGAL::oriented_side (const Polygon_2< Kernel, Container > &pgn1, const Polygon_with_holes_2< Kernel, Container > &pgn2, const GpsTraits &traits)
 computes the relative position of two polygons. More...
 
template<typename Kernel , typename Container , typename GpsTraits >
Oriented_side CGAL::oriented_side (const Polygon_with_holes_2< Kernel, Container > &pgn1, const Polygon_2< Kernel, Container > &pgn2, const GpsTraits &traits)
 computes the relative position of two polygons. More...
 
template<typename Kernel , typename Container , typename GpsTraits >
Oriented_side CGAL::oriented_side (const Polygon_with_holes_2< Kernel, Container > &pgn1, const Polygon_with_holes_2< Kernel, Container > &pgn2, const GpsTraits &traits)
 computes the relative position of two polygons. More...
 
template<typename ArrTraits , typename GpsTraits >
Oriented_side CGAL::oriented_side (const General_polygon_2< ArrTraits > &pgn1, const General_polygon_2< ArrTraits > &pgn2, const GpsTraits &traits)
 computes the relative position of two polygons. More...
 
template<typename ArrTraits , typename GpsTraits >
Oriented_side CGAL::oriented_side (const General_polygon_2< ArrTraits > &pgn1, const General_polygon_with_holes_2< General_polygon_2< ArrTraits > > &pgn2, const GpsTraits &traits)
 computes the relative position of two polygons. More...
 
template<typename ArrTraits , typename GpsTraits >
Oriented_side CGAL::oriented_side (const General_polygon_with_holes_2< General_polygon_2< ArrTraits > > &pgn1, const General_polygon_2< ArrTraits > &pgn2, const GpsTraits &traits)
 computes the relative position of two polygons. More...
 
template<typename Polygon , typename GpsTraits >
Oriented_side CGAL::oriented_side (const General_polygon_with_holes_2< Polygon > &pgn1, const General_polygon_with_holes_2< Polygon > &pgn2, const GpsTraits &traits)
 computes the relative position of two polygons. More...
 
template<typename Kernel , typename Container >
Oriented_side CGAL::oriented_side (const Point_2 &p, const Polygon_2< Kernel, Container > &pgn)
 computes the relative position of a point and a polygon. More...
 
template<typename Kernel , typename Container >
Oriented_side CGAL::oriented_side (const Point_2 &p, const Polygon_with_holes_2< Kernel, Container > &pgn)
 computes the relative position of a point and a polygon. More...
 
template<typename ArrTraits >
Oriented_side CGAL::oriented_side (const Point_2 &p, const General_polygon_2< ArrTraits > &pgn)
 computes the relative position of a point and a polygon. More...
 
template<typename Polygon >
Oriented_side CGAL::oriented_side (const Point_2 &p, const General_polygon_with_holes_2< Polygon > &pgn)
 computes the relative position of a point and a polygon. More...
 
template<typename Kernel , typename Container , typename GpsTraits >
Oriented_side CGAL::oriented_side (const Point_2 &p, const Polygon_2< Kernel, Container > &pgn, const GpsTraits &traits)
 computes the relative position of a point and a polygon. More...
 
template<typename Kernel , typename Container , typename GpsTraits >
Oriented_side CGAL::oriented_side (const Point_2 &p, const Polygon_with_holes_2< Kernel, Container > &pgn, const GpsTraits &traits)
 computes the relative position of a point and a polygon. More...
 
template<typename ArrTraits , typename GpsTraits >
Oriented_side CGAL::oriented_side (const Point_2 &p, const General_polygon_2< ArrTraits > &pgn, const GpsTraits &traits)
 computes the relative position of a point and a polygon. More...
 
template<typename Polygon , typename GpsTraits >
Oriented_side CGAL::oriented_side (const Point_2 &p, const General_polygon_with_holes_2< Polygon > &pgn, const GpsTraits &traits)
 computes the relative position of a point and a polygon. More...
 

Function Documentation

◆ oriented_side() [1/24]

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

#include <CGAL/Boolean_set_operations_2.h>

computes the relative position of two polygons.

Parameters
pgn1the 1st input polygon.
pgn2the 2nd input polygon.

◆ oriented_side() [2/24]

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

#include <CGAL/Boolean_set_operations_2.h>

computes the relative position of two polygons.

Parameters
pgn1the 1st input polygon.
pgn2the 2nd input polygon.

◆ oriented_side() [3/24]

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

#include <CGAL/Boolean_set_operations_2.h>

computes the relative position of two polygons.

Parameters
pgn1the 1st input polygon.
pgn2the 2nd input polygon.

◆ oriented_side() [4/24]

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

#include <CGAL/Boolean_set_operations_2.h>

computes the relative position of two polygons.

Parameters
pgn1the 1st input polygon.
pgn2the 2nd input polygon.

◆ oriented_side() [5/24]

template<typename ArrTraits >
Oriented_side CGAL::oriented_side ( const General_polygon_2< ArrTraits > &  pgn1,
const General_polygon_2< ArrTraits > &  pgn2 
)

#include <CGAL/Boolean_set_operations_2.h>

computes the relative position of two polygons.

Parameters
pgn11st the input polygon.
pgn2the 2nd input polygon.
Precondition
ArrTraits must be a model of the concept ArrangementDirectionalXMonotoneTraits_2.

◆ oriented_side() [6/24]

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

#include <CGAL/Boolean_set_operations_2.h>

computes the relative position of two polygons.

Parameters
pgn1the 1st input polygon.
pgn2the 2nd input polygon.
Precondition
ArrTraits must be a model of the concept ArrangementDirectionalXMonotoneTraits_2.

◆ oriented_side() [7/24]

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

#include <CGAL/Boolean_set_operations_2.h>

computes the relative position of two polygons.

Parameters
pgn1the 1st input polygon.
pgn2the 2nd input polygon.
Precondition
ArrTraits must be a model of the concept ArrangementDirectionalXMonotoneTraits_2.

◆ oriented_side() [8/24]

template<typename Polygon >
Oriented_side CGAL::oriented_side ( const General_polygon_with_holes_2< Polygon > &  pgn1,
const General_polygon_with_holes_2< Polygon > &  pgn2 
)

#include <CGAL/Boolean_set_operations_2.h>

computes the relative position of two polygons.

Parameters
pgn1the 1st input polygon.
pgn2the 2nd input polygon.

◆ oriented_side() [9/24]

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

#include <CGAL/Boolean_set_operations_2.h>

computes the relative position of two polygons.

Parameters
pgn1the 1st input polygon.
pgn2the 2nd input polygon.
traitsa traits object.
Precondition
GpsTraits must be a model of the concept GeneralPolygonSetTraits_2.

◆ oriented_side() [10/24]

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

#include <CGAL/Boolean_set_operations_2.h>

computes the relative position of two polygons.

Parameters
pgn1the 1st input polygon.
pgn2the 2nd input polygon.
traitsa traits object.
Precondition
GpsTraits must be a model of the concept GeneralPolygonSetTraits_2.

◆ oriented_side() [11/24]

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

#include <CGAL/Boolean_set_operations_2.h>

computes the relative position of two polygons.

Parameters
pgn1the 1st input polygon.
pgn2the 2nd input polygon.
traitsa traits object.
Precondition
GpsTraits must be a model of the concept GeneralPolygonSetTraits_2.

◆ oriented_side() [12/24]

template<typename Kernel , typename Container , typename GpsTraits >
Oriented_side CGAL::oriented_side ( 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>

computes the relative position of two polygons.

Parameters
pgn1the 1st input polygon.
pgn2the 2nd input polygon.
traitsa traits object.
Precondition
GpsTraits must be a model of the concept GeneralPolygonSetTraits_2.

◆ oriented_side() [13/24]

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

#include <CGAL/Boolean_set_operations_2.h>

computes the relative position of two polygons.

Parameters
pgn1the 1st input polygon.
pgn2the 2nd input polygon.
traitsa traits object.
Precondition
ArrTraits must be a model of the concept ArrangementDirectionalXMonotoneTraits_2.
GpsTraits must be a model of the concept GeneralPolygonSetTraits_2.

◆ oriented_side() [14/24]

template<typename ArrTraits , typename GpsTraits >
Oriented_side CGAL::oriented_side ( 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>

computes the relative position of two polygons.

Parameters
pgn1the 1st input polygon.
pgn2the 2nd input polygon.
traitsa traits object.
Precondition
ArrTraits must be a model of the concept ArrangementDirectionalXMonotoneTraits_2.
GpsTraits must be a model of the concept GeneralPolygonSetTraits_2.

◆ oriented_side() [15/24]

template<typename ArrTraits , typename GpsTraits >
Oriented_side CGAL::oriented_side ( 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>

computes the relative position of two polygons.

Parameters
pgn1the 1st input polygon.
pgn2the 2nd input polygon.
traitsa traits object.
Precondition
ArrTraits must be a model of the concept ArrangementDirectionalXMonotoneTraits_2.
GpsTraits must be a model of the concept GeneralPolygonSetTraits_2.

◆ oriented_side() [16/24]

template<typename Polygon , typename GpsTraits >
Oriented_side CGAL::oriented_side ( 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>

computes the relative position of two polygons.

Parameters
pgn1the 1st input polygon.
pgn2the 2nd input polygon.
traitsa traits object.
Precondition
GpsTraits must be a model of the concept GeneralPolygonSetTraits_2.

◆ oriented_side() [17/24]

template<typename Kernel , typename Container >
Oriented_side CGAL::oriented_side ( const Point_2 p,
const Polygon_2< Kernel, Container > &  pgn 
)

#include <CGAL/Boolean_set_operations_2.h>

computes the relative position of a point and a polygon.

Parameters
pthe input point.
pgnthe input polygon.

◆ oriented_side() [18/24]

template<typename Kernel , typename Container >
Oriented_side CGAL::oriented_side ( const Point_2 p,
const Polygon_with_holes_2< Kernel, Container > &  pgn 
)

#include <CGAL/Boolean_set_operations_2.h>

computes the relative position of a point and a polygon.

Parameters
pthe input point.
pgnthe input polygon.

◆ oriented_side() [19/24]

template<typename ArrTraits >
Oriented_side CGAL::oriented_side ( const Point_2 p,
const General_polygon_2< ArrTraits > &  pgn 
)

#include <CGAL/Boolean_set_operations_2.h>

computes the relative position of a point and a polygon.

Parameters
pthe input point.
pgnthe input polygon.
Precondition
ArrTraits must be a model of the concept ArrangementDirectionalXMonotoneTraits_2.

◆ oriented_side() [20/24]

template<typename Polygon >
Oriented_side CGAL::oriented_side ( const Point_2 p,
const General_polygon_with_holes_2< Polygon > &  pgn 
)

#include <CGAL/Boolean_set_operations_2.h>

computes the relative position of a point and a polygon.

Parameters
pthe input point.
pgnthe input polygon.

◆ oriented_side() [21/24]

template<typename Kernel , typename Container , typename GpsTraits >
Oriented_side CGAL::oriented_side ( const Point_2 p,
const Polygon_2< Kernel, Container > &  pgn,
const GpsTraits &  traits 
)

#include <CGAL/Boolean_set_operations_2.h>

computes the relative position of a point and a polygon.

Parameters
pthe input point.
pgnthe input polygon.
traitsa traits object.
Precondition
GpsTraits must be a model of the concept GeneralPolygonSetTraits_2.

◆ oriented_side() [22/24]

template<typename Kernel , typename Container , typename GpsTraits >
Oriented_side CGAL::oriented_side ( const Point_2 p,
const Polygon_with_holes_2< Kernel, Container > &  pgn,
const GpsTraits &  traits 
)

#include <CGAL/Boolean_set_operations_2.h>

computes the relative position of a point and a polygon.

Parameters
pthe input point.
pgnthe input polygon.
traitsa traits object.
Precondition
GpsTraits must be a model of the concept GeneralPolygonSetTraits_2.

◆ oriented_side() [23/24]

template<typename ArrTraits , typename GpsTraits >
Oriented_side CGAL::oriented_side ( const Point_2 p,
const General_polygon_2< ArrTraits > &  pgn,
const GpsTraits &  traits 
)

#include <CGAL/Boolean_set_operations_2.h>

computes the relative position of a point and a polygon.

Parameters
pthe input point.
pgnthe input polygon.
traitsa traits object.
Precondition
ArrTraits must be a model of the concept ArrangementDirectionalXMonotoneTraits_2.
GpsTraits must be a model of the concept GeneralPolygonSetTraits_2.

◆ oriented_side() [24/24]

template<typename Polygon , typename GpsTraits >
Oriented_side CGAL::oriented_side ( const Point_2 p,
const General_polygon_with_holes_2< Polygon > &  pgn,
const GpsTraits &  traits 
)

#include <CGAL/Boolean_set_operations_2.h>

computes the relative position of a point and a polygon.

Parameters
pthe input point.
pgnthe input polygon.
traitsa traits object.
Precondition
GpsTraits must be a model of the concept GeneralPolygonSetTraits_2.