#include // Comment following line if you are on MacOSX or Linux. //#define WINDOWS_OS #ifdef WINDOWS_OS #include #define GetCurrentWorkingDirectory _getcwd #else #include #define GetCurrentWorkingDirectory getcwd #endif // WINDOWS_OS using namespace std; using namespace igl; using namespace Eigen; int main(int argc, char *argv[]) { string filename; if (argc == 2) { filename = argv[1]; } else { cout << "USAGE: exemple_bin.exe " << endl; return( 0 ); } Eigen::MatrixXd V; Eigen::MatrixXi F; if (!readOBJ(filename, V, F)) { const int bufferSize = 1024; char currentPath[bufferSize]; GetCurrentWorkingDirectory(currentPath, bufferSize); cout << "ERROR: Unable to open file " << filename << " from folder " << currentPath << endl; return( 0 ); } /* 1st ring faces */ cout << "1ST RING FACES" << endl; cout << "VertexIndex " << 1 << endl; cout << "NbNeighborFaces=" << 1 << endl; cout << "RingFaces"; cout << ", " << 1; cout << endl; /* 1st ring vertices */ cout << endl << "1ST RING VERTICES" << endl; cout << "VertexIndex " << 1 << endl; cout << "NbNeighborVertices=" << 1 << endl; cout << "RingVertices"; cout << ", " << 1; cout << endl; /* Faces are oriented consistently */ cout << endl << "EDGE CHECKS" << endl; cout << "Edge(" << 1 << ", " << 2 << "), non-manifold" << endl; cout << "Edge(" << 1 << ", " << 2 << "), boundary " << endl; cout << "TotalNonManifoldEdges, " << 1 << endl; cout << "TotalBoundaryEdges, " << 1 << endl; return 1; }