#include #include int main(int argc, char *argv[]) { // Load a 3D mesh Eigen::MatrixXd V; Eigen::MatrixXi F; igl::read_triangle_mesh("mesh.obj", V, F); // Create a viewer igl::opengl::glfw::Viewer viewer; // Add the mesh to the viewer viewer.data().set_mesh(V, F); // Create coordinate axes Eigen::MatrixXd P(6,3); P << 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1; Eigen::MatrixXi E(3,2); E << 0, 1, 0, 2, 0, 3; // viewer.data().add_edges(P.row(E.col(0)), P.row(E.col(1)), Eigen::RowVector3d(1,0,0)); // Launch the viewer viewer.launch(); return 0; }