Use CMake's "configure_file" functionality to store path to the tutorial
shared directory, enabling tutorial executables build out of source to
correctly find the data files.
Former-commit-id: a0eed05e8b
18 lines
373 B
C++
Executable File
18 lines
373 B
C++
Executable File
#include <igl/readOFF.h>
|
|
#include <igl/viewer/Viewer.h>
|
|
#include "tutorial_shared_path.h"
|
|
|
|
Eigen::MatrixXd V;
|
|
Eigen::MatrixXi F;
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
// Load a mesh in OFF format
|
|
igl::readOFF(tutorial_shared_path + "/bunny.off", V, F);
|
|
|
|
// Plot the mesh
|
|
igl::viewer::Viewer viewer;
|
|
viewer.data.set_mesh(V, F);
|
|
viewer.launch();
|
|
}
|