Esempio n. 1
0
        public static PolygonShape CreatePolygon(Vector2D[] vertexes, Scalar gridSpacing, ScalarColor4[] colors)
        {
            PolygonShape shape = new PolygonShape(vertexes, gridSpacing);

            shape.Tag = DrawableFactory.CreatePolygon(vertexes, colors);
            return(shape);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        public static CircleShape CreateColoredCircle(Scalar radius, int vertexCount)
        {
            CircleShape shape = new CircleShape(radius, vertexCount);

            shape.Tag = DrawableFactory.CreatePolygon(shape.Vertexes, CreateColor3Array(vertexCount));
            return(shape);
        }
Esempio n. 4
0
        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);
        }