main.cpp 473 B

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