collision detection - C++ library for mesh to mesh intersection: what is available? -


i need calculate volume intersection , penetration depth between 3d triangular meshes (e.g. in .obj format), quite new computational geometry.

in previous post (mesh mesh intersections) , google search, found few c++ libraries might appropriate job:

  • cgal
  • pqp
  • libigl
  • swift

though, not sure 1 appropriate beginner. suggestion?

libigl of version 1.1 has robust mesh boolean operations in igl/boolean/mesh_boolean.h. uses either implementation using cgal's exact arithmetic kernel or wrapper of cork (another option you).

for now, libigl contains patched version of cork in libigl/external/cork, improves robustness.

while implementing libigl's boolean ops, found cork faster not produce correct result (specifically, fails resolve intersections).

libigl, using cgal backend, robust , still fast compared converting mesh cgal's nef_polyhedron, conducting csg operations , converting mesh. final conversion possible if result manifold. instead, libigl uses cgal exact triangle-triangle intersection , 2d meshing. correct, non-manifold output no problem.

libigl's interface simple , familiar users of eigen. example, find intersection between solid mesh vertices in rows of va , triangles indices in rows of fa , mesh (vb,fb) , store output in new mesh (vc,fc):

#include <igl/boolean/mesh_boolean.h> ... igl::mesh_boolean(va,fa,vb,fb,mesh_boolean_type_union,vc,fc); 

Comments

Popular posts from this blog

javascript - How to name a jQuery function to make a browser's back button work? -

python - Django-easy-pdf: xhtml2pdf reporting reportlab 2.2+ is required, but 3.0 installed -