예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }