OpenGP is a C++11 open source library for geometry processing. It has been designed and implemented with a focus on ease of use and performance while maintaining high flexibility. It follows the design principles of Surface_mesh, a mesh data structure developed by the Bielefeld Graphics & Geometry Group as a simpler to use version of OpenMesh. The Reference Manual provides detailed information on the classes and functions provided by OpenGP. Code examples can be found in the respective tutorials. Installation instructions are reported below.
OpenGP uses CMake as its build system. Version 2.8 or greater is required. OpenGP has been tested to build with the following compilers:
Operating System | Compiler |
---|---|
Linux | gcc |
Mac OS-X | gcc, clang |
Windows | Visual Studio 2008 |
Continuous integration with Travis-CI! https://travis-ci.org/OpenGP/OpenGP
To install the header-only version of the library you can just copy&paste the OpenGP folder in the "src" subdirectory in your favorite include folder. In MaxOSX you can also just install it using homebrew as:
brew install https://raw.githubusercontent.com/OpenGP/OpenGP/master/opengp.rb
In your favorite build system simply define the macro OPENGP_HEADERONLY
to use this method.
It is also possible to compile the library into a DLL for larger scale projects. You can checkout a snapshot of the sources as:
$ ~/Developer: git clone https://github.com/OpenGP/OpenGP.git
$ ~/Developer: cd OpenGP
To compile the library simply open cmake/ConfigureOpenGP.cmake
and toggle the following line:
# set(OPENGP_HEADERONLY TRUE)
set(OPENGP_HEADERONLY FALSE)
After this change simply compile/install with CMake:
$ ~/Developer/OpenGP: mkdir build
$ ~/Developer/OpenGP: cd build
$ ~/Developer/OpenGP/build: cmake ..
$ ~/Developer/OpenGP/build: make
$ ~/Developer/OpenGP/build: sudo make install
To uninstall OpenGP (CURRENTLY BROKEN), simply type:
$ ~/Developer/OpenGP/build: sudo make uninstall
Compiling the dynamic library, building the examples or building the applications (more involved examples), can be done by commenting/uncommenting items in the main CMakeLists.txt file.
The documentation for this library is available at http://opengp.github.io/, but you can also generate a local copy by executing the following command (requires doxygen) and opening the file "doc/index.html":
$ ~/Developer/OpenGP/build: make doxygen
$ ~/Developer/OpenGP/build: open doc/index.html
To publish the documentation on http://opengp.github.io/ (only if you have push access rights):
$ ~/Developer/OpenGP/build: make publish_doc
The configuration procedure can be fine-tuned by specifying flags using the -D option of cmake, for example:
$ ~/Developer/OpenGP/build: cmake -DCMAKE_BUILD_TYPE=Release ..
The command above would configure CMake to use release mode as its build type and /usr/bin/g++ as its C++ compiler. For additional information on using cmake
and
customizing its configuration see the CMake
documentation.
Flag | Description |
---|---|
CMAKE_BUILD_TYPE | {DEBUG | RELEASE} Specify the build type |
CMAKE_CXX_COMPILER | {clang, g++, ...} Specify the compiler to be used (default: g++-5, required: c++11 compliant) |
CMAKE_CXX_FLAGS | Specify additional compiler flags, e.g. "-DNDEBUG" disables standard-C assertions |
- Jan'16: Major refactor for adoption in DGP course OpenGP 1.1
- Feb'14: Initial release of the OpenGP 1.0 library