CGAL::do_intersect

bool do_intersect ( Type1 obj1, Type2 obj2)
checks whether obj1 and obj2 intersect. Two objects obj1 and obj2 intersect if there is a point p that is part of both obj1 and obj2. The intersection region of those two objects is defined as the set of all points p that are part of both obj1 and obj2. Note that for objects like triangles and polygons that enclose a bounded region, this region is part of the object.

Depending on which CGAL kernel is used, Type1 and Type2 can be of different types.

With the basic 2D and 3D Kernel (see Chapter 7)

#include <CGAL/intersections.h>

The types Type1 and Type2 can be any of the following:

Also, Type1 and Type2 can be both of type

In three-dimensional space, Type1 can be Plane_3<Kernel> or Triangle_3<Kernel> and Type2 any of

Also, Type1 and Type2 can be respectively of types

With the 2D Circular Kernel (see Chapter 9)

#include <CGAL/Circular_kernel_intersections.h>

If this kernel is used, in addition to the combinations of 2D types previously listed, Type1 and Type2 can be any of the following:

An example illustrating this is presented in Chapter 9.

With the 3D Spherical Kernel (see Chapter 10)

#include <CGAL/Spherical_kernel_intersections.h>

If this kernel is used, in addition to the combinations of 3D types previously listed, Type1 and Type2 can be any of the following:

An example illustrating this is presented in Chapter 10.

Also, another predicate is provided with this kernel:

bool do_intersect ( Type1 obj1, Type2 obj2, Type3 obj3)
checks whether obj1, obj2 and obj3 intersect.

where Type1, Type2 and Type3 can be:

See Also

CGAL::intersection