// This file is part of libigl, a simple c++ geometry processing library. // // Copyright (C) 2018 Alec Jacobson // Copyright (C) 2016 Qingnan Zhou // // 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 "delaunay_triangulation.h" #include "../../delaunay_triangulation.h" #include "orient2D.h" #include "incircle.h" template< typename DerivedV, typename DerivedF> IGL_INLINE void igl::copyleft::cgal::delaunay_triangulation( const Eigen::PlainObjectBase& V, Eigen::PlainObjectBase& F) { typedef typename DerivedV::Scalar Scalar; igl::delaunay_triangulation(V, orient2D, incircle, F); // This function really exists to test our igl::delaunay_triangulation // // It's currently much faster to call cgal's native Delaunay routine // //#include //#include //#include //#include // const auto delaunay = // [&](const Eigen::MatrixXd & V,Eigen::MatrixXi & F) // { // typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; // typedef CGAL::Triangulation_vertex_base_with_info_2 Vb; // typedef CGAL::Triangulation_data_structure_2 Tds; // typedef CGAL::Delaunay_triangulation_2 Delaunay; // typedef Kernel::Point_2 Point; // std::vector< std::pair > points(V.rows()); // for(int i = 0;ivertex(0)->info(); // F(j,1) = face->vertex(1)->info(); // F(j,2) = face->vertex(2)->info(); // j++; // } // } // }; }