示例#1
0
 public Region FindFirst(RGNH header)
 {
     foreach (var rng in List.Values)
     {
         if (header.KeyLo <= rng.Header.KeyHi && rng.Header.KeyLo <= header.KeyHi &&
             header.VelLo <= rng.Header.VelHi && rng.Header.VelLo <= header.VelHi)
         {
             return(rng);
         }
     }
     return(null);
 }
示例#2
0
 public bool ContainsKey(RGNH header)
 {
     foreach (var rng in List.Values)
     {
         if (header.KeyLo <= rng.Header.KeyHi && rng.Header.KeyLo <= header.KeyHi &&
             header.VelLo <= rng.Header.VelHi && rng.Header.VelLo <= header.VelHi)
         {
             return(true);
         }
     }
     return(false);
 }
示例#3
0
        public List <Region> Find(RGNH header)
        {
            var ret = new List <Region>();

            foreach (var rng in List.Values)
            {
                if (header.KeyLo <= rng.Header.KeyHi && rng.Header.KeyLo <= header.KeyHi &&
                    header.VelLo <= rng.Header.VelHi && rng.Header.VelLo <= header.VelHi)
                {
                    ret.Add(rng);
                }
            }
            return(ret);
        }
示例#4
0
        public void Remove(RGNH header)
        {
            var tmpRegion = new List <Region>();

            foreach (var rng in List.Values)
            {
                if (header.KeyLo <= rng.Header.KeyHi && rng.Header.KeyLo <= header.KeyHi &&
                    header.VelLo <= rng.Header.VelHi && rng.Header.VelLo <= header.VelHi)
                {
                }
                else
                {
                    tmpRegion.Add(rng);
                }
            }
            List.Clear();
            foreach (var rgn in tmpRegion)
            {
                List.Add(rgn.Header, rgn);
            }
        }