#ifndef IGL_LIMIT_FACES #define IGL_LIMIT_FACES namespace igl { // LIMIT_FACES limit given faces F to those which contain (only) indices found // in L. // // [LF] = limit_faces(F,L,exclusive); // [LF,in] = limit_faces(F,L,exclusive); // // Templates: // MatF matrix type of faces, matrixXi // VecL matrix type of vertex indices, VectorXi // Inputs: // F #F by 3 list of face indices // L #L by 1 list of allowed indices // exclusive flag specifying whether a face is included only if all its // indices are in L, default is false // Outputs: // LF #LF by 3 list of remaining faces after limiting // in #F list of whether given face was included // template void limit_faces( const MatF & F, const VecL & L, const bool exclusive, MatF & LF); } // Implementation #include template void igl::limit_faces( const MatF & F, const VecL & L, const bool exclusive, MatF & LF) { using namespace std; using namespace Eigen; vector in(F.rows(),false); int num_in = 0; // loop over faces for(int i = 0;i