py_per_face_normals.cpp 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. m.def("per_face_normals", []
  9. (
  10. const Eigen::MatrixXd& V,
  11. const Eigen::MatrixXi& F,
  12. const Eigen::MatrixXd& Z,
  13. Eigen::MatrixXd& N
  14. )
  15. {
  16. assert_is_VectorX("Z",Z);
  17. return igl::per_face_normals(V,F,Z,N);
  18. }, __doc_igl_per_face_normals,
  19. py::arg("V"), py::arg("F"), py::arg("Z"), py::arg("N"));
  20. m.def("per_face_normals", []
  21. (
  22. const Eigen::MatrixXd& V,
  23. const Eigen::MatrixXi& F,
  24. Eigen::MatrixXd& N
  25. )
  26. {
  27. return igl::per_face_normals(V,F,N);
  28. }, __doc_igl_per_face_normals,
  29. py::arg("V"), py::arg("F"), py::arg("N"));
  30. m.def("per_face_normals_stable", []
  31. (
  32. const Eigen::MatrixXd& V,
  33. const Eigen::MatrixXi& F,
  34. Eigen::MatrixXd& N
  35. )
  36. {
  37. return igl::per_face_normals_stable(V,F,N);
  38. }, __doc_igl_per_face_normals,
  39. py::arg("V"), py::arg("F"), py::arg("N"));