blob: dd66ef0f9a6291736cb871719e6b28bdaa4924bf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
package ru.olamedia.olacraft.physics;
import org.ode4j.ode.DBody;
import org.ode4j.ode.DRay;
import org.ode4j.ode.DWorld;
import org.ode4j.ode.OdeHelper;
public class GamePhysicsWorld {
private DWorld world;
public GamePhysicsWorld() {
world = OdeHelper.createWorld();
world.setGravity(0, -0.98, 0);
}
public DWorld getWorld() {
return world;
}
public DBody createBody(){
return OdeHelper.createBody(world);
}
public DRay createRay(int length){
return OdeHelper.createRay(length);
}
}
|