using System; namespace TriangleNet.Geometry { // Token: 0x0200002C RID: 44 public class BoundingBox { // Token: 0x06000167 RID: 359 RVA: 0x00017C6D File Offset: 0x00015E6D public BoundingBox() : this(double.MaxValue, double.MaxValue, double.MinValue, double.MinValue) { } // Token: 0x06000168 RID: 360 RVA: 0x00017C99 File Offset: 0x00015E99 public BoundingBox(BoundingBox other) : this(other.MinX, other.MinY, other.MaxX, other.MaxY) { } // Token: 0x06000169 RID: 361 RVA: 0x00017CB9 File Offset: 0x00015EB9 public BoundingBox(double xmin, double ymin, double xmax, double ymax) { this.xmin = xmin; this.xmax = xmax; this.ymin = ymin; this.ymax = ymax; } // Token: 0x17000062 RID: 98 // (get) Token: 0x0600016A RID: 362 RVA: 0x00017CDE File Offset: 0x00015EDE public double MinX { get { return this.xmin; } } // Token: 0x17000063 RID: 99 // (get) Token: 0x0600016B RID: 363 RVA: 0x00017CE6 File Offset: 0x00015EE6 public double MaxX { get { return this.xmax; } } // Token: 0x17000064 RID: 100 // (get) Token: 0x0600016C RID: 364 RVA: 0x00017CEE File Offset: 0x00015EEE public double MinY { get { return this.ymin; } } // Token: 0x17000065 RID: 101 // (get) Token: 0x0600016D RID: 365 RVA: 0x00017CF6 File Offset: 0x00015EF6 public double MaxY { get { return this.ymax; } } // Token: 0x17000066 RID: 102 // (get) Token: 0x0600016E RID: 366 RVA: 0x00017CFE File Offset: 0x00015EFE public double Width { get { return this.xmax - this.xmin; } } // Token: 0x17000067 RID: 103 // (get) Token: 0x0600016F RID: 367 RVA: 0x00017D0D File Offset: 0x00015F0D public double Height { get { return this.ymax - this.ymin; } } // Token: 0x06000170 RID: 368 RVA: 0x00017D1C File Offset: 0x00015F1C public void Resize(double dx, double dy) { this.xmin -= dx; this.xmax += dx; this.ymin -= dy; this.ymax += dy; } // Token: 0x06000171 RID: 369 RVA: 0x00017D58 File Offset: 0x00015F58 public void Expand(double x, double y) { this.xmin = Math.Min(this.xmin, x); this.ymin = Math.Min(this.ymin, y); this.xmax = Math.Max(this.xmax, x); this.ymax = Math.Max(this.ymax, y); } // Token: 0x06000172 RID: 370 RVA: 0x00017DB0 File Offset: 0x00015FB0 public void Expand(BoundingBox other) { this.xmin = Math.Min(this.xmin, other.xmin); this.ymin = Math.Min(this.ymin, other.ymin); this.xmax = Math.Max(this.xmax, other.xmax); this.ymax = Math.Max(this.ymax, other.ymax); } // Token: 0x06000173 RID: 371 RVA: 0x00017E19 File Offset: 0x00016019 public bool Contains(Point pt) { return pt.x >= this.xmin && pt.x <= this.xmax && pt.y >= this.ymin && pt.y <= this.ymax; } // Token: 0x06000174 RID: 372 RVA: 0x00017E58 File Offset: 0x00016058 public bool Contains(BoundingBox other) { return this.xmin <= other.MinX && other.MaxX <= this.xmax && this.ymin <= other.MinY && other.MaxY <= this.ymax; } // Token: 0x06000175 RID: 373 RVA: 0x00017E97 File Offset: 0x00016097 public bool Intersects(BoundingBox other) { return other.MinX < this.xmax && this.xmin < other.MaxX && other.MinY < this.ymax && this.ymin < other.MaxY; } // Token: 0x040000EE RID: 238 private double xmin; // Token: 0x040000EF RID: 239 private double ymin; // Token: 0x040000F0 RID: 240 private double xmax; // Token: 0x040000F1 RID: 241 private double ymax; } }