Beispiel #1
0
        //public bool isInside(GeoCell cell) {
        //    if (_geoX == int.MinValue) return false;
        //    if (cell.getBlock().getGeoX() != _geoX) return false;
        //    if (cell.getBlock().getGeoY() != _geoY) return false;
        //    if (_infHeight) return true;
        //    //
        //    int height = cell.getHeight();
        //    if (height < _geoZ - _height || height > _geoZ + _height) return false;
        //    return true;
        //}

        public void getAllCellsInside(GeoCell reference, GeoCell[] cells, FastArrayList <GeoCell> store)
        {
            if (_infHeight)
            {
                store.addAll(cells);
            }
            else
            {
                int height;
                int geoZ = reference.getHeight();
                foreach (GeoCell cell in cells)
                {
                    height = cell.getHeight();
                    if (height >= geoZ - _height && height <= geoZ + _height)
                    {
                        store.add(cell);
                    }
                }
            }
        }