main.cpp 521 B

1234567891011121314151617181920
  1. #include <igl/readOFF.h>
  2. #include <igl/writeOBJ.h>
  3. #include <iostream>
  4. #include "tutorial_shared_path.h"
  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(TUTORIAL_SHARED_PATH "/cube.off", V, F);
  11. // Print the vertices and faces matrices
  12. std::cout << "Vertices: " << std::endl << V << std::endl;
  13. std::cout << "Faces: " << std::endl << F << std::endl;
  14. // Save the mesh in OBJ format
  15. igl::writeOBJ("cube.obj",V,F);
  16. }