this.createScreenBorders(physicsContainer);
//Createa circles
for (int i = 0; i < 20; i++) {
PhysicsCircle c = new PhysicsCircle(app, new Vector3D(ToolsMath.getRandom(60, mtApplication.width-60), ToolsMath.getRandom(60, mtApplication.height-60)), 50, world, 1.0f, 0.3f, 0.4f, scale);
MTColor col = new MTColor(ToolsMath.getRandom(60, 255),ToolsMath.getRandom(60, 255),ToolsMath.getRandom(60, 255));
c.setFillColor(col);
c.setStrokeColor(col);
PhysicsHelper.addDragJoint(world, c, c.getBody().isDynamic(), scale);
physicsContainer.addChild(c);
}
//Create rectangle
PhysicsRectangle physRect = new PhysicsRectangle(new Vector3D(100,300), 100, 50, app, world, 1f, 0.4f, 0.4f, scale);
MTColor col = new MTColor(ToolsMath.getRandom(60, 255),ToolsMath.getRandom(60, 255),ToolsMath.getRandom(60, 255));
physRect.setFillColor(col);
physRect.setStrokeColor(col);
PhysicsHelper.addDragJoint(world, physRect, physRect.getBody().isDynamic(), scale);
physicsContainer.addChild(physRect);
//Create polygon
Vertex[] polyVertices = new Vertex[]{
new Vertex(-10,0,0),
new Vertex(10,0,0),
new Vertex(10,50,0),
new Vertex(60,50,0),
new Vertex(60,70,0),
new Vertex(10,70,0),
new Vertex(10,120,0),
new Vertex(-10,120,0),
new Vertex(-10,70,0),
new Vertex(-60,70,0),
new Vertex(-60,50,0),
new Vertex(-10,50,0),
new Vertex(-10,0,0),
};
PhysicsPolygon physPoly = new PhysicsPolygon(polyVertices, new Vector3D(250,250), app, world, 1.0f, 0.3f, 0.4f, scale);
MTColor polyCol = new MTColor(ToolsMath.getRandom(60, 255),ToolsMath.getRandom(60, 255),ToolsMath.getRandom(60, 255));
physPoly.setFillColor(polyCol);
physPoly.setStrokeColor(polyCol);
PhysicsHelper.addDragJoint(world, physPoly, physPoly.getBody().isDynamic(), scale);
//For an anti-aliased outline
List<Vertex[]> contours = new ArrayList<Vertex[]>();