Fork of openGJK with minor fixes https://github.com/MattiaMontanari/openGJK/pull/42
 
 
Go to file
Mattia Montanari ad2d6026b8 apply restrict keyword and fix some typoes in header file 2023-04-22 16:37:27 +02:00
.github/workflows For Mono, use single precision - note that this does not work in unity 2023-04-02 12:07:55 +02:00
examples Set floats 2023-04-02 12:41:38 +02:00
include/openGJK apply restrict keyword and fix some typoes in header file 2023-04-22 16:37:27 +02:00
.gitignore Merge branch 'cmakeWin' into dev 2021-07-03 13:33:36 +02:00
CMakeLists.txt Add single precision option 2023-04-02 12:06:21 +02:00
LICENSE New sub-algorithm 2020-04-18 12:28:17 +01:00
README.md update ReadME to link to the new unity plug-in 2023-04-18 21:54:06 +02:00
openGJK.c apply restrict keyword and fix some typoes in header file 2023-04-22 16:37:27 +02:00

README.md

OpenGJK

A fast and robust C implementation of the Gilbert-Johnson-Keerthi (GJK) algorithm with interfaces for C#, Go, Matlab and Python. A Unity Plug-in is also available in another repository.

Useful links: API references, documentation and automated benchmarks.

Getting started

On Linux, Mac or Windows, install a basic C/C++ toolchain - for example: git, compiler and cmake.

Next, clone this repo:

git clone https://github.com/MattiaMontanari/openGJK

Then use these commands to build and run an example:

cmake -E make_directory build
cmake -E chdir build cmake -DCMAKE_BUILD_TYPE=Release .. 
cmake --build build 
cmake -E chdir build/examples/c ./example_lib_opengjk_ce

The successful output should be:

Distance between bodies 3.653650

However, if you do get an error - any error - please file a bug. Support requests are welcome.

Use OpenGJK in your project

The best source to learn how to use OpenGJK are the examples. They are listed here for C, C#, Go, Matlab and Python. I aim to publish few more for Julia.

Take a look at the examples folder in this repo and have fun. File a request if you wish to see more!

Contribute

You are very welcome to:

  • Create pull requests of any kind
  • Let me know if you are using this library and find it useful
  • Open issues with request for support because they will help you and many others
  • Cite this repository (a sweet GitHub feature) or my paper: Montanari, M. et at, Improving the GJK Algorithm for Faster and More Reliable Distance Queries Between Convex Objects (2017). ACM Trans. Graph.