Download vendor/libigl/tutorial/101_FileIO/main.cpp from AVSim/simulation-package: direct link, hf CLI and curl.
- Browser
- Download file 486 Bytes
-
https://huggingface.co/datasets/AVSim/simulation-package/resolve/main/vendor/libigl/tutorial/101_FileIO/main.cpp
- Command line
-
hf download hf://datasets/AVSim/simulation-package/vendor/libigl/tutorial/101_FileIO/main.cpp
-
curl -L -o main.cpp https://huggingface.co/datasets/AVSim/simulation-package/resolve/main/vendor/libigl/tutorial/101_FileIO/main.cpp
486 Bytes
| Eigen::MatrixXd V; | |
| Eigen::MatrixXi F; | |
| int main(int argc, char *argv[]) | |
| { | |
| // Load a mesh in OFF format | |
| igl::readOFF(TUTORIAL_SHARED_PATH "/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); | |
| } | |