// This file is part of libigl, a simple c++ geometry processing library. // // 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 "flip_edge.h" #include "lexicographic_triangulation.h" #include "unique_edge_map.h" #include "is_delaunay.h" #include #include template< typename DerivedV, typename Orient2D, typename InCircle, typename DerivedF> IGL_INLINE void igl::delaunay_triangulation( const Eigen::MatrixBase& V, Orient2D orient2D, InCircle incircle, Eigen::PlainObjectBase& F) { assert(V.cols() == 2); typedef typename DerivedF::Scalar Index; typedef typename DerivedV::Scalar Scalar; igl::lexicographic_triangulation(V, orient2D, F); const size_t num_faces = F.rows(); if (num_faces == 0) { // Input points are degenerate. No faces will be generated. return; } assert(F.cols() == 3); typedef Eigen::Matrix MatrixX2I; MatrixX2I E,uE; Eigen::VectorXi EMAP; std::vector > uE2E; igl::unique_edge_map(F, E, uE, EMAP, uE2E); bool all_delaunay = false; while(!all_delaunay) { all_delaunay = true; for (size_t i=0; i, short (*)(double const*, double const*, double const*), short (*)(double const*, double const*, double const*, double const*), Eigen::Matrix >(Eigen::MatrixBase > const&, short (*)(double const*, double const*, double const*), short (*)(double const*, double const*, double const*, double const*), Eigen::PlainObjectBase >&); #ifdef WIN32 template void igl::delaunay_triangulation, short(*)(double const *, double const *, double const *), short(*)(double const *, double const *, double const *, double const *), class Eigen::Matrix>(class Eigen::MatrixBase> const &, short(*const)(double const *, double const *, double const *), short(*const)(double const *, double const *, double const *, double const *), class Eigen::PlainObjectBase> &); #endif #endif