// This file is part of libigl, a simple c++ geometry processing library. // // Copyright (C) 2014 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 "remesh_self_intersections.h" #include "SelfIntersectMesh.h" #include #include #include template < typename DerivedV, typename DerivedF, typename DerivedVV, typename DerivedFF, typename DerivedIF, typename DerivedJ, typename DerivedIM> IGL_INLINE void igl::remesh_self_intersections( const Eigen::PlainObjectBase & V, const Eigen::PlainObjectBase & F, const RemeshSelfIntersectionsParam & params, Eigen::PlainObjectBase & VV, Eigen::PlainObjectBase & FF, Eigen::PlainObjectBase & IF, Eigen::PlainObjectBase & J, Eigen::PlainObjectBase & IM) { using namespace std; if(params.detect_only) { //// This is probably a terrible idea, but CGAL is throwing floating point //// exceptions. //#ifdef __APPLE__ //#define IGL_THROW_FPE 11 // const auto & throw_fpe = [](int e) // { // throw "IGL_THROW_FPE"; // }; // signal(SIGFPE,throw_fpe); //#endif typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; typedef SelfIntersectMesh< Kernel, DerivedV, DerivedF, DerivedVV, DerivedFF, DerivedIF, DerivedJ, DerivedIM> SelfIntersectMeshK; SelfIntersectMeshK SIM = SelfIntersectMeshK(V,F,params,VV,FF,IF,J,IM); //#ifdef __APPLE__ // signal(SIGFPE,SIG_DFL); //#endif }else { typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel; typedef SelfIntersectMesh< Kernel, DerivedV, DerivedF, DerivedVV, DerivedFF, DerivedIF, DerivedJ, DerivedIM> SelfIntersectMeshK; SelfIntersectMeshK SIM = SelfIntersectMeshK(V,F,params,VV,FF,IF,J,IM); } } #ifdef IGL_STATIC_LIBRARY // Explicit template specialization template void igl::remesh_self_intersections, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, igl::RemeshSelfIntersectionsParam const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); #endif