Mesh to mesh intersections

Doug McClean picture Doug McClean · Nov 1, 2011 · Viewed 9.1k times · Source

I'm looking for a library or a paper that describes how to determine if one triangular mesh intersects another.

Interestingly I am coming up empty. If there is some way to do it in CGAL, it is eluding me.

It seems like it clearly should be possible, because triangle intersection is possible and because each mesh contains a finite number of triangles. But I assume there must be a better way to do it than the obvious O(n*m) approach where one mesh has n triangles and the other has m triangles.

Answer

sloriot picture sloriot · Nov 2, 2011

The way we usually do it using CGAL is with CGAL::box_intersection_d.

You can make it by mixing this example with this one.

EDIT:

Since CGAL 4.12 there is now the function CGAL::Polygon_mesh_processing::do_intersect().