public void Merge(com.epl.geometry.Envelope1D other)
 {
     if (other.IsEmpty())
     {
         return;
     }
     if (IsEmpty())
     {
         vmin = other.vmin;
         vmax = other.vmax;
         return;
     }
     if (vmin > other.vmin)
     {
         vmin = other.vmin;
     }
     if (vmax < other.vmax)
     {
         vmax = other.vmax;
     }
     if (vmin > vmax)
     {
         SetEmpty();
     }
 }
Beispiel #2
0
 public void SetCoords(com.epl.geometry.Envelope1D xinterval, com.epl.geometry.Envelope1D yinterval)
 {
     if (xinterval.IsEmpty() || yinterval.IsEmpty())
     {
         SetEmpty();
         return;
     }
     xmin = xinterval.vmin;
     xmax = xinterval.vmax;
     ymin = yinterval.vmin;
     ymax = yinterval.vmax;
 }
 public void Construct(com.epl.geometry.Envelope1D xinterval, com.epl.geometry.Envelope1D yinterval, com.epl.geometry.Envelope1D zinterval)
 {
     if (xinterval.IsEmpty() || yinterval.IsEmpty())
     {
         SetEmpty();
         return;
     }
     xmin = xinterval.vmin;
     xmax = xinterval.vmax;
     ymin = yinterval.vmin;
     ymax = yinterval.vmax;
     zmin = zinterval.vmin;
     zmax = zinterval.vmax;
 }
 public void Intersect(com.epl.geometry.Envelope1D other)
 {
     if (IsEmpty() || other.IsEmpty())
     {
         SetEmpty();
         return;
     }
     if (vmin < other.vmin)
     {
         vmin = other.vmin;
     }
     if (vmax > other.vmax)
     {
         vmax = other.vmax;
     }
     if (vmin > vmax)
     {
         SetEmpty();
     }
 }
Beispiel #5
0
        public override void ReplaceNaNs(int semantics, double value)
        {
            AddAttribute(semantics);
            if (IsEmpty())
            {
                return;
            }
            int ncomps = com.epl.geometry.VertexDescription.GetComponentCount(semantics);

            for (int i = 0; i < ncomps; i++)
            {
                com.epl.geometry.Envelope1D interval = QueryInterval(semantics, i);
                if (interval.IsEmpty())
                {
                    interval.vmin = value;
                    interval.vmax = value;
                    SetInterval(semantics, i, interval);
                }
            }
        }
 public override bool Equals(object _other)
 {
     if (_other == this)
     {
         return(true);
     }
     if (!(_other is com.epl.geometry.Envelope1D))
     {
         return(false);
     }
     com.epl.geometry.Envelope1D other = (com.epl.geometry.Envelope1D)_other;
     if (IsEmpty() && other.IsEmpty())
     {
         return(true);
     }
     if (vmin != other.vmin || vmax != other.vmax)
     {
         return(false);
     }
     return(true);
 }