py_fast_winding_number.cpp 875 B

123456789101112131415161718192021222324
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2019 Thomas Davies [email protected]
  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::class_<igl::FastWindingNumberBVH> FastWindingNumberBVH(m,"FastWindingNumberBVH");
  9. FastWindingNumberBVH.def(py::init<>());
  10. //we only expose precomputation of tree
  11. // for fast_winding_number signing in signed distance
  12. m.def("fast_winding_number", []
  13. (
  14. const Eigen::MatrixXd& V,
  15. const Eigen::MatrixXi& F,
  16. const int order,
  17. igl::FastWindingNumberBVH & fwn_bvh
  18. )
  19. {
  20. igl::fast_winding_number(V.cast<float>(), F, order, fwn_bvh);
  21. }, __doc_igl_signed_distance,
  22. py::arg("V"), py::arg("F"), py::arg("order"), py::arg("fwn_bvh"));