public void AddRange(List<Vector3> points)
 {
     for (int k=0;k<points.Count;k++) {
         this.points.Add (new Point( points[k].x, points[k].y));
     }
     bounds = null;
 }
 public Rectangle Union(Rectangle o)
 {
     double minX = this.minX < o.minX + Point.PRECISION ? this.minX: o.minX;
     double maxX = this.right > o.right - Point.PRECISION ? this.right: o.right;
     double minY = this.minY < o.minY+ Point.PRECISION ? this.minY: o.minY;
     double maxY = this.top > o.top - Point.PRECISION ? this.top: o.top;
     return new Rectangle(minX, minY, maxX-minX, maxY-minY);
 }
 public bool Intersects(Rectangle o)
 {
     if (o.minX>right + Point.PRECISION) return false;
     if (o.right<minX - Point.PRECISION) return false;
     if (o.minY>top + Point.PRECISION) return false;
     if (o.top<minY - Point.PRECISION) return false;
     return true;
 }
 public Polygon()
 {
     contours = new List<Contour> ();
     bounds = null;
 }
 public void AddRange(List<Point> points)
 {
     this.points.AddRange(points);
     bounds = null;
 }
 public void Add(Point p)
 {
     points.Add (p);
     bounds = null;
 }