#include "winding_number.h" #include "WindingNumberAABB.h" #include #include IGL_INLINE void igl::winding_number( const Eigen::MatrixXd & V, const Eigen::MatrixXi & F, const Eigen::MatrixXd & O, Eigen::VectorXd & W) { using namespace Eigen; // make room for output W.resize(O.rows(),1); switch(F.cols()) { case 2: return winding_number_2( V.data(), V.rows(), F.data(), F.rows(), O.data(), O.rows(), W.data()); case 3: { WindingNumberAABB hier(V,F); hier.grow(); // loop over origins const int no = O.rows(); # pragma omp parallel for if (no>IGL_WINDING_NUMBER_OMP_MIN_VALUE) for(int o = 0;o IGL_INLINE void igl::winding_number_3( const double * V, const int n, const DerivedF * F, const int m, const double * O, const int no, double * S) { // Initialize output // loop over origins #pragma omp parallel for if (no>IGL_WINDING_NUMBER_OMP_MIN_VALUE) for(int o = 0;oIGL_WINDING_NUMBER_OMP_MIN_VALUE && no>1) // loop over faces for(int f = 0;f IGL_INLINE void igl::winding_number_2( const double * V, const int n, const DerivedF * F, const int m, const double * O, const int no, double * S) { // Initialize output // loop over origins #pragma omp parallel for if (no>IGL_WINDING_NUMBER_OMP_MIN_VALUE) for(int o = 0;oIGL_WINDING_NUMBER_OMP_MIN_VALUE && no>1) // loop over faces for(int f = 0;f(double const*, int, int const*, int, double const*, int, double*); template void igl::winding_number_2(double const*, int, double const*, int, double const*, int, double*); template void igl::winding_number_3(double const*, int, double const*, int, double const*, int, double*); #endif