Example #1
0
        public bool Check()
        {
            if (this.keyPointList.Count < 3)
            {
                return(false);
            }
            int i, j, m, n;
            int x = keyPointList.Count;

            for (i = keyPointList.Count - 1, j = 0; j < keyPointList.Count; i = j++)
            {
                for (m = keyPointList.Count - 1, n = 0; n < keyPointList.Count; m = n++)
                {
                    if (m == i || i == n || j == m)
                    {
                        continue;
                    }
                    if (GeometryCal.SegmentIntersect(keyPointList[i].Point, keyPointList[j].Point, keyPointList[m].Point, keyPointList[n].Point))
                    {
                        return(false);
                    }
                }
            }
            return(true);
        }
Example #2
0
 public override bool IsIn(double x, double y)
 {
     return(GeometryCal.PointInPolygon(x, y, this.GetPoints()));
 }