public bool Overlaps(Bounds2LR bounds) { if (bounds == null || !this.Initialized || !bounds.Initialized) { return(false); } Point2LR min = bounds.Min; Point2LR max = bounds.Max; return((min.X > this.point2LR_1.X || max.X < this.point2LR_0.X || min.Y > this.point2LR_1.Y ? 1 : (max.Y < this.point2LR_0.Y ? 1 : 0)) == 0); }
public void Update(Point2LR p) { if (this.point2LR_0.X > p.X) { this.point2LR_0.X = p.X; } if (this.point2LR_1.X < p.X) { this.point2LR_1.X = p.X; } if (this.point2LR_0.Y > p.Y) { this.point2LR_0.Y = p.Y; } if (!(this.point2LR_1.Y < p.Y)) { return; } this.point2LR_1.Y = p.Y; }
public Point3LR(Point2LR point, LongRational z) { this.X = point.X; this.Y = point.Y; this.Z = z; }
public Point2LR Transform(Point2LR point) { return(new Point2LR(this.M00 * point.X + this.M01 * point.Y, this.M10 * point.X + this.M11 * point.Y)); }
public void Reset() { this.point2LR_0 = Bounds2LR.point2LR_2; this.point2LR_1 = Bounds2LR.point2LR_3; }
public Bounds2LR(Bounds2LR from) { this.point2LR_0 = from.point2LR_0; this.point2LR_1 = from.point2LR_1; }
public Bounds2LR(Point2LR corner1, Point2LR corner2) { this.Reset(); this.Update(corner1); this.Update(corner2); }