示例#1
0
        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);
        }
示例#2
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;
 }
示例#3
0
文件: Point3LR.cs 项目: 15831944/WW
 public Point3LR(Point2LR point, LongRational z)
 {
     this.X = point.X;
     this.Y = point.Y;
     this.Z = z;
 }
示例#4
0
文件: Matrix2LR.cs 项目: 15831944/WW
 public Point2LR Transform(Point2LR point)
 {
     return(new Point2LR(this.M00 * point.X + this.M01 * point.Y, this.M10 * point.X + this.M11 * point.Y));
 }
示例#5
0
 public void Reset()
 {
     this.point2LR_0 = Bounds2LR.point2LR_2;
     this.point2LR_1 = Bounds2LR.point2LR_3;
 }
示例#6
0
 public Bounds2LR(Bounds2LR from)
 {
     this.point2LR_0 = from.point2LR_0;
     this.point2LR_1 = from.point2LR_1;
 }
示例#7
0
 public Bounds2LR(Point2LR corner1, Point2LR corner2)
 {
     this.Reset();
     this.Update(corner1);
     this.Update(corner2);
 }