Mesh to mesh intersections

2019-01-22 21:50发布

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.

5条回答
小情绪 Triste *
2楼-- · 2019-01-22 22:26

The book Real-Time Collision Detection has some good suggestions for implementing such algorithms. The basic approach is to use spatial partitioning or bounding volumes to reduce the number of tri-tri intersection tests that you need to perform.

There are a number of good academic packages that address this problem including the Proximity Query Package, and the other work of the GAMMA research group at University of North Carolina, SWIFT, I-COLLIDE, and RAPID are all well known. Check that the licenses on these libraries are acceptable.

The Open Dynamics Engine (ODE), is a physics engine that contains optimized implementations of a large number of intersection primitives. You can check out the documentation for the triangle-triangle intersection test on their wiki.

While it isn't exactly what you're looking for, I believe that this is also possible with CGAL - Tree of Triangles, for Intersection and Distance Queries

查看更多
淡お忘
3楼-- · 2019-01-22 22:38

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.

查看更多
啃猪蹄的小仙女
4楼-- · 2019-01-22 22:40

To add to the other answers, there are also techniques involving the 3D Minkowski sum of convex polyhedra - concave polyhedra can be decomposed into convex parts. Check out this.

查看更多
在下西门庆
5楼-- · 2019-01-22 22:41

I think the search term you are missing is overlay. For example, here is a web page on Surface Mesh Overlay. That site has a short bibliography, all by the same authors. Here is another paper on the topic: "Overlay mesh construction using interleaved spanning trees," INFOCOM 2004: Twenty-third Annual Joint Conference of the IEEE Computer and Communications Societies. See also the GIS SE question, "Performing Overlay of Two Triangulated Irregular Networks (TIN)."

查看更多
男人必须洒脱
6楼-- · 2019-01-22 22:47

In libigl, we wrap up cgal's CGAL::box_intersection_dto intersect a mesh with vertices V and faces F with another mesh with vertices U and faces G, storing pairs of intersecting facets as rows in IF:

igl::intersect_other(V,F,U,G,false,IF);

This will ignore self-intersections. For completeness, I'll mention that we also support self-intersections in a separate function:

igl::self_intersect(V,F,...,IF);
查看更多
登录 后发表回答