#include <CGAL/Shape_detection/Region_growing/Region_growing_on_point_set/Sphere_neighbor_query.h>
Fuzzy sphere neighbors search in a set of Kernel::Point_2
or Kernel::Point_3
.
This class returns all neighbors of a query point, which fall in a sphere of the fixed radius centered at this point.
- Template Parameters
-
- Is Model Of:
NeighborQuery
- Examples:
- Shape_detection/region_growing_lines_on_point_set_2.cpp.
|
typedef GeomTraits::FT | FT |
| Number type.
|
|
|
| Sphere_neighbor_query (const InputRange &input_range, const FT sphere_radius=FT(1), const PointMap point_map=PointMap()) |
| initializes a Kd-tree with input points. More...
|
|
◆ Sphere_neighbor_query()
template<typename GeomTraits , typename InputRange , typename PointMap >
initializes a Kd-tree with input points.
- Parameters
-
input_range | an instance of InputRange with 2D or 3D points |
sphere_radius | the fixed radius of the fuzzy sphere used for searching neighbors of a query point. Default is 1. |
point_map | an instance of PointMap that maps an item from input_range to Kernel::Point_2 or to Kernel::Point_3 |
- Precondition
input_range.size() > 0
-
sphere_radius > 0
◆ operator()()
template<typename GeomTraits , typename InputRange , typename PointMap >
implements NeighborQuery::operator()()
.
This operator finds indices of all points, which fall in a sphere of the fixed radius sphere_radius
centered at the query point with the index query_index
. These neighbors are returned in neighbors
.
- Parameters
-
query_index | index of the query point |
neighbors | indices of points, which are neighbors of the query point |
- Precondition
query_index >= 0 && query_index < input_range.size()