Skip to content
aecsocketPublic

About

Java bindings for JoltPhysics

Topics

Resources

Stars

27 stars

Watchers

2 watching

Forks

Repository files navigation

JoltJni

License CI Release Snapshot

Java bindings for JoltPhysics

These bindings are still feature-incomplete and unstable.

Coverage

Features:

  • Geometry types
    • Primitives
    • Meshes
  • Rigid bodies
  • Joints
  • Vehicles
  • Characters

Platforms:

  • Linux (x86_64)
  • Windows (x86_64)
  • MacOS (x86_64, arm64)

Build types (change with Gradle flag -PbuildType= or property buildType):

  • debug
  • release
  • distribution (default)

Flavors (change with Gradle flag -Pflavor= or property flavor):

  • sp (single-precision floating point, default)
  • dp (double-precision floating point)

Usage

repositories {
    mavenCentral()
}

dependencies {
    implementation("io.github.aecsocket", "jolt-jni", "VERSION")
    runtimeOnly("io.github.aecsocket", "jolt-jni-natives-linux", "VERSION")
    runtimeOnly("io.github.aecsocket", "jolt-jni-natives-windows", "VERSION")
    runtimeOnly("io.github.aecsocket", "jolt-jni-natives-macos", "VERSION")
    runtimeOnly("io.github.aecsocket", "jolt-jni-natives-macos-arm64", "VERSION")
}

Usage is very similar to JoltPhysics. See HelloJolt.java to get a minimal implementation.

Setup

// Load the native libraries from the jar (in `jolt/`)
JoltEnvironment.load();
// Or load them manually
// System.load("name-of-lib-file");

// Do some Jolt setup
JoltEnvironment.registerDefaultAllocator();
RTTIFactory.setInstance(new RTTIFactory());
JoltEnvironment.registerTypes();

Building from source

You need Ninja installed.

git clone https://github.com/aecsocket/jolt-jni
cd jolt-jni
git submodule update --init
./gradlew build

About

Java bindings for JoltPhysics

Topics

Resources

Stars

27 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages