public bool Overlaps(Bounds2I bounds) { if (bounds == null || !this.Initialized || !bounds.Initialized) { return(false); } Point2I min = bounds.Min; Point2I max = bounds.Max; return((min.X > this.point2I_1.X || max.X < this.point2I_0.X || min.Y > this.point2I_1.Y ? 1 : (max.Y < this.point2I_0.Y ? 1 : 0)) == 0); }
public override object ConvertFrom( ITypeDescriptorContext context, CultureInfo culture, object value) { if (value.GetType() == typeof(string)) { return((object)Point2I.Parse((string)value)); } return(base.ConvertFrom(context, culture, value)); }
public void Update(Point2I p) { if (this.point2I_0.X > p.X) { this.point2I_0.X = p.X; } if (this.point2I_1.X < p.X) { this.point2I_1.X = p.X; } if (this.point2I_0.Y > p.Y) { this.point2I_0.Y = p.Y; } if (this.point2I_1.Y >= p.Y) { return; } this.point2I_1.Y = p.Y; }
public Vector2I(Point2I from) { this.X = from.X; this.Y = from.Y; }
public Point3I(Point2I point, int z) { this.X = point.X; this.Y = point.Y; this.Z = z; }
public void Reset() { this.point2I_0 = Bounds2I.point2I_2; this.point2I_1 = Bounds2I.point2I_3; }
public Bounds2I(Bounds2I from) { this.point2I_0 = from.point2I_0; this.point2I_1 = from.point2I_1; }
public Bounds2I(Point2I corner1, Point2I corner2) { this.Reset(); this.Update(corner1); this.Update(corner2); }