* @see net.phys2d.raw.test.AbstractDemo#init(net.phys2d.raw.World)
*/
protected void init(World world) {
this.world = world;
Body body;
BasicJoint j;
Body base= new StaticBody("Ground1",new Box(500.0f, 20.0f));
base.setPosition(250.0f, 400);
world.add(base);
body = new StaticBody("Ground2",new Box(250.0f, 20.0f));
body.setPosition(225.0f, 200);
body.setFriction(3.0f);
world.add(body);
// pendulum
body = new StaticBody("Pen1",new Box(20.0f, 20.0f));
body.setPosition(70.0f, 100);
world.add(body);
ball = new Body("Ball",new Box(10.0f, 10.0f), 1000);
ball.setPosition(70.0f, 170);
world.add(ball);
j = new BasicJoint(body,ball,new Vector2f(70,110));
world.add(j);
// dominos
for (int i=0;i<8;i++) {
body = new Body("Domino "+i, new Box(10.0f, 40.0f), 10-i);
body.setPosition(120.0f+(i*30), 170);
world.add(body);
}
// ramp
body = new StaticBody("Ground2",new Box(200.0f, 10.0f));
body.setPosition(345.0f, 270);
body.setRotation(-0.6f);
body.setFriction(0);
world.add(body);
// teeter
body = new Body("Teete",new Box(250.0f, 5.0f), 10);
body.setPosition(250.0f, 360);
//body.setFriction(3.0f);
world.add(body);
j = new BasicJoint(body,base,new Vector2f(250,360));
world.add(j);
// turner
body = new Body("Turner", new Box(40.0f, 40.0f), 0.1f);
body.setPosition(390.0f, 330);
body.setFriction(0f);
world.add(body);
j = new BasicJoint(base,body,new Vector2f(390,335));
world.add(j);
Body top = new Body("Top",new Box(40.0f, 5.0f), 0.01f);
top.setPosition(390.0f, 307.5f);
top.setFriction(0f);
world.add(top);
j = new BasicJoint(top,body,new Vector2f(410,310));
world.add(j);
}