\( \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.8 - 2D and 3D Linear Geometry Kernel

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
CGAL::intersection() (2D Circular Kernel)
CGAL::intersection()

##

template<typename Type1 , typename Type2 , typename OutputIterator >
OutputIterator | CGAL::intersection (const Type1 &obj1, const Type2 &obj2, OutputIterator intersections)
| Constructs the intersection elements between the two input objects and stores them in the OutputIterator in lexicographic order, where both, `Type1` and `Type2`, can be either. More...

## Function Documentation

template<typename Type1 , typename Type2 , typename OutputIterator >

OutputIterator CGAL::intersection | ( | const Type1 & | obj1,
|  | const Type2 & | obj2,
|  | OutputIterator | intersections
| ) |  |

Constructs the intersection elements between the two input objects and stores them in the OutputIterator in lexicographic order, where both, `Type1` and `Type2`, can be either.

See Chapter Chapter_2D_Circular_Geometry_Kernel for details on a circular kernel instantiation.

When using a circular kernel, in addition to the function overloads documented here, the following function overloads are also available.

The iterator versions of those functions can be used in conjunction with `Dispatch_output_iterator`.

Since both the number of intersections, if any, and their types, depend on the arguments, the function expects an output iterator on `cpp11::result_of<K::Intersect_2(Type1, Type2)>::type`, as presented below.

- `Line_2<CircularKernel>` or
- `Line_arc_2<CircularKernel>` or
- `Circle_2<CircularKernel>` or
- `Circular_arc_2<CircularKernel>`

Depending on the types `Type1` and `Type2`, these elements can be assigned to

- `std::pair<Circular_arc_point_2<CircularKernel>, unsigned>`, where the unsigned integer is the multiplicity of the corresponding intersection point between `obj1` and `obj2`,
- `Circular_arc_2<CircularKernel>` in case of an overlap of two circular arcs,
- `Line_arc_2<CircularKernel>` in case of an overlap of two line segments or
- `Line_2<CircularKernel>` or `Circle_2<CircularKernel>` in case of two equal input lines or circles.

`#include <CGAL/Circular_kernel_intersections.h>`