internal CatPoint CreateHiddenCatPoint(Vector3 pos) { var point = new CatPoint(pos); hiddenPoints.Add(point); return(point); }
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); }
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; } }
private void CreatePoint(Vector3 pos) { CreateCatPoint(pos); }