python_shared.mako 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. #include "python_shared.h"
  2. #include <sstream>
  3. #include <string>
  4. #include <fstream>
  5. extern void python_export_vector(py::module &);
  6. extern void python_export_igl(py::module &);
  7. #ifdef PY_VIEWER
  8. extern void python_export_igl_viewer(py::module &);
  9. #endif
  10. #ifdef PY_COMISO
  11. extern void python_export_igl_comiso(py::module &);
  12. #endif
  13. #ifdef PY_TETGEN
  14. extern void python_export_igl_tetgen(py::module &);
  15. #endif
  16. #ifdef PY_EMBREE
  17. extern void python_export_igl_embree(py::module &);
  18. #endif
  19. #ifdef PY_TRIANGLE
  20. extern void python_export_igl_triangle(py::module &);
  21. #endif
  22. #ifdef PY_CGAL
  23. extern void python_export_igl_cgal(py::module &);
  24. #endif
  25. PYBIND11_PLUGIN(pyigl) {
  26. py::module m("pyigl", R"pyigldoc(
  27. Python wrappers for libigl
  28. --------------------------
  29. .. currentmodule:: pyigl
  30. .. autosummary::
  31. :toctree: _generate
  32. % for f in functions:
  33. ${f}
  34. % endfor
  35. )pyigldoc");
  36. python_export_vector(m);
  37. python_export_igl(m);
  38. #ifdef PY_VIEWER
  39. python_export_igl_viewer(m);
  40. #endif
  41. #ifdef PY_COMISO
  42. python_export_igl_comiso(m);
  43. #endif
  44. #ifdef PY_TETGEN
  45. python_export_igl_tetgen(m);
  46. #endif
  47. #ifdef PY_EMBREE
  48. python_export_igl_embree(m);
  49. #endif
  50. #ifdef PY_TRIANGLE
  51. python_export_igl_triangle(m);
  52. #endif
  53. #ifdef PY_CGAL
  54. python_export_igl_cgal(m);
  55. #endif
  56. return m.ptr();
  57. }