Hi,
I’ve fixed the problems associated with GeomPlane, and changed the code to prevent such problems arising in the future.
I believe they arose due to calls to “updatereferences” which gets the current position and rotation of objects. I removed that method and moved the calls to ode which get this data into the relivent methods (e.g. getPosition).
This issue was an API one, due to internal calls to getPosition - however the public methods were also defined. For GeomPlane they simply threw an exception which is better than nothing, but hardly ideal. To get around this problem, I have created a new abstract class PlaceableGeom which inherits Geom. All the position/rotation code was moved to that class - so only geometry which extend it (i.e. not GeomPlane) will work. This also means you don’t have to do checks for instances of GeomPlane before making such method calls and your code won’t break in the future if more unplaceable objects are added to ODE.
I also moved the interface OdeTransformable from org.odejava.display to org.odejava and renamed it Placeable. The naming makes more sense - and it really should have been in the org.odejava package to begin with (my bad).
The introduction of PlaceableGeom may break some existing code - if you do stuff like “Geom g = new GeomBox” then call a setPosition on that code. All you need to do is change the “Geom” to “PlaceableGeom”. Sorry for the change - but we are exchanging a runtime error (or worse) for a logic error - which is a good thing ™.
With these bugs fixed - the official examples run again, so I have updated the JWS on odejava.org. I have tested CarExample on Windows XP, Linux (Fedora Core 1) and Mac OS X (10.3) with positive results in all cases.
Cheers,
Will.