Ejemplo n.º 1
0
        /// <summary>
        /// Creates a new ViewClipShape from a set of points.
        /// </summary>
        /// <param name="points">The point to make up the ViewClipShape.</param>
        /// <returns>The created ViewClipShape.</returns>
        public static ViewClipShape FromPoints(Vector2[] points)
        {
            ViewClipShape shape = new ViewClipShape(points);

            shape.BuildAxis();
            return(shape);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates a new ViewClipShape from a set of points.
        /// </summary>
        /// <param name="point1">Point 1.</param>
        /// <param name="point2">Point 2.</param>
        /// <param name="point3">Point 3.</param>
        /// <returns>The created ViewClipShape.</returns>
        public static ViewClipShape FromPoints(Vector2 point1,
                                               Vector2 point2, Vector2 point3)
        {
            Vector2[] points = new Vector2[]
            {
                point1,
                point2,
                point3
            };

            ViewClipShape shape = new ViewClipShape(points);

            shape.BuildAxis();
            return(shape);
        }