예제 #1
0
파일: CellFilter.cs 프로젝트: xiaoyj/Space
 private PredictionBound GetBoundOfSector(AntConfig antConfig, double siteX, double siteY, float radius)
 {
     PredictionBound bound = new PredictionBound();
     bound.Left = (siteX + antConfig.DX) - radius;
     bound.Right = (siteX + antConfig.DX) + radius;
     bound.Top = (siteY + antConfig.DY) + radius;
     bound.Bottom = (siteY + antConfig.DY) - radius;
     return bound;
 }
예제 #2
0
파일: CellFilter.cs 프로젝트: xiaoyj/Space
 public PredictionBound GetBoundOfPolygon(GeoPolygonRegion polygon, float resolution)
 {
     PredictionBound bound = new PredictionBound();
     bound.Left = polygon.Left;
     bound.Right = polygon.Right;
     bound.Bottom = polygon.Bottom;
     bound.Top = polygon.Top;
     this.GetBoundary(resolution, ref bound.Left, ref bound.Right, ref bound.Bottom, ref bound.Top);
     return bound;
 }
예제 #3
0
파일: CellFilter.cs 프로젝트: xiaoyj/Space
 public bool IsTranceiverInCalcZone(PredictionBound polygonRegionBound, Transceiver tranc)
 {
     double x = tranc.Parent.X;
     double y = tranc.Parent.Y;
     foreach (IACell cell in tranc.Cells)
     {
         float maxCalcRadius = this.GetMaxCalcRadius(cell);
         foreach (AntConfig config in tranc.AntConfiguration)
         {
             PredictionBound sectorBound = this.GetBoundOfSector(config, x, y, maxCalcRadius);
             if (this.IsSectorInCalcZone(sectorBound, polygonRegionBound))
             {
                 return true;
             }
         }
     }
     return false;
 }
예제 #4
0
파일: CellFilter.cs 프로젝트: xiaoyj/Space
 private bool IsSectorInCalcZone(PredictionBound sectorBound, PredictionBound polygonRegionBound)
 {
     bool flag = (((sectorBound.Left >= polygonRegionBound.Right) || (sectorBound.Right <= polygonRegionBound.Left)) || (sectorBound.Bottom >= polygonRegionBound.Top)) || (sectorBound.Top <= polygonRegionBound.Bottom);
     return !flag;
 }