Files
igl/tutorial/101_FileIO/main.cpp
T
2014-07-01 21:04:39 -04:00

20 lines
473 B
C++
Executable File

#include <igl/readOFF.h>
#include <igl/writeOBJ.h>
#include <iostream>
Eigen::MatrixXd V;
Eigen::MatrixXi F;
int main(int argc, char *argv[])
{
// Load a mesh in OFF format
igl::readOFF("../shared/cube.off", V, F);
// Print the vertices and faces matrices
std::cout << "Vertices: " << std::endl << V << std::endl;
std::cout << "Faces: " << std::endl << F << std::endl;
// Save the mesh in OBJ format
igl::writeOBJ("cube.obj",V,F);
}