py_readTGF.cpp 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2017 Sebastian Koch <s.koch@tu-berlin.de> and Daniele Panozzo <daniele.panozzo@gmail.com>
  4. //
  5. // This Source Code Form is subject to the terms of the Mozilla Public License
  6. // v. 2.0. If a copy of the MPL was not distributed with this file, You can
  7. // obtain one at http://mozilla.org/MPL/2.0/.
  8. // COMPLETE BINDINGS ========================
  9. m.def("readTGF", []
  10. (
  11. const std::string tgf_filename,
  12. Eigen::MatrixXd& C,
  13. Eigen::MatrixXi& E,
  14. Eigen::MatrixXi& P,
  15. Eigen::MatrixXi& BE,
  16. Eigen::MatrixXi& CE,
  17. Eigen::MatrixXi& PE
  18. )
  19. {
  20. Eigen::VectorXi Pv;
  21. bool ret = igl::readTGF(tgf_filename, C, E, Pv, BE, CE, PE);
  22. P = Pv;
  23. return ret;
  24. }, __doc_igl_readTGF,
  25. py::arg("tgf_filename"), py::arg("C"), py::arg("E"), py::arg("P"), py::arg("BE"), py::arg("CE"), py::arg("PE"));
  26. m.def("readTGF", []
  27. (
  28. const std::string tgf_filename,
  29. Eigen::MatrixXd& C,
  30. Eigen::MatrixXi& E
  31. )
  32. {
  33. return igl::readTGF(tgf_filename, C, E);
  34. }, __doc_igl_readTGF,
  35. py::arg("tgf_filename"), py::arg("C"), py::arg("E"));
  36. // INCOMPLETE BINDINGS ========================
  37. //m.def("readTGF", []
  38. //(
  39. // const std::string tgf_filename,
  40. // std::vector<std::vector<double> > & C,
  41. // std::vector<std::vector<int> > & E,
  42. // std::vector<int> & P,
  43. // std::vector<std::vector<int> > & BE,
  44. // std::vector<std::vector<int> > & CE,
  45. // std::vector<std::vector<int> > & PE
  46. //)
  47. //{
  48. // return igl::readTGF(tgf_filename, C, E, P, BE, CE, PE);
  49. //}, __doc_igl_readTGF,
  50. //py::arg("tgf_filename"), py::arg("C"), py::arg("E"), py::arg("P"), py::arg("BE"), py::arg("CE"), py::arg("PE"));