python_shared.mako 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. #ifdef PY_PNG
  26. extern void python_export_igl_png(py::module &);
  27. #endif
  28. #ifdef PY_COPYLEFT
  29. extern void python_export_igl_copyleft(py::module &);
  30. #endif
  31. PYBIND11_PLUGIN(pyigl) {
  32. py::module m("pyigl", R"pyigldoc(
  33. Python wrappers for libigl
  34. --------------------------
  35. .. currentmodule:: pyigl
  36. .. autosummary::
  37. :toctree: _generate
  38. % for f in functions:
  39. ${f}
  40. % endfor
  41. )pyigldoc");
  42. python_export_vector(m);
  43. python_export_igl(m);
  44. #ifdef PY_VIEWER
  45. python_export_igl_viewer(m);
  46. #endif
  47. #ifdef PY_COMISO
  48. python_export_igl_comiso(m);
  49. #endif
  50. #ifdef PY_TETGEN
  51. python_export_igl_tetgen(m);
  52. #endif
  53. #ifdef PY_EMBREE
  54. python_export_igl_embree(m);
  55. #endif
  56. #ifdef PY_TRIANGLE
  57. python_export_igl_triangle(m);
  58. #endif
  59. #ifdef PY_CGAL
  60. python_export_igl_cgal(m);
  61. #endif
  62. #ifdef PY_PNG
  63. python_export_igl_png(m);
  64. #endif
  65. #ifdef PY_COPYLEFT
  66. python_export_igl_copyleft(m);
  67. #endif
  68. return m.ptr();
  69. }