// This file is part of libigl, a simple c++ geometry processing library. // // Copyright (C) 2013 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 "intersect.h" template IGL_INLINE void igl::intersect(const M & A, const M & B, M & C) { // Stupid O(size(A) * size(B)) to do it // Alec: This should be implemented by using unique and sort like `setdiff` M dyn_C(A.size() > B.size() ? A.size() : B.size(),1); // count of intersects int c = 0; // Loop over A for(int i = 0;i IGL_INLINE M igl::intersect(const M & A, const M & B) { M C; intersect(A,B,C); return C; } #ifdef IGL_STATIC_LIBRARY // Explicit template instantiation template Eigen::Matrix igl::intersect >(Eigen::Matrix const&, Eigen::Matrix const&); #endif