mirror of https://github.com/CGAL/cgal
added default traits parameter
This commit is contained in:
parent
7f14950322
commit
da2e1357e1
|
|
@ -53,32 +53,13 @@ Note that as the input polygons may not be convex, their Minkowski
|
|||
sum may not be a simple polygon. The result is therefore represented
|
||||
as a polygon with holes.
|
||||
|
||||
\pre Both `P` and `Q` are simple polygons.
|
||||
*/
|
||||
template<class Kernel, class Container>
|
||||
Polygon_with_holes_2<Kernel,Container>
|
||||
minkowski_sum_full_convolution_2 (const Polygon_2<Kernel,Container>& P,
|
||||
const Polygon_2<Kernel,Container>& Q);
|
||||
|
||||
/*!
|
||||
\ingroup PkgMinkowskiSum2
|
||||
|
||||
Computes the Minkowski sum \f$ P \oplus Q\f$ of the two given polygons.
|
||||
The function computes the (full) convolution cycles of the two polygons and
|
||||
extract the regions having positive winding number with respect to these
|
||||
cycles. This method work very efficiently, regardless of whether `P`
|
||||
and `Q` are convex or non-convex.
|
||||
Note that as the input polygons may not be convex, their Minkowski
|
||||
sum may not be a simple polygon. The result is therefore represented
|
||||
as a polygon with holes.
|
||||
|
||||
\pre Both `P` and `Q` are simple polygons.
|
||||
*/
|
||||
template<class Kernel, class Container>
|
||||
Polygon_with_holes_2<Kernel,Container>
|
||||
minkowski_sum_full_convolution_2(const Polygon_2<Kernel,Container>& P,
|
||||
const Polygon_2<Kernel,Container>& Q,
|
||||
const Kernel& kernel);
|
||||
const Kernel& kernel = Kernel());
|
||||
|
||||
/*!
|
||||
\ingroup PkgMinkowskiSum2
|
||||
|
|
@ -96,18 +77,41 @@ sum may not be a simple polygon. The result is therefore represented
|
|||
as a polygon with holes.
|
||||
\pre Both `P` and `Q` are simple polygons.
|
||||
*/
|
||||
template<class Kernel, class Container,
|
||||
class PolygonConvexDecomposition_2>
|
||||
template<class Kernel, class Container, class PolygonConvexDecomposition_2>
|
||||
Polygon_with_holes_2<Kernel,Container>
|
||||
minkowski_sum_2 (const Polygon_2<Kernel,Container>& P,
|
||||
const Polygon_2<Kernel,Container>& Q,
|
||||
const PolygonConvexDecomposition_2& decomp);
|
||||
const PolygonConvexDecomposition_2& decomp,
|
||||
const Gps_segment_traits_2& traits = Gps_segment_traits_2<Kernel,Container,Arr_segment_traits>());
|
||||
|
||||
/*!
|
||||
\ingroup PkgMinkowskiSum2
|
||||
|
||||
Computes the Minkowski sum \f$ P \oplus Q\f$ of the two given polygons.
|
||||
If the input polygons `P` and `Q` are not convex, the function
|
||||
Computes the Minkowski sum \f$ P \oplus Q\f$ of polygon \f$ P\f$ and the
|
||||
polygon with holes \f$ Q\f$. If the input polygons `P` and `Q` are not
|
||||
convex, the function decomposes them into convex sub-polygons
|
||||
\f$ P_1, \ldots, P_k\f$ and \f$ Q_1, \ldots, Q_{\ell}\f$ and computes
|
||||
the union of pairwise sub-sums (namely \f$ \bigcup_{i,j}{(P_i \oplus Q_j)}\f$).
|
||||
The decomposition is performed using the given decomposition method
|
||||
`decomp`, which must be an instance of a class template that models the
|
||||
concept `PolygonWithHolesConvexDecomposition_2`.
|
||||
Note that as the input polygons may not be convex, their Minkowski
|
||||
sum may not be a simple polygon. The result is therefore represented
|
||||
as a polygon with holes.
|
||||
*/
|
||||
template<class Kernel, class Container,
|
||||
class PolygonWithHolesConvexDecomposition_2>
|
||||
Polygon_with_holes_2<Kernel,Container>
|
||||
minkowski_sum_2 (const Polygon_2<Kernel,Container>& P,
|
||||
const Polygon_with_holes_2<Kernel,Container>& Q,
|
||||
const PolygonWithHolesConvexDecomposition_2& decomp,
|
||||
const Gps_segment_traits_2& traits = Gps_segment_traits_2<Kernel,Container,Arr_segment_traits>());
|
||||
|
||||
/*!
|
||||
\ingroup PkgMinkowskiSum2
|
||||
|
||||
Computes the Minkowski sum \f$ P \oplus Q\f$ of the two given polygons with
|
||||
holes. If the input polygons `P` and `Q` are not convex, the function
|
||||
decomposes them into convex sub-polygons \f$ P_1, \ldots, P_k\f$ and
|
||||
\f$ Q_1, \ldots, Q_{\ell}\f$ and computes the union of pairwise sub-sums
|
||||
(namely \f$ \bigcup_{i,j}{(P_i \oplus Q_j)}\f$).
|
||||
|
|
@ -119,10 +123,11 @@ sum may not be a simple polygon. The result is therefore represented
|
|||
as a polygon with holes.
|
||||
*/
|
||||
template<class Kernel, class Container,
|
||||
class PolygonWithHolesConvexDecomposition_2>
|
||||
class PolygonWithHolesConvexDecomposition_2>
|
||||
Polygon_with_holes_2<Kernel,Container>
|
||||
minkowski_sum_2 (const Polygon_with_holes_2<Kernel,Container>& P,
|
||||
const Polygon_with_holes_2<Kernel,Container>& Q,
|
||||
const PolygonWithHolesConvexDecomposition_2& decomp);
|
||||
const PolygonWithHolesConvexDecomposition_2& decomp,
|
||||
const Gps_segment_traits_2& traits = Gps_segment_traits_2<Kernel,Container,Arr_segment_traits>());
|
||||
|
||||
} /* namespace CGAL */
|
||||
|
|
|
|||
Loading…
Reference in New Issue