Navigation: Up, Table of Contents, Bibliography, Index, Title Page

CGAL::do_intersect

#include <CGAL/intersections.h>

1

bool do_intersect ( Type1<R> obj1, Type2<R> 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.

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

Also, in three-dimensional space Type1 can be Plane_3<R> and Type2 any of

See Also

CGAL::intersection


Footnotes

 1  The drawback of <CGAL/intersections.h> is that a lot is included, which results in long compilation times. It is also possible to include only the intersections that are of interest. The naming scheme of the header files is as follows. Intersections of types Type1<R> and Type2<R> are declared in header file CGAL/Type1_Type2_intersection.h. So, intersection routines of segments and lines in 2D are declared in <CGAL/Segment_2_Line_2_intersection.h>. The order of the type names does not matter. It is also possible to include <CGAL/Line_2_Segment_2_intersection.h>. For intersections of two objects of the same type, the type name should be mentioned twice: <CGAL/Segment_2_Segment_2_intersection.h>


Next: do_overlap
Navigation: Up, Table of Contents, Bibliography, Index, Title Page
www.cgal.org. Aug 13, 2001.