https://github.com/stephengold/jolt-jni
JVM bindings for Jolt Physics and V-HACD
https://github.com/stephengold/jolt-jni
android-library collision-detection collision-shape java jni jolt-physics jvm-library library open-source physics physics-3d physics-engine physics-simulation ragdoll-physics rigid-bodies rigid-body-dynamics soft-body-simulation vhacd
Last synced: about 1 month ago
JSON representation
JVM bindings for Jolt Physics and V-HACD
- Host: GitHub
- URL: https://github.com/stephengold/jolt-jni
- Owner: stephengold
- License: mit
- Created: 2024-06-26T02:01:36.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2026-03-27T04:27:52.000Z (3 months ago)
- Last Synced: 2026-03-27T16:53:12.775Z (3 months ago)
- Topics: android-library, collision-detection, collision-shape, java, jni, jolt-physics, jvm-library, library, open-source, physics, physics-3d, physics-engine, physics-simulation, ragdoll-physics, rigid-bodies, rigid-body-dynamics, soft-body-simulation, vhacd
- Language: Java
- Homepage: https://stephengold.github.io/jolt-jni-docs/jolt-jni-en/English/overview.html
- Size: 7.38 MB
- Stars: 64
- Watchers: 4
- Forks: 9
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Jolt JNI
[The Jolt-JNI Project][project] provides
[JVM] bindings for [Jolt Physics][jolt]
and [Khaled Mamou's V-HACD Library][vhacd],
to facilitate physics simulation in JVM languages such as [Java] and [Kotlin].
Source code (in Java and C++) is provided under
[an MIT license][license].
## Contents of this document
+ [Translating Jolt Physics applications into Java](#translate)
+ [How to add Jolt JNI to an existing project](#add)
+ [How to build Jolt JNI from source](#build)
+ [Freeing native objects](#free)
+ [External links](#links)
+ [Acknowledgments](#acks)
## Translating Jolt Physics applications into Java
There’s close correspondence between the class/method names
of Jolt Physics and Jolt JNI.
For example:
+ The `Body` class in Jolt JNI will (eventually) provide
all the functionality of the `Body` class in Jolt Physics.
+ The `ConstBody` interface will include all the `const` methods
of the Jolt Physics `Body` class, such as its `GetPosition()` method,
which in Jolt JNI is called `getPosition()`.
Things become slightly more interesting when C++ templates
and public member data are involved. For instance:
+ An array of body IDs is `Array` in Jolt Physics;
in Jolt JNI it’s called a `BodyIdVector`.
+ The `mConvexRadius` member of the `BoxShapeSettings` class
is accessed using `getConvexRadius()` and `setConvexRadius()` in Jolt JNI.
For a couple well-known Jolt Physics examples,
[line-for-line translations into Java](https://github.com/stephengold/jolt-jni/tree/master/src/test/java/testjoltjni/app)
are provided.
[Jump to the table of contents](#toc)
## How to add Jolt JNI to an existing project
[How to add Jolt JNI to an existing project](https://stephengold.github.io/jolt-jni-docs/jolt-jni-en/English/add.html)
[Jump to the table of contents](#toc)
## How to build Jolt JNI from source
[How to build Jolt JNI from source](https://stephengold.github.io/jolt-jni-docs/jolt-jni-en/English/build.html)
[Jump to the table of contents](#toc)
## Freeing native objects
[Freeing native memory](https://stephengold.github.io/jolt-jni-docs/jolt-jni-en/English/free.html)
[Jump to the table of contents](#toc)
## External links
+ [The Jolt Physics repo at GitHub](https://github.com/jrouwe/JoltPhysics)
[Jump to the table of contents](#toc)
## Acknowledgments
Jolt JNI is derived from open-source software:
+ the [Jolt Physics][jolt] project
+ [Khaled Mamou's V-HACD Library][vhacd] for approximate convex decomposition
Useful code was contributed by TropheusJ, wil (aka JNightRider), xI-Mx-Ix,
and MORIMORI0317.
This project also made use of the following software tools:
+ the [Android Studio][studio], [IntelliJ IDEA][idea], and [NetBeans]
integrated development environments
+ the [Checkstyle] tool
+ the [Firefox] web browser
+ the [GNU Compiler Collection][gcc] and [Project Debugger][gdb]
+ the [Git] revision-control system and GitK commit viewer
+ the [GitKraken] client
+ the [Gradle] build tool
+ the [Java] compiler, standard doclet, and runtime environment
+ the [Linux Mint][mint] operating system
+ the [LLVM Compiler Infrastructure][llvm]
+ the [Markdown] document-conversion tool
+ the [Meld] visual merge tool
+ Microsoft Windows and Visual Studio
I am grateful to Riccardo Balbo (aka "riccardo") for bringing
V-HACD to my attention.
I am grateful to [GitHub], [Sonatype],
[Travis], and [MacStadium]
for providing free hosting for this project
and many other open-source projects.
I'm also grateful to my dear Holly, for keeping me sane.
If I've misattributed anything or left anyone out, please let me know, so I can
correct the situation: sgold@sonic.net
[Jump to the table of contents](#toc)
[checkstyle]: https://checkstyle.org "Checkstyle"
[firefox]: https://www.mozilla.org/en-US/firefox "Firefox"
[gcc]: https://gcc.gnu.org "GNU Compiler Collection"
[gdb]: https://www.gnu.org/software/gdb/ "GNU Project Debugger"
[git]: https://git-scm.com "Git"
[github]: https://github.com "GitHub"
[gitkraken]: https://www.gitkraken.com "GitKraken client"
[gradle]: https://gradle.org "Gradle"
[idea]: https://www.jetbrains.com/idea/ "IntelliJ IDEA"
[java]: https://en.wikipedia.org/wiki/Java_(programming_language) "Java programming language"
[jolt]: https://jrouwe.github.io/JoltPhysics "Jolt Physics"
[jvm]: https://en.wikipedia.org/wiki/Java_virtual_machine "Java Virtual Machine"
[kotlin]: https://en.wikipedia.org/wiki/Kotlin_(programming_language) "Kotlin programming language"
[license]: https://github.com/stephengold/jolt-jni/blob/master/LICENSE "Jolt-JNI license"
[llvm]: https://www.llvm.org "LLVM Compiler"
[macstadium]: https://www.macstadium.com/ "MacStadium"
[markdown]: https://daringfireball.net/projects/markdown "Markdown"
[meld]: https://meldmerge.org "Meld merge tool"
[mint]: https://linuxmint.com "Linux Mint"
[netbeans]: https://netbeans.org "NetBeans"
[project]: https://github.com/stephengold/jolt-jni "Jolt-JNI project"
[sonatype]: https://www.sonatype.com "Sonatype"
[studio]: https://developer.android.com/studio "Android Studio IDE"
[travis]: https://travis-ci.com "Travis CI"
[vhacd]: https://github.com/kmammou/v-hacd "V-HACD Library"