using System; using System.Collections.Generic; using TriangleNet.Data; using TriangleNet.Geometry; namespace TriangleNet.Tools { // Token: 0x0200001C RID: 28 public class VoronoiRegion { // Token: 0x17000046 RID: 70 // (get) Token: 0x060000FD RID: 253 RVA: 0x00014F7E File Offset: 0x0001317E public int ID { get { return this.id; } } // Token: 0x17000047 RID: 71 // (get) Token: 0x060000FE RID: 254 RVA: 0x00014F86 File Offset: 0x00013186 public Point Generator { get { return this.generator; } } // Token: 0x17000048 RID: 72 // (get) Token: 0x060000FF RID: 255 RVA: 0x00014F8E File Offset: 0x0001318E public ICollection Vertices { get { return this.vertices; } } // Token: 0x17000049 RID: 73 // (get) Token: 0x06000100 RID: 256 RVA: 0x00014F96 File Offset: 0x00013196 // (set) Token: 0x06000101 RID: 257 RVA: 0x00014F9E File Offset: 0x0001319E public bool Bounded { get { return this.bounded; } set { this.bounded = value; } } // Token: 0x06000102 RID: 258 RVA: 0x00014FA7 File Offset: 0x000131A7 public VoronoiRegion(Vertex generator) { this.id = generator.id; this.generator = generator; this.vertices = new List(); this.bounded = true; this.neighbors = new Dictionary(); } // Token: 0x06000103 RID: 259 RVA: 0x00014FDF File Offset: 0x000131DF public void Add(Point point) { this.vertices.Add(point); } // Token: 0x06000104 RID: 260 RVA: 0x00014FED File Offset: 0x000131ED public void Add(List points) { this.vertices.AddRange(points); } // Token: 0x06000105 RID: 261 RVA: 0x00014FFC File Offset: 0x000131FC public VoronoiRegion GetNeighbor(Point p) { VoronoiRegion voronoiRegion; if (this.neighbors.TryGetValue(p.id, out voronoiRegion)) { return voronoiRegion; } return null; } // Token: 0x06000106 RID: 262 RVA: 0x00015021 File Offset: 0x00013221 internal void AddNeighbor(int id, VoronoiRegion neighbor) { this.neighbors.Add(id, neighbor); } // Token: 0x06000107 RID: 263 RVA: 0x00015030 File Offset: 0x00013230 public override string ToString() { return string.Format("R-ID {0}", this.id); } // Token: 0x040000CF RID: 207 private int id; // Token: 0x040000D0 RID: 208 private Point generator; // Token: 0x040000D1 RID: 209 private List vertices; // Token: 0x040000D2 RID: 210 private bool bounded; // Token: 0x040000D3 RID: 211 private Dictionary neighbors; } }