#include "writeMESH.h" #include "verbose.h" #include "matrix_to_list.h" #include #include #include #include template IGL_INLINE bool igl::writeMESH( const std::string mesh_file_name, const std::vector > & V, const std::vector > & T, const std::vector > & F) { Eigen::MatrixXd mV; Eigen::MatrixXi mT,mF; bool is_rect; is_rect = list_to_matrix(V,mV); if(!is_rect) { return false; } is_rect = list_to_matrix(T,mT); if(!is_rect) { return false; } is_rect = list_to_matrix(F,mF); if(!is_rect) { return false; } return igl::writeMESH(mesh_file_name,mV,mT,mF); } template IGL_INLINE bool igl::writeMESH( const std::string str, const Eigen::PlainObjectBase & V, const Eigen::PlainObjectBase & T, const Eigen::PlainObjectBase & F) { using namespace std; using namespace igl; using namespace Eigen; //// This is (surprisingly) slower than the C-ish code below //ofstream mesh_file; //mesh_file.open(str.c_str()); //if(!mesh_file.is_open()) //{ // cerr<<"IOError: "<, Eigen::Matrix, Eigen::Matrix >(std::basic_string, std::allocator >, Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, Eigen::MatrixBase > const&); template bool igl::writeMESH, Eigen::Matrix, Eigen::Matrix >(std::basic_string, std::allocator >, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&); #endif