TeraBullet is a version of bullet with extensions for direct interactions for voxel worlds. Written for use with Terasology. this is an implementation of bullet wraps around native bullet using SWIG.
./gradlew native_linux_amd64_gcc
./gradlew native_linux_i686_gcc
./gradlew native_linux_windows_amd64_mingw32
./gradlew native_linux_windows_i686_mingw32
- <toolchain>
- android_armeabi_gcc.cmake
- linux_amd64_gcc.cmake
- linux_i386_gcc.cmake
- linux_windows_amd64_mingw32.cmake
- linux_windows_i686_mingw32.cmake
- macosx_amd64_clang.cmake
- macosx_aarch64_clang.cmake
- windows_amd64_msvc.cmake
- windows_i386_msvc.cmake
cd build
cmake ../ -DCMAKE_TOOLCHAIN_FILE=../toolchains/<toolchain>.cmake
make
To build the natives on linux you need:
- ant - installed on the system to build the natives for the generated wrapper code
- swig - installed on the system to produce both the generated code for the native and java bindings
- linux
- i686
- gcc
- gcc-c++
- libstdc++.i686
- glibc-devel.i686
- amd64
- gcc
- gcc-c++
- glibc-devel
- libstdc++
- i686
- windows
- i686
- mingw32-winpthreads
- mingw32-winpthreads-static
- mingw32-gcc
- mingw32-gcc-c++
- amd64
- mingw64-winpthreads
- mingw64-winpthreads-static
- mingw64-gcc
- mingw64-gcc-c++
- i686
Then simply run ant
to generated the binding code between java along with compiling the necessary libraries.
the output is produced under the native-build
folder and is formatted in this fashion:
`libbullet-[linux,windows]-[i686,amd64].[dll,so]``
To build the java portion of bullet, simply run ./gradlew build
- mac
- i686
- amd64
- aarch64
To allow the build to succeed on Macs install the following (potentially in addition to the prep for JNLua)
brew install swig
brew install cmake
Be sure to have retrieved the submodule in the repo: git submodule update --init --recursive
Note: On Mac the jniHelpers.h
file triggered a compile error. It was then removed along with its sibling jniHelpers.cpp
and two includes in mathtypes.h
and gdxCommon.i
- it did not seem like that was in use, but noting it here for future reference just in case.
To test be sure to make the version in gradle.properties
unique so you can ensure you use it by updating the corresponding version in Terasology's root build.gradle
(natives) as well as its engine/build.gradle
(Java wrapper). Use ./gradlew build zipNatives publishToMavenLocal
to get binaries created locally for JNBullet that Terasology can then read, and make sure to refresh its natives (delete the natives
directory and rerun gradlew extractNatives
)
This library is Licensed under the Apache 2 License and is a rework of bullet wrapper from libgdx