org.odejava.display package and custom models

Is it possible to use custom models (ex. lightwave models) for my objects using org.odejava.display package?

I am also interested with extending XODE for using custom models. Is it possible? If so how?

Definitally.

Simply create a new bound object passing in the ODE placeable (a Body or GeomPlaceable) and a DisplayPlaceable from.

The same applies to XODE. Parse your XODE file (make sure every node has a unique name!) then iterate though the objects, binding the ones you are interested in to your custom geometry.

I am writing some documentation on this.

Here’s some example code:


gun = new BoundDisplayObject(new Xith3DDisplayObject(gunTG), (PlaceableGeom) space.getGeom(this.name + "_" + "gunGeom"));
boundObjects.add(gun);
      

boundObjects is my DisplayBin instance.

When I parse the XODE file, I prefix all nodes with the a name an a unique number. So “gunGeom” becomes “mymodel-1_gunGeom”. That way I can clone several instances and keep unique names.

Hope that helps,

Will.