Author Topic: ODE physics engine  (Read 11023 times)

Offline flim

  • byte
  • *
  • Posts: 1
    • View Profile
ODE physics engine
« on: December 19, 2003, 07:30:26 am »
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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
ODE physics engine
« Reply #1 on: December 20, 2003, 04:11:37 pm »
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.

Offline ollioikarinen

  • byte
  • *
  • Posts: 12
    • View Profile
Re: ODE physics engine
« Reply #2 on: June 02, 2007, 07:57:40 pm »
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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: ODE physics engine
« Reply #3 on: June 02, 2007, 08:14:51 pm »
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...

Offline ollioikarinen

  • byte
  • *
  • Posts: 12
    • View Profile
Re: ODE physics engine
« Reply #4 on: June 02, 2007, 09:10:59 pm »
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

Offline ollioikarinen

  • byte
  • *
  • Posts: 12
    • View Profile
Re: ODE physics engine
« Reply #5 on: June 02, 2007, 09:38:05 pm »
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?

Offline manumoi

  • long
  • ***
  • Posts: 121
    • View Profile
    • http://www.iro.umontreal.ca/~blanchae
Re: ODE physics engine
« Reply #6 on: June 03, 2007, 01:31:45 am »
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

Offline ollioikarinen

  • byte
  • *
  • Posts: 12
    • View Profile
Re: ODE physics engine
« Reply #7 on: June 03, 2007, 08:13:57 am »
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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: ODE physics engine
« Reply #8 on: June 03, 2007, 12:55:53 pm »
You may also do something like this:

Code: [Select]
import com.threed.jpct.*;
import com.threed.jpct.World;
import joode.world.*;

or


Code: [Select]
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?

Offline ollioikarinen

  • byte
  • *
  • Posts: 12
    • View Profile
Re: ODE physics engine
« Reply #9 on: June 07, 2007, 10:56:50 am »
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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: ODE physics engine
« Reply #10 on: June 07, 2007, 06:52:48 pm »
It's extremely unlikely that such a thing exists IMHO...