py_per_edge_normals.cpp 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. py::enum_<igl::PerEdgeNormalsWeightingType>(m, "PerEdgeNormalsWeightingType")
  9. .value("PER_EDGE_NORMALS_WEIGHTING_TYPE_UNIFORM", igl::PER_EDGE_NORMALS_WEIGHTING_TYPE_UNIFORM)
  10. .value("PER_EDGE_NORMALS_WEIGHTING_TYPE_AREA", igl::PER_EDGE_NORMALS_WEIGHTING_TYPE_AREA)
  11. .value("PER_EDGE_NORMALS_WEIGHTING_TYPE_DEFAULT", igl::PER_EDGE_NORMALS_WEIGHTING_TYPE_DEFAULT)
  12. .value("NUM_PER_EDGE_NORMALS_WEIGHTING_TYPE", igl::NUM_PER_EDGE_NORMALS_WEIGHTING_TYPE)
  13. .export_values();
  14. m.def("per_edge_normals", []
  15. (
  16. const Eigen::MatrixXd& V,
  17. const Eigen::MatrixXi& F,
  18. const igl::PerEdgeNormalsWeightingType weight,
  19. const Eigen::MatrixXd& FN,
  20. Eigen::MatrixXd& N,
  21. Eigen::MatrixXi& E,
  22. Eigen::MatrixXi& EMAP
  23. )
  24. {
  25. return igl::per_edge_normals(V, F, weight, FN, N, E, EMAP);
  26. }, __doc_igl_per_edge_normals,
  27. py::arg("V"), py::arg("F"), py::arg("weight"), py::arg("FN"), py::arg("N"), py::arg("E"), py::arg("EMAP"));
  28. m.def("per_edge_normals", []
  29. (
  30. const Eigen::MatrixXd& V,
  31. const Eigen::MatrixXi& F,
  32. const igl::PerEdgeNormalsWeightingType weight,
  33. Eigen::MatrixXd& N,
  34. Eigen::MatrixXi& E,
  35. Eigen::MatrixXi& EMAP
  36. )
  37. {
  38. return igl::per_edge_normals(V, F, weight, N, E, EMAP);
  39. }, __doc_igl_per_edge_normals,
  40. py::arg("V"), py::arg("F"), py::arg("weight"), py::arg("N"), py::arg("E"), py::arg("EMAP"));
  41. m.def("per_edge_normals", []
  42. (
  43. const Eigen::MatrixXd& V,
  44. const Eigen::MatrixXi& F,
  45. Eigen::MatrixXd& N,
  46. Eigen::MatrixXi& E,
  47. Eigen::MatrixXi& EMAP
  48. )
  49. {
  50. return igl::per_edge_normals(V, F, N, E, EMAP);
  51. }, __doc_igl_per_edge_normals,
  52. py::arg("V"), py::arg("F"), py::arg("N"), py::arg("E"), py::arg("EMAP"));