// This file is part of libigl, a simple c++ geometry processing library. // // Copyright (C) 2015 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 "mesh_to_polyhedron.h" #include #include template IGL_INLINE bool igl::copyleft::cgal::mesh_to_polyhedron( const Eigen::MatrixXd & V, const Eigen::MatrixXi & F, Polyhedron & poly) { typedef typename Polyhedron::HalfedgeDS HalfedgeDS; // Postcondition: hds is a valid polyhedral surface. CGAL::Polyhedron_incremental_builder_3 B(poly.hds()); B.begin_surface(V.rows(),F.rows()); typedef typename HalfedgeDS::Vertex Vertex; typedef typename Vertex::Point Point; assert(V.cols() == 3 && "V must be #V by 3"); for(int v = 0;v #include template bool igl::copyleft::cgal::mesh_to_polyhedron, CGAL::Polyhedron_items_with_id_3, CGAL::HalfedgeDS_default, std::allocator > >(Eigen::Matrix const&, Eigen::Matrix const&, CGAL::Polyhedron_3, CGAL::Polyhedron_items_with_id_3, CGAL::HalfedgeDS_default, std::allocator >&); #endif