#ifndef IGL_READ_H #define IGL_READ_H #include "igl_inline.h" #ifndef IGL_NO_EIGEN # include #endif #include #include // History: // return type changed from void to bool Alec 18 Sept 2011 namespace igl { // read mesh from an ascii file with automatic detection of file format. supported: obj, off) // Templates: // Scalar type for positions and vectors (will be read as double and cast // to Scalar) // Index type for indices (will be read as int and cast to Index) // Inputs: // Inputs: // str path to .obj/.off file // Outputs: // V eigen double matrix #V by 3 // F eigen int matrix #F by 3 template IGL_INLINE bool read( const std::string str, std::vector > & V, std::vector > & F); #ifndef IGL_NO_EIGEN template IGL_INLINE bool read( const std::string str, Eigen::PlainObjectBase& V, Eigen::PlainObjectBase& F); #endif } #ifdef IGL_HEADER_ONLY # include "read.cpp" #endif #endif