public static PolygonShape CreatePolygon(Vector2D[] vertexes, Scalar gridSpacing, ScalarColor4[] colors) { PolygonShape shape = new PolygonShape(vertexes, gridSpacing); shape.Tag = DrawableFactory.CreatePolygon(vertexes, colors); return(shape); }
public static CircleShape CreateCircle(Scalar radius, int vertexCount, ScalarColor4[] colors) { CircleShape shape = new CircleShape(radius, vertexCount); shape.Tag = DrawableFactory.CreatePolygon(shape.Vertexes, colors); return(shape); }
public static CircleShape CreateColoredCircle(Scalar radius, int vertexCount) { CircleShape shape = new CircleShape(radius, vertexCount); shape.Tag = DrawableFactory.CreatePolygon(shape.Vertexes, CreateColor3Array(vertexCount)); return(shape); }
public static PolygonShape CreateColoredPolygon(Vector2D[] vertexes, Scalar gridSpacing) { PolygonShape shape = new PolygonShape(vertexes, gridSpacing); Vector2D[] reduced = VertexHelper.Reduce(vertexes); shape.Tag = DrawableFactory.CreatePolygon(reduced, CreateColor3Array(reduced.Length)); return(shape); }