@Override public void setRadius (float radius) { shape.setRadius(radius); }
public PolygonShape() { super(ShapeType.POLYGON); m_count = 0; m_vertices = new Vec2[Settings.maxPolygonVertices]; for (int i = 0; i < m_vertices.length; i++) { m_vertices[i] = new Vec2(); } m_normals = new Vec2[Settings.maxPolygonVertices]; for (int i = 0; i < m_normals.length; i++) { m_normals[i] = new Vec2(); } setRadius(Settings.polygonRadius); m_centroid.setZero(); }
public final Shape clone() { PolygonShape shape = new PolygonShape(); shape.m_centroid.set(this.m_centroid); for (int i = 0; i < shape.m_normals.length; i++) { shape.m_normals[i].set(m_normals[i]); shape.m_vertices[i].set(m_vertices[i]); } shape.setRadius(this.getRadius()); shape.m_count = this.m_count; return shape; }
public PolygonShape() { super(ShapeType.POLYGON); m_count = 0; m_vertices = new Vec2[Settings.maxPolygonVertices]; for (int i = 0; i < m_vertices.length; i++) { m_vertices[i] = new Vec2(); } m_normals = new Vec2[Settings.maxPolygonVertices]; for (int i = 0; i < m_normals.length; i++) { m_normals[i] = new Vec2(); } setRadius(Settings.polygonRadius); m_centroid.setZero(); }
public final Shape clone() { PolygonShape shape = new PolygonShape(); shape.m_centroid.set(this.m_centroid); for (int i = 0; i < shape.m_normals.length; i++) { shape.m_normals[i].set(m_normals[i]); shape.m_vertices[i].set(m_vertices[i]); } shape.setRadius(this.getRadius()); shape.m_count = this.m_count; return shape; }
@Override public void createCircle(float radius) { bodyDef = new BodyDef(); bodyDef.type = type; bodyDef.position.set(position); body = world.createBody(bodyDef); PolygonShape shape = new PolygonShape(); //here it should be CircleShape shape.setRadius(radius);
public PolygonShape() { super(ShapeType.POLYGON); for (int i = 0; i < m_vertices.length; i++) { m_vertices[i] = new Vec2(); } for (int i = 0; i < m_normals.length; i++) { m_normals[i] = new Vec2(); } setRadius(JBoxSettings.polygonRadius); m_centroid.setZero(); }
public PolygonShape() { super(ShapeType.POLYGON); m_count = 0; m_vertices = new Vec2[Settings.maxPolygonVertices]; for (int i = 0; i < m_vertices.length; i++) { m_vertices[i] = new Vec2(); } m_normals = new Vec2[Settings.maxPolygonVertices]; for (int i = 0; i < m_normals.length; i++) { m_normals[i] = new Vec2(); } setRadius(Settings.polygonRadius); m_centroid.setZero(); }
public PolygonShape() { super(ShapeType.POLYGON); m_count = 0; m_vertices = new Vec2[Settings.maxPolygonVertices]; for (int i = 0; i < m_vertices.length; i++) { m_vertices[i] = new Vec2(); } m_normals = new Vec2[Settings.maxPolygonVertices]; for (int i = 0; i < m_normals.length; i++) { m_normals[i] = new Vec2(); } setRadius(Settings.polygonRadius); m_centroid.setZero(); }
public final Shape clone() { PolygonShape shape = new PolygonShape(); shape.m_centroid.set(this.m_centroid); for (int i = 0; i < shape.m_normals.length; i++) { shape.m_normals[i].set(m_normals[i]); shape.m_vertices[i].set(m_vertices[i]); } shape.setRadius(this.getRadius()); shape.vertexCount = this.vertexCount; return shape; }
public final Shape clone() { PolygonShape shape = new PolygonShape(); shape.m_centroid.set(this.m_centroid); for (int i = 0; i < shape.m_normals.length; i++) { shape.m_normals[i].set(m_normals[i]); shape.m_vertices[i].set(m_vertices[i]); } shape.setRadius(this.getRadius()); shape.m_count = this.m_count; return shape; }
public final Shape clone() { PolygonShape shape = new PolygonShape(); shape.m_centroid.set(this.m_centroid); for (int i = 0; i < shape.m_normals.length; i++) { shape.m_normals[i].set(m_normals[i]); shape.m_vertices[i].set(m_vertices[i]); } shape.setRadius(this.getRadius()); shape.m_count = this.m_count; return shape; }