public void MoveVertexFromSelectedPolygon(ZonedPolygonVertexVis _zpvToMove, bool _forward, float _distance) { if (_zpvToMove == null) { return; } bool success = _zpvToMove.SetAt(_forward, _distance); if (success) { // THIS CODE CAUSES A FEEDBACK LOOP: LEAVE IT COMMENTED // this.VerticesOfSelectedPolygon = this.SelectedPolygon.ExtractVerticesForDisplay(); this.OpeningsOfSelectedPolygon = this.SelectedPolygon.ExtractOpeningsForDisplay(); } }
public void RemoveVertexFromSelectedPolygon(ZonedPolygonVertexVis _zpvToRemove) { if (_zpvToRemove == null) { return; } int atIndex = _zpvToRemove.IndexInOwner; bool success = this.SelectedPolygon.RemoveVertex(atIndex); if (success) { this.VerticesOfSelectedPolygon = this.SelectedPolygon.ExtractVerticesForDisplay(); this.OpeningsOfSelectedPolygon = this.SelectedPolygon.ExtractOpeningsForDisplay(); } }
public void SelectVertex(ZonedPolygonVertexVis _v) { if (this.VerticesOfSelectedPolygon == null || this.VerticesOfSelectedPolygon.Count < 1) { return; } foreach (var vert in this.VerticesOfSelectedPolygon) { if (_v == null || _v.ID != vert.ID) { vert.IsSelected = false; } else { vert.IsSelected = true; } } }