python_shared.cpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. PYBIND11_PLUGIN(pyigl) {
  23. py::module m("pyigl", R"pyigldoc(
  24. Python wrappers for libigl
  25. --------------------------
  26. .. currentmodule:: pyigl
  27. .. autosummary::
  28. :toctree: _generate
  29. )pyigldoc");
  30. python_export_vector(m);
  31. python_export_igl(m);
  32. #ifdef PY_VIEWER
  33. python_export_igl_viewer(m);
  34. #endif
  35. #ifdef PY_COMISO
  36. python_export_igl_comiso(m);
  37. #endif
  38. #ifdef PY_TETGEN
  39. python_export_igl_tetgen(m);
  40. #endif
  41. #ifdef PY_EMBREE
  42. python_export_igl_embree(m);
  43. #endif
  44. #ifdef PY_TRIANGLE
  45. python_export_igl_triangle(m);
  46. #endif
  47. return m.ptr();
  48. }