main.cpp 497 B

1234567891011121314151617181920
  1. #define IGL_HEADER_ONLY
  2. #include <igl/readOFF.h>
  3. #include <igl/writeOBJ.h>
  4. #include <iostream>
  5. Eigen::MatrixXd V;
  6. Eigen::MatrixXi F;
  7. int main(int argc, char *argv[])
  8. {
  9. // Load a mesh in OFF format
  10. igl::readOFF("../shared/cube.off", V, F);
  11. // Plot the vertices and faces matrices
  12. std::cerr << "Vertices: " << std::endl << V << std::endl;
  13. std::cerr << "Faces: " << std::endl << F << std::endl;
  14. // Save the mesh in OBJ format
  15. igl::writeOBJ("cube.obj",V,F);
  16. }