Exemple #1
0
        public static PointSet2 ToPointSet(List <Point> points)
        {
            PointSet2 pointSet = new PointSet2();

            for (int i = 0; i < points.Count; i++)
            {
                pointSet.Add(points[i]);
            }
            return(pointSet);
        }
Exemple #2
0
        public PointSet2 DeepCopy()
        {
            PointSet2 pointSet = new PointSet2();

            for (int i = 0; i < base.Count; i++)
            {
                pointSet.Add(new Point(this[i].X, this[i].Y, this[i].Z));
            }
            return(pointSet);
        }
Exemple #3
0
        public void RemoveMultiplePoints3d()
        {
            if (base.Count < 2)
            {
                return;
            }
            base.InnerList.Sort(new PointComparer1());
            PointSet2 pointSet = new PointSet2();

            pointSet.Add(this[base.Count - 1]);
            for (int i = base.Count - 2; i >= 0; i--)
            {
                if (!(this[i] == this[i + 1]))
                {
                    pointSet.Add(this[i]);
                }
            }
            base.Clear();
            for (int j = 0; j < pointSet.Count; j++)
            {
                this.Add(pointSet[j]);
            }
            pointSet.Dispose();
        }