You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
cflin 082fcc5c90 first commit 2 years ago
.idea first commit 2 years ago
3rd/MshIO first commit 2 years ago
cmake first commit 2 years ago
sim-test/rigid-test first commit 2 years ago
src first commit 2 years ago
.gitignore first commit 2 years ago
CMakeLists.txt first commit 2 years ago
LICENSE first commit 2 years ago
README.md first commit 2 years ago
main.cpp first commit 2 years ago

README.md

libigl example project

A blank project example showing how to use libigl and cmake. Feel free and encouraged to copy or fork this project as a way of starting a new personal project using libigl.

See the tutorial first

Then build, run and understand the libigl tutorial.

Dependencies

The only dependencies are STL, Eigen, libigl and the dependencies of the igl::opengl::glfw::Viewer (OpenGL, glad and GLFW). The CMake build system will automatically download libigl and its dependencies using CMake FetchContent, thus requiring no setup on your part.

To use a local copy of libigl rather than downloading the repository via FetchContent, you can use the CMake cache variable FETCHCONTENT_SOURCE_DIR_LIBIGL when configuring your CMake project for the first time:

cmake -DFETCHCONTENT_SOURCE_DIR_LIBIGL=<path-to-libigl> ..

When changing this value, do not forget to clear your CMakeCache.txt, or to update the cache variable via cmake-gui or ccmake.

Compile

Compile this project using the standard cmake routine:

mkdir build
cd build
cmake ..
make

This should find and build the dependencies and create a example binary.

Run

From within the build directory just issue:

./example

A glfw app should launch displaying a 3D cube.