2022-07-09 14:10:45 -07:00
<!-- _____ _ _ __ >
< / ____ | | | |/ / >
< ___ _ __ ___ _ __ | | __ | | ' / >
< / _ \| '_ \ / _ \ '_ \| | |_ |_ | | < >
< | (_) | |_) | __ / | | | |__| | |__| | . \ >
< \___ /| . __ / \___ | _ | | _ | \_____ | \____ /| _ | \_\ >
< | | >
< |_| >
< >
< Copyright 2022 Mattia Montanari , University of Oxford >
< >
< This program is free software: you can redistribute it and / or modify it under >
< the terms of the GNU General Public License as published by the Free Software >
< Foundation , either version 3 of the License . You should have received a copy >
< of the GNU General Public License along with this program . If not , visit >
< >
< https: / / www . gnu . org / licenses / >
< >
< This program is distributed in the hope that it will be useful , but WITHOUT >
< ANY WARRANTY ; without even the implied warranty of MERCHANTABILITY or FITNESS >
< FOR A PARTICULAR PURPOSE . See GNU General Public License for details . -- >
2018-11-13 14:17:15 -08:00
2023-04-15 06:46:11 -07:00
# Get started
2018-11-13 14:17:15 -08:00
2023-02-13 05:11:28 -08:00
On Linux, Mac or Windows, if you have a basic C/C++ toolchain installed (git, compiler and cmake) clone this repo:
2018-11-13 14:17:15 -08:00
2023-04-15 06:46:11 -07:00
``` bash
2022-07-09 14:45:07 -07:00
git clone https://github.com/MattiaMontanari/openGJK.git
2022-07-09 14:10:45 -07:00
```
2023-02-13 05:11:28 -08:00
Then use these commands to build and run an example:
2022-07-09 14:10:45 -07:00
2023-04-15 06:46:11 -07:00
``` bash
2022-07-09 14:10:45 -07:00
cmake -E make_directory build
2022-07-19 06:19:07 -07:00
cmake -E chdir build cmake -DCMAKE_BUILD_TYPE=Release ..
2022-07-09 14:10:45 -07:00
cmake --build build
2022-07-09 14:43:12 -07:00
cmake -E chdir build/examples/c ./example_lib_opengjk_ce
2022-07-09 14:10:45 -07:00
```
If you get no errors, the successfull output is:
2022-07-09 14:43:45 -07:00
2023-04-15 06:46:11 -07:00
> `Distance between bodies 3.653650`
2022-07-09 14:43:45 -07:00
2022-07-09 14:10:45 -07:00
However, if you do get an error - any error - please file a bug! Support requests are welcome too.
2023-02-13 05:11:28 -08:00
# Use OpenGJK in your project
2022-07-09 14:10:45 -07:00
2023-02-13 05:11:28 -08:00
The best source to learn how to use OpenGJK are the examples. They are listed [here ](https://www.mattiamontanari.com/opengjk/docs/examples/ ) for C, C#, Go, Matlab and Python. I aim to publish few more for Julia and Unity.
2022-07-09 14:10:45 -07:00
2023-04-15 06:46:11 -07:00
Take a look at the `examples` folder in this repo and have fun. File a request if you wish to see more!
2023-02-13 05:11:28 -08:00
# Contribute
You are very welcome to:
- Create pull requests of any kind
2023-04-15 06:46:11 -07:00
- Let me know if you are using this library and find it useful
2023-02-13 05:11:28 -08:00
- Open issues with request for support because they will help you and many others
- Cite this repository ([a sweet GitHub feature](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-citation-files#about-citation-files)) 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.