ok, heres what I did to compile odejava-jni, most of this info is from /odejava/odejava-jni/src/readme.txt
- got "with-odejava-jni" branch of odejava-jni from cvs
cvs -d :pserver:guest@cvs.dev.java.net:/cvs checkout -r with-odejava-jni odejava/odejava-jni
2. got latest ode from subversion.
cd odejava/odejava-jni
svn co https://opende.svn.sourceforge.net/svnroot/opende/trunk opende
3. patch ode. Also at this point I copy libdrawstuff.a to /opende/drawstuff/src/ or it doesnt compile. I forget where i got libdrawstuff.a from so if you cant find it you can get it here http://www.xdmgames.com/libdrawstuff.a
cd opende
patch -p0 < ../src/ode.patch
4. configure and build ode
sh autogen.sh
./configure --with-trimesh=gimpact --enable-release
cd ode
make
5. comment out body of TRIMESH_LAST_TRANSFORMATION in odejava-jni/generated/c++/odejava.cxx line 2580-2585(see earlier post).
Build odejava-jni, also here I replaced OPCODE with GIMPACT and changed the JAVA_INCLUDE paths.
cd ../../
cd src
g++ -shared -fPIC -DHAVE_CONFIG_H -I../src/c -I../opende/include -O2 -fno-strict-aliasing -fomit-frame-pointer -ffast-math -Iinclude -IGIMPACT -IGIMPACT/include -I$JAVA_INCLUDE/usr/lib/jvm/java-6-sun/include/linux -I$JAVA_INCLUDE/usr/lib/jvm/java-6-sun/include -DdTRIMESH_ENABLED -c -o ../bin/odejava_wrap.o ../generated/c++/odejava.cxx
g++ -shared -fPIC -DHAVE_CONFIG_H -I../src/c -I../opende/include -O2 -fno-strict-aliasing -fomit-frame-pointer -ffast-math -Iinclude -IGIMPACT -IGIMPACT/include -I$JAVA_INCLUDE/usr/lib/jvm/java-6-sun/include/linux -I$JAVA_INCLUDE/usr/lib/jvm/java-6-sun/include -DdTRIMESH_ENABLED -c -o ../bin/odejava.o ../src/c/odejava.cpp
6. link to make shared lib
g++ -fPIC -shared `find ../opende/ode/src -name *.o` ../bin/odejava_wrap.o ../bin/odejava.o -o ../bin/libodejava.so
7. copy odejava-jni/bin/libodejava.so to jmephysics/impl/ode/lib/
whew! done.
and it works with simple collision but i get error
java: /home/mud2005/odejava/odejava-jni/opende/GIMPACT/src/gim_trimesh.cpp:183: void gim_trimesh_locks_work_data(GIM_TRIMESH*): Assertion `res==0' failed.
Im going to try and email the odejava people and see what they think about using gimpact.
edit: also there is section at the end of readme:
How to generate the sources for org.odejava.ode and odejava_wrap.cxx
edit again: found this in gimpact source:
For access to the trimesh data (vertices, triangle indices), you must call ref gim_trimesh_locks_work_data , and ref gim_trimesh_unlocks_work_data for finish the access.