예제 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Polygon"/> class using an array of coordinates.
 /// </summary>
 /// <param name="pPoints">An <see cref="Vector2DArrayList"/> instance.</param>
 public Polygon(Vector2DArrayList pPoints)
     : base()
 {
     foreach (Vector2 v in pPoints.ToArray())
     {
         m_Points.Add(v);
     }
     initListener();
 }
예제 #2
0
        public static Vector2DArrayList CreateRandomVector2DArray(int count, IDoubleRandomNumberGenerator r)
        {
            Vector2DArrayList result = new Vector2DArrayList(count);

            for (int i = 0; i < count; i++)
            {
                result.Add(new Vector2D(r.NextDouble(), r.NextDouble()));
            }
            return(result);
        }