java3d and odejava

Is there a way to get these two babies working together ?

Example: I got (the built-in java3d) color-cube(under a TransformGroup of course) and a simple quad(floor) and then hit a key to start the simulation. So, based on cube’s properties like friction, mass and world’s gravity the cube will bounce around…

Thank you!

You run your simulation in odejava. You keep refences to you odebodies of course. You read those bodies positions and then copy those to the corresponding java3d object. So basically you need an object in ode and a similar object in java3d that can show this object. One thing I found out is that nested transformgroups are not a good idea. You need to flatten your scenegraph so you have universe similar to ODes which doesnt use transforms.

When you said “flatten my scenegraph”, you mean that every TGs in the same level bellow my BranchGraph ?

[quote]When you said “flatten my scenegraph”, you mean that every TGs in the same level bellow my BranchGraph ?
[/quote]
Yes no nested transformgroups. All in the same level, because that’s how ODE sees the world.

Ohh man!
Thats gonna f*** my project on doggy!
(I am sorry about that, but thats the first thought that pop in my mind)

damn!

Anyway, where can I download the odejava ?

odejava.org

There is a java3d binding for odejava.

You can download it from here:
https://odejava.dev.java.net/servlets/ProjectDocumentList?folderID=1837&expandFolder=1837&folderID=1836