using System; using System.Collections.Generic; using System.Linq; using TriangleNet.Data; namespace TriangleNet.Geometry { // Token: 0x0200002F RID: 47 public class InputGeometry { // Token: 0x06000184 RID: 388 RVA: 0x000180DF File Offset: 0x000162DF public InputGeometry() : this(3) { } // Token: 0x06000185 RID: 389 RVA: 0x000180E8 File Offset: 0x000162E8 public InputGeometry(int capacity) { this.points = new List(capacity); this.segments = new List(); this.holes = new List(); this.regions = new List(); this.bounds = new BoundingBox(); this.pointAttributes = -1; } // Token: 0x1700006D RID: 109 // (get) Token: 0x06000186 RID: 390 RVA: 0x00018141 File Offset: 0x00016341 public BoundingBox Bounds { get { return this.bounds; } } // Token: 0x1700006E RID: 110 // (get) Token: 0x06000187 RID: 391 RVA: 0x00018149 File Offset: 0x00016349 public bool HasSegments { get { return this.segments.Count > 0; } } // Token: 0x1700006F RID: 111 // (get) Token: 0x06000188 RID: 392 RVA: 0x00018159 File Offset: 0x00016359 public int Count { get { return this.points.Count; } } // Token: 0x17000070 RID: 112 // (get) Token: 0x06000189 RID: 393 RVA: 0x00018166 File Offset: 0x00016366 public IEnumerable Points { get { return this.points.Select((Vertex v) => v); } } // Token: 0x17000071 RID: 113 // (get) Token: 0x0600018A RID: 394 RVA: 0x00018192 File Offset: 0x00016392 public ICollection Segments { get { return this.segments; } } // Token: 0x17000072 RID: 114 // (get) Token: 0x0600018B RID: 395 RVA: 0x0001819A File Offset: 0x0001639A public ICollection Holes { get { return this.holes; } } // Token: 0x17000073 RID: 115 // (get) Token: 0x0600018C RID: 396 RVA: 0x000181A2 File Offset: 0x000163A2 public ICollection Regions { get { return this.regions; } } // Token: 0x0600018D RID: 397 RVA: 0x000181AA File Offset: 0x000163AA public void Clear() { this.points.Clear(); this.segments.Clear(); this.holes.Clear(); this.regions.Clear(); this.pointAttributes = -1; } // Token: 0x0600018E RID: 398 RVA: 0x000181DF File Offset: 0x000163DF public void AddPoint(double x, double y) { this.AddPoint(x, y, 0); } // Token: 0x0600018F RID: 399 RVA: 0x000181EA File Offset: 0x000163EA public void AddPoint(double x, double y, int boundary) { this.points.Add(new Vertex(x, y, boundary)); this.bounds.Expand(x, y); } // Token: 0x06000190 RID: 400 RVA: 0x0001820C File Offset: 0x0001640C public void AddPoint(double x, double y, int boundary, double attribute) { this.AddPoint(x, y, 0, new double[] { attribute }); } // Token: 0x06000191 RID: 401 RVA: 0x00018224 File Offset: 0x00016424 public void AddPoint(double x, double y, int boundary, double[] attribs) { if (this.pointAttributes < 0) { this.pointAttributes = ((attribs == null) ? 0 : attribs.Length); } else { if (attribs == null && this.pointAttributes > 0) { throw new ArgumentException("Inconsitent use of point attributes."); } if (attribs != null && this.pointAttributes != attribs.Length) { throw new ArgumentException("Inconsitent use of point attributes."); } } this.points.Add(new Vertex(x, y, boundary) { attributes = attribs }); this.bounds.Expand(x, y); } // Token: 0x06000192 RID: 402 RVA: 0x000182A8 File Offset: 0x000164A8 public void AddPoint(Vertex v) { double[] attributes = v.attributes; if (this.pointAttributes < 0) { this.pointAttributes = ((attributes == null) ? 0 : attributes.Length); } else { if (attributes == null && this.pointAttributes > 0) { throw new ArgumentException("Inconsitent use of point attributes."); } if (attributes != null && this.pointAttributes != attributes.Length) { throw new ArgumentException("Inconsitent use of point attributes."); } } this.points.Add(v); this.bounds.Expand(v.x, v.y); } // Token: 0x06000193 RID: 403 RVA: 0x00018329 File Offset: 0x00016529 public void AddHole(double x, double y) { this.holes.Add(new Point(x, y)); } // Token: 0x06000194 RID: 404 RVA: 0x0001833D File Offset: 0x0001653D public void AddRegion(double x, double y, int id) { this.regions.Add(new RegionPointer(x, y, id)); } // Token: 0x06000195 RID: 405 RVA: 0x00018352 File Offset: 0x00016552 public void AddSegment(int p0, int p1) { this.AddSegment(p0, p1, 0); } // Token: 0x06000196 RID: 406 RVA: 0x0001835D File Offset: 0x0001655D public void AddSegment(int p0, int p1, int boundary) { if (p0 == p1 || p0 < 0 || p1 < 0) { throw new NotSupportedException("Invalid endpoints."); } this.segments.Add(new Edge(p0, p1, boundary)); } // Token: 0x040000FC RID: 252 internal List points; // Token: 0x040000FD RID: 253 internal List segments; // Token: 0x040000FE RID: 254 internal List holes; // Token: 0x040000FF RID: 255 internal List regions; // Token: 0x04000100 RID: 256 private BoundingBox bounds; // Token: 0x04000101 RID: 257 private int pointAttributes = -1; } }