Пример #1
0
 private void BuildGraph()
 {
     var libedges = _voronoiGraph.Edges;
     var centerLookup = new Dictionary<Vector, Center>();
     foreach (var point in _points) {
         var center = new Center {
             index = _centers.Count,
             location = point,
             neighbors = new HashSet<Center>(),
             borders = new HashSet<Edge>(),
             corners = new HashSet<Corner>()
         };
         _centers.Add(center);
         centerLookup[point] = center;
     }
     foreach (Models.Delaunay.Edge libedge in libedges) {
         var delaunayEdge = libedge.edge // TODO: Make voronai edge castable to Delaunay
     }
 }
Пример #2
0
 private void AddToCenterList(Center center, HashSet<Center> centers)
 {
     if (center != null && !centers.Contains(center)) {
         centers.Add(center);
     }
 }