ode4j - A Java 3D Physics Engine & Library


The ode4j project aims to provide a continuous Java port of the ODE physics engine.

About the ODE physics engine (cited from their home page):
ODE is an open source, high performance library for simulating rigid body dynamics. It is fully featured, stable, mature and platform independent with an easy to use C/C++ API. It has advanced joint types and integrated collision detection with friction. ODE is useful for simulating vehicles, objects in virtual reality environments and virtual creatures. It is currently used in many computer games, 3D authoring tools and simulation tools.

Home   Download   Forums   Bugs   Contact   ODE



Content

News


Features & Screenshots

For physics features, please refer to the ODE-Wiki

Some screen shots from the demo_crash (one of many included demos):
demo_crash1demo_crash2demo_crash3demo_crash4


Status

Next Steps

Performance & Multi-Threading

ode4j has been optimized for performance, leading to a significant differences to the original code, mostly with respect to the handling of DVector3 and DMatrix3 classes. More improvements are on the way.
For evaluating performance, please do NOT use the demos! They rely on the internal 'drawstuff' library. The way in which drawstuff uses OpenGL is not optimal. While this does not affect performance much under C/C++, it severely affects performance when using the Java-OpenGL API provided by lwjgl. In other words:
Multi-Threading
I did not port ODEs threading model, namely the use of ATOMIC. Instead, ode4j follow are very simple approach to multi-threading support by avoid mutable static fields. That means ode4j can be used in a multi-threaded environment under the following conditions:

Differences to ODE for C/C++

Methods

Migration Guide

The migration guide is not only for migrating code from C/C++ to Java, but also for better understanding the existing documentation.
TBW.

Documentation

ode4j documentation
This only contains ported javadoc and documentation specific to the Java version of ODE. For documentation on physics and mathematics please refer to the 'ODE documentation' further down.
On-line javadoc (or download here)
The demos in the sourcecode provide good examples for many applications
Forums
Tasks
Bugs
Mailing List (web interface). To join e-mail to ode4j-users-request@lists.sourceforge.net with the word 'info' in the header or in the body.
Code Structure

ODE documentation
ODE docs
ODE-Wiki
ODE community

Further links:
http://www.essentialmath.com/tutorial.htm
http://realtimecollisiondetection.net/books/list


Source Code

Please keep in mind that the code is ported from C/C++ and does therefore often not obey common Java coding practices.
Also I avoided cleaning up the code too much, in order to simplify migration to newer ODE releases.

Project Structure of downloadable files
Project Structure - SVN
The source code is available from the SVN repository at sourcefourge.net:
To import the code into Eclipse 3.4, 3.5, 3.6:
  1. Download and install a SVN plugin for Eclipse (The following steps are for Subversive, an alternative plug-in is Subclipse)
  2. Create a new SVN project from existing source
  3. URL = https://ode4j.svn.sourceforge.net/svnroot/ode4j/ode4j-core
  4. Press "Next >"
  5. Browse to select "trunk"
  6. Press "Finish"  (For SVN Project Set-Up)
  7. Press "Finish"  (For check-out)
Perform the steps above for the following sub-projects:

Dependencies

The ode4j-core library requires currently no other libraries except a Java 6 SE JVM or later.
The ode4j-sdk requires lwjgl-2.0.1 or later (confirmed with 2.7.1) for the 'drawstuff' package used in the demos. You will probably reuire lwjgl.jar and lwjgl_util.jar. Please don't forget to include the .jar file and the binaries into your eclipse project. Binaries can be included in eclipse by right-clicking on your propect, then navigate to "Build Path"->"Libraries", then unfold the lwjgl.jar and add the folder that contains the binaries for your platform.
The ode4j-sdk requires JUnit 4.5 for the test harnesses.

Licensing & Copyright

This library is under copyright by Tilmann Zäschke (Java port), Russell L. Smith (copyright holder of the original ODE code) and Francisco Leon (copyright holder of the original GIMPACT code).

This library is free software; you can redistribute it and/or modify it under the terms of EITHER:
(1) The GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The text of the GNU Lesser General Public License is included with this library in the file LICENSE.TXT.
(2) The BSD-style license that is included with this library in the files ODE-LICENSE-BSD.TXT and ODE4j-LICENSE-BSD.TXT.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files LICENSE.TXT, ODE-LICENSE-BSD.TXT, GIMPACT-LICENSE-BSD.TXT, GIMPACT-LICENSE-LGPL.TXT and ODE4J-LICENSE-BSD.TXT for more details.

The LICENSE.TXT, ODE-LICENSE-BSD.TXT, GIMPACT-LICENSE-BSD.TXT, GIMPACT-LICENSE-LGPL.TXT and ODE4J-LICENSE-BSD.TXT files are available in the source code.

Contact / Contributors

Contributors:
Tilmann Zäschke:  ode4j AT gmx DOT de