Main Menu

ODE physics engine

Started by flim, December 19, 2003, 07:30:26 AM

Previous topic - Next topic

flim

Hi,

jPCT is really impressive, is there any plan to include a physics engine in future? I see some graphic library include ODE as the physics engine.

Best Regards

EgonOlsen

Physics would be a nice addition, but ODE is written in native C(++). I think that there is a Java binding for it in the works but that's not what i want to use. It's "bad" enough that OpenGL support requires a native binding. However, simple "physics" can already be implemented by using jPCT's collision detection methods. That should be sufficient for a lot of things.

ollioikarinen

Hi Helge again!

How about now after 4 years when we have JOODE (https://joode.dev.java.net/). Since JOODE is pure Java there's no need for any native bindings.

OLLI

EgonOlsen

Now that the bindings and/or native implementations exist, nobody stops you from using them in combination with jPCT. There's no need to bind them to the engine. You can just use them. Somebody from the forums already did something with ODE lately IIRC...i just don't know who exactly but it should be easy to find out...

ollioikarinen

Yes, you're right. I just compiled succesfully joode into an one jar, so I'm able to import it to jpct-project. But there is no documentation (at least I can't find). I try to find some help from for example jmonkeyengine's forums...

If someone has succesfully implemented JOODE to JPCT, please let me know. I try to figure out something and post here an example, if I success...

Thanks!
OLLI

ollioikarinen

Oh,

I imported joode.jar to my jpct-project. There's a conflict with two World-objects...

I import:
import com.threed.jpct.*;
import joode.world.*;

...so Netbeans says naturally "reference to World is ambiguous, both class com.threed.jpct.World and joode.world.World match" because they both have "World"-class.

Is there anything I can do?

manumoi

you just have to put the full path of a class when instanciating it and the conflict should be resolved. (and not mentioning both import)

For instance


import com.threed.jpct.*;
[...]
joude.world.World myJoudeWorld = new joude.world.World(...); if it is the World class that is creating conflicts

ollioikarinen

Yes, thanks, solved the problem (world=new com.threed.jpct.World();).

Now I ONLY need to get familiar with JOODE, seems to be hard without any tutorials, only doc.

Thanks again manumoi,
OLLI

EgonOlsen

You may also do something like this:


import com.threed.jpct.*;
import com.threed.jpct.World;
import joode.world.*;


or



import com.threed.jpct.*;
import joode.world.*;
import joode.world.World;


so you can leave the complete path out for at least one of the Worlds. Shouldn't be to critical anyway, because Worlds aren't instantiated very often in the code, do they?

ollioikarinen

I noticed that ODEJava is Java 1.4 based, so it's not suitable for cross-browser applets (without plugin). Does anybody know a physics engine written in Java 1.1?

Thanks!
OLLI

EgonOlsen

It's extremely unlikely that such a thing exists IMHO...