// This file is part of libigl, a simple c++ geometry processing library. // // Copyright (C) 2015 Alec Jacobson // // This Source Code Form is subject to the terms of the Mozilla Public License // v. 2.0. If a copy of the MPL was not distributed with this file, You can // obtain one at http://mozilla.org/MPL/2.0/. #include "peel_outer_hull_layers.h" #include "outer_hull.h" #include "../../LinSpaced.h" #include #include //#define IGL_PEEL_OUTER_HULL_LAYERS_DEBUG #ifdef IGL_PEEL_OUTER_HULL_LAYERS_DEBUG #include "../../writePLY.h" #include "../../writeDMAT.h" #include "../../STR.h" #endif template < typename DerivedV, typename DerivedF, typename DerivedI, typename Derivedflip> IGL_INLINE size_t igl::copyleft::cgal::peel_outer_hull_layers( const Eigen::PlainObjectBase & V, const Eigen::PlainObjectBase & F, Eigen::PlainObjectBase & I, Eigen::PlainObjectBase & flip) { using namespace Eigen; using namespace std; typedef typename DerivedF::Index Index; typedef Matrix MatrixXF; typedef Matrix MatrixXI; typedef Matrix MatrixXflip; const Index m = F.rows(); #ifdef IGL_PEEL_OUTER_HULL_LAYERS_DEBUG cout<<"peel outer hull layers..."<(m,0,m-1); // This is O(n * layers) MatrixXI P(m,1); Index iter = 0; while(Fr.size() > 0) { assert(Fr.rows() == IM.rows()); // Compute outer hull of current Fr MatrixXF Fo; MatrixXI Jo; MatrixXflip flipr; #ifdef IGL_PEEL_OUTER_HULL_LAYERS_DEBUG { cout<<"calling outer hull..." << iter < in_outer(Fr.rows(),false); for(Index g = 0;g #include template unsigned long igl::copyleft::cgal::peel_outer_hull_layers, -1, -1, 0, -1, -1>, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); template size_t igl::copyleft::cgal::peel_outer_hull_layers, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); #endif