jME3 Native Bullet Physics is available for testing
April 27, 2011 in Feature
I was talking about doing this for a long time, now the easter bunny gave me a bit of free time and it is finally here
A native implementation of jME3′s bullet physics library!
Implementation details
- No changes in public bullet API of jME3, no changes for the user
- Direct implementation for jME3, no “wrapper of a wrapper of…”
- Uses native direct buffers where possible
- Native object memory is automatically released by the java GarbageCollector
- Uses C++ pointers as java long, this means instant access to native objects w/o maps etc.
- Build of native libraries done via ANT (C++ compiler required still)
- Library is statically linked
- Easy to extend, java and cpp classes are almost 1:1, even java-only devs should be able to extend this when looking at what is there already. Just add a native method, create the headers and copy the header method stub into the cpp file.
Pros
- Eliminates dependency of jbullet layer, all bullet advancements and fixes can be directly integrated in jme3
- Allows using of all native bullet features (SoftBodys, Multithreading, GPU acceleration etc.) in the future
Cons
- Additional and relatively large native library
(bullet compiles fine on Android and iOS too)
- Danger of native crashes w/o stacktrace
(most situations are handled and throw proper java exceptions)


Latest Comments