// This file is part of libigl, a simple c++ geometry processing library. // // Copyright (C) 2013 Daniele Panozzo // // 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/. #ifndef IGL_POLYGON_MESH_TO_TRIANGLE_MESH_H #define IGL_POLYGON_MESH_TO_TRIANGLE_MESH_H #include "igl_inline.h" #ifndef IGL_NO_EIGEN # include #endif #include namespace igl { // Triangulate a general polygonal mesh into a triangle mesh. // // Inputs: // vF list of polygon index lists // Outputs: // F eigen int matrix #F by 3 // // Example: // vector > vV; // vector > vF; // read_triangle_mesh("poly.obj",vV,vF); // MatrixXd V; // MatrixXi F; // list_to_matrix(vV,V); // triangulate(vF,F); template IGL_INLINE void polygon_mesh_to_triangle_mesh( const std::vector > & vF, Eigen::PlainObjectBase& F); template IGL_INLINE void polygon_mesh_to_triangle_mesh( const Eigen::PlainObjectBase& P, Eigen::PlainObjectBase& F); } #ifndef IGL_STATIC_LIBRARY # include "polygon_mesh_to_triangle_mesh.cpp" #endif #endif