python_shared.mako 1.5 KB

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