context.scale(100, 100); context.setLineWidth(0.01); for (Body body = scene.getWorld().getBodyList(); body != null; body = body.getNext()) { Vec2 center = body.getPosition(); context.save();
@Override public void step(TestbedSettings settings) { super.step(settings); for (Body b = getWorld().getBodyList(); b != null; b = b.getNext()) { if (b.getType() != BodyType.DYNAMIC) { continue; } Vec2 p = b.getPosition(); if (p.x <= -10.0f || 10.0f <= p.x || p.y <= 0.0f || 20.0f <= p.y) { p.x += 0.0; } } addTextLine("Press 'c' to create a circle"); }
builder.setSubStepping(argWorld.isSubStepping()); Body cbody = argWorld.getBodyList(); int cnt = 0; HashMap<Body, Integer> bodies = new HashMap<Body, Integer>();
@Override public void step(TestbedSettings settings) { super.step(settings); for (Body b = getWorld().getBodyList(); b != null; b = b.getNext()) { if (b.getType() != BodyType.DYNAMIC) { continue; } Vec2 p = b.getPosition(); if (p.x <= -10.0f || 10.0f <= p.x || p.y <= 0.0f || 20.0f <= p.y) { p.x += 0.0; } } addTextLine("Press 'c' to create a circle"); }
@Override public void drawDebug(PhysicsDebugCanvas aCanvas) { Body theBody = physicsWorld.getBodyList(); while (theBody != null) {
for (Body b = world.getBodyList(); b != null; b = b.getNext()) { xf.set(b.getTransform()); for (Fixture f : b.getFixtures()) { color = Color.color(0.9f, 0.3f, 0.9f); for (Body b = world.getBodyList(); b != null; b = b.getNext()) { if (!b.isActive()) { continue; for (Body b = world.getBodyList(); b != null; b = b.getNext()) { xf.set(b.getTransform()); xf.p.set(b.getWorldCenter());