#include "remove_duplicate_vertices.h" #include "round.h" #include "unique.h" #include "colon.h" #include "slice.h" #include template < typename DerivedV, typename DerivedSV, typename DerivedSVI, typename DerivedSVJ> IGL_INLINE void igl::remove_duplicate_vertices( const Eigen::PlainObjectBase& V, const double epsilon, Eigen::PlainObjectBase& SV, Eigen::PlainObjectBase& SVI, Eigen::PlainObjectBase& SVJ) { using namespace igl; if(epsilon > 0) { Eigen::PlainObjectBase rV,rSV; round((V/(10.0*epsilon)).eval(),rV); unique_rows(rV,rSV,SVI,SVJ); slice(V,SVI,colon(0,V.cols()-1),SV); }else { unique_rows(V,SV,SVI,SVJ); } } template < typename DerivedV, typename DerivedF, typename DerivedSV, typename DerivedSVI, typename DerivedSVJ, typename DerivedSF> IGL_INLINE void igl::remove_duplicate_vertices( const Eigen::PlainObjectBase& V, const Eigen::PlainObjectBase& F, const double epsilon, Eigen::PlainObjectBase& SV, Eigen::PlainObjectBase& SVI, Eigen::PlainObjectBase& SVJ, Eigen::PlainObjectBase& SF) { using namespace Eigen; using namespace std; remove_duplicate_vertices(V,epsilon,SV,SVI,SVJ); // remap faces #ifndef _WIN32 SF = F.unaryExpr(bind1st(mem_fun( static_cast (&VectorXi::operator())), &SVJ)).eval(); #else // Why doesn't the above compile on windows? SF.resize(F.rows(),F.cols()); for(int f = 0;f, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, double, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); #endif