示例#1
0
        internal CatPoint CreateHiddenCatPoint(Vector3 pos)
        {
            var point = new CatPoint(pos);

            hiddenPoints.Add(point);

            return(point);
        }
示例#2
0
        internal CatPoint CreateCatPoint(Vector3 pos, bool addToSelected = true)
        {
            var point = new CatPoint(pos);

            points.Add(point);

            if (addToSelected)
            {
                var selected = Models.Where(x => x.IsSelected).ToList();
                if (selected.Count > 0 && selected[0] is IChangeablePointCount)
                {
                    var p = (IChangeablePointCount)selected[0];
                    p.AddPoint(point);
                }
            }
            return(point);
        }
示例#3
0
        private void MergePoints()
        {
            var pt = GetFilteredSelected().FirstOrDefault();

            if (pt != null)
            {
                Vector3 pos   = new Vector3();
                var     pts   = GetFilteredSelected().ToList();
                var     newPt = CreateCatPoint(new Vector3());
                int     count = 0;
                foreach (var point in pts)
                {
                    pos += point.Position;
                    point.Replace(newPt);
                    count += 1;
                    RemovePoint(point);
                }
                newPt.Position = pos / count;
            }
        }
示例#4
0
 private void CreatePoint(Vector3 pos)
 {
     CreateCatPoint(pos);
 }