private void cut2segments(Street street, List <Segment> segments) { Point v0; var v1 = street[0]; for (var i = 1; i < streets.Count; i++) { v0 = v1; v1 = street[i]; // Removing segments which go along the plaza if (plaza != null && plaza.shape.Contains(v0) && plaza.shape.Contains(v1)) { continue; } var exists = false; foreach (var seg in segments) { if (seg.start == v0 && seg.end == v1) { exists = true; break; } } if (!exists) { segments.Add(new Segment(v0, v1)); } } }
private void smoothStreet(Street street) { var smoothed = street.smoothVertexEq(3); for (var i = 1; i < street.Count - 1; i++) { street[i] = smoothed[i]; } }