예제 #1
0
        public override bool Equals(System.Object o)
        {
            RectangleFP r = (RectangleFP)o;

            if (r == null)
            {
                return(false);
            }
            else
            {
                return(r.ff_xmax == ff_xmax && r.ff_xmin == ff_xmin && r.ff_ymax == ff_ymax && r.ff_ymin == ff_ymin);
            }
        }
예제 #2
0
 public virtual RectangleFP Union(RectangleFP r)
 {
     if (!r.IsEmpty())
     {
         if (IsEmpty())
         {
             Reset(r);
         }
         else
         {
             Reset(MathFP.Min(ff_xmin, r.ff_xmin), MathFP.Max(ff_xmax, r.ff_xmax), MathFP.Min(ff_ymin, r.ff_ymin), MathFP.Max(ff_ymax, r.ff_ymax));
         }
     }
     return(this);
 }
예제 #3
0
 public virtual bool IntersectsWith(RectangleFP r)
 {
     return(ff_xmin <= r.ff_xmax && r.ff_xmin <= ff_xmax && ff_ymin <= r.ff_ymax && r.ff_ymin <= ff_ymax);
 }
예제 #4
0
 public virtual RectangleFP Reset(RectangleFP r)
 {
     return(Reset(r.ff_xmin, r.ff_ymin, r.ff_xmax, r.ff_ymax));
 }
예제 #5
0
 public RectangleFP(RectangleFP r)
 {
     Reset(r);
 }