Ejemplo n.º 1
0
        public bool Overlaps(Bounds2BR bounds)
        {
            if (bounds == null || !this.Initialized || !bounds.Initialized)
            {
                return(false);
            }
            Point2BR min = bounds.Min;
            Point2BR max = bounds.Max;

            return((min.X > this.point2BR_1.X || max.X < this.point2BR_0.X || min.Y > this.point2BR_1.Y ? 1 : (max.Y < this.point2BR_0.Y ? 1 : 0)) == 0);
        }
Ejemplo n.º 2
0
 public void Update(Point2BR p)
 {
     if (this.point2BR_0.X > p.X)
     {
         this.point2BR_0.X = p.X;
     }
     if (this.point2BR_1.X < p.X)
     {
         this.point2BR_1.X = p.X;
     }
     if (this.point2BR_0.Y > p.Y)
     {
         this.point2BR_0.Y = p.Y;
     }
     if (!(this.point2BR_1.Y < p.Y))
     {
         return;
     }
     this.point2BR_1.Y = p.Y;
 }
Ejemplo n.º 3
0
 public void Reset()
 {
     this.point2BR_0 = Bounds2BR.point2BR_2;
     this.point2BR_1 = Bounds2BR.point2BR_3;
 }
Ejemplo n.º 4
0
 public Bounds2BR(Bounds2BR from)
 {
     this.point2BR_0 = from.point2BR_0;
     this.point2BR_1 = from.point2BR_1;
 }
Ejemplo n.º 5
0
 public Bounds2BR(Point2BR corner1, Point2BR corner2)
 {
     this.Reset();
     this.Update(corner1);
     this.Update(corner2);
 }
Ejemplo n.º 6
0
 public Point2BR Transform(Point2BR point)
 {
     return(new Point2BR(this.M00 * point.X + this.M01 * point.Y + this.M02, this.M10 * point.X + this.M11 * point.Y + this.M12));
 }
Ejemplo n.º 7
0
 public Point3BR(Point2BR point, BigRational z)
 {
     this.X = point.X;
     this.Y = point.Y;
     this.Z = z;
 }