private void searchEdgeWithMaximumRadiusAngle(rtree rt, Point p, HashSet <Edge> cands, double radius, double step, int leastNum, double max_radius, double angle) { double xmin, ymin, xmax, ymax; ymin = p.Y - radius; ymax = p.Y + radius; xmin = p.X - radius; xmax = p.X + radius; double current_radius = radius; while (cands.Count < leastNum && current_radius <= max_radius) { MBR rect = new MBR(xmin, ymin, xmax, ymax); rt.search(rect, cands, p, angle); ymin = ymin - step; ymax = ymax + step; xmin = xmin - step; xmax = xmax + step; current_radius += step; } }
private void searchEdgeWithinRadiusOneStep(rtree rt, Point p, HashSet <Edge> cands, double radius) { double xmin, ymin, xmax, ymax; ymin = p.Y - radius; ymax = p.Y + radius; xmin = p.X - radius; xmax = p.X + radius; MBR rect = new MBR(xmin, ymin, xmax, ymax); rt.search(rect, cands); }