py_per_vertex_normals.cpp 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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::PerVertexNormalsWeightingType>(m, "PerVertexNormalsWeightingType")
  9. .value("PER_VERTEX_NORMALS_WEIGHTING_TYPE_UNIFORM", igl::PER_VERTEX_NORMALS_WEIGHTING_TYPE_UNIFORM)
  10. .value("PER_VERTEX_NORMALS_WEIGHTING_TYPE_AREA", igl::PER_VERTEX_NORMALS_WEIGHTING_TYPE_AREA)
  11. .value("PER_VERTEX_NORMALS_WEIGHTING_TYPE_ANGLE", igl::PER_VERTEX_NORMALS_WEIGHTING_TYPE_ANGLE)
  12. .value("PER_VERTEX_NORMALS_WEIGHTING_TYPE_DEFAULT", igl::PER_VERTEX_NORMALS_WEIGHTING_TYPE_DEFAULT)
  13. .value("NUM_PER_VERTEX_NORMALS_WEIGHTING_TYPE", igl::NUM_PER_VERTEX_NORMALS_WEIGHTING_TYPE)
  14. .export_values();
  15. m.def("per_vertex_normals", []
  16. (
  17. const Eigen::MatrixXd& V,
  18. const Eigen::MatrixXi& F,
  19. const igl::PerVertexNormalsWeightingType weighting,
  20. Eigen::MatrixXd& N
  21. )
  22. {
  23. return igl::per_vertex_normals(V,F,weighting,N);
  24. }, __doc_igl_per_vertex_normals,
  25. py::arg("V"), py::arg("F"), py::arg("weighting"), py::arg("N"));
  26. m.def("per_vertex_normals", []
  27. (
  28. const Eigen::MatrixXd& V,
  29. const Eigen::MatrixXi& F,
  30. Eigen::MatrixXd& N
  31. )
  32. {
  33. return igl::per_vertex_normals(V,F,N);
  34. }, __doc_igl_per_vertex_normals,
  35. py::arg("V"), py::arg("F"), py::arg("N"));
  36. m.def("per_vertex_normals", []
  37. (
  38. const Eigen::MatrixXd& V,
  39. const Eigen::MatrixXi& F,
  40. const igl::PerVertexNormalsWeightingType weighting,
  41. const Eigen::MatrixXd& FN,
  42. Eigen::MatrixXd& N
  43. )
  44. {
  45. return igl::per_vertex_normals(V,F,weighting,FN,N);
  46. }, __doc_igl_per_vertex_normals,
  47. py::arg("V"), py::arg("F"), py::arg("weighting"), py::arg("FN"), py::arg("N"));
  48. m.def("per_vertex_normals", []
  49. (
  50. const Eigen::MatrixXd& V,
  51. const Eigen::MatrixXi& F,
  52. const Eigen::MatrixXd& FN,
  53. Eigen::MatrixXd& N
  54. )
  55. {
  56. return igl::per_vertex_normals(V,F,FN,N);
  57. }, __doc_igl_per_vertex_normals,
  58. py::arg("V"), py::arg("F"), py::arg("FN"), py::arg("N"));