CGAL 5.5.3 - Spatial Sorting
|
#include <CGAL/Hilbert_sort_on_sphere_3.h>
The function object Hilbert_sort_on_sphere_3
sorts iterator ranges of Traits::Point_3
along a Hilbert curve on a given sphere.
Actually, it approximates a Hilbert curve on that sphere by a Hilbert curve on a certain cube. For each face of that cube, it calls an appropriate version of Hilbert_sort_2
which sorts a subset of the iterator range. Hilbert_sort_2
in each face is called with the median or the middle policy depending on the PolicyTag
. The input points are supposed to be close to the input sphere. If input points are not close to the input sphere, this function still works, but it might not be a good sorting function.
Traits | must be a model for SpatialSortingTraits_3 . |
PolicyTag | is used to specify the strategy policy. Possible values are Hilbert_sort_median_policy (the default policy) or Hilbert_sort_middle_policy . |
Creation | |
Hilbert_sort_on_sphere_3 (const Traits &traits=Traits(), double sq_r=1.0, const Traits::Point_3 &p=Traits::Point_3(0, 0, 0)) | |
constructs an instance with traits as traits class instance, sq_r as the squared_radius of the given sphere, and p as the center of the given sphere. More... | |
Operations | |
template<class InputPointIterator > | |
void | operator() (InputPointIterator begin, InputPointIterator end) const |
It sorts the range [begin, end) along a hilbert curve on the sphere centered at p with squared radius sq_r ; these arguments are passed in the construction of the object Hilbert_sort_on_sphere_3 . More... | |
CGAL::Hilbert_sort_on_sphere_3< Traits, PolicyTag >::Hilbert_sort_on_sphere_3 | ( | const Traits & | traits = Traits() , |
double | sq_r = 1.0 , |
||
const Traits::Point_3 & | p = Traits::Point_3(0, 0, 0) |
||
) |
constructs an instance with traits
as traits class instance, sq_r
as the squared_radius of the given sphere, and p
as the center of the given sphere.
void CGAL::Hilbert_sort_on_sphere_3< Traits, PolicyTag >::operator() | ( | InputPointIterator | begin, |
InputPointIterator | end | ||
) | const |
It sorts the range [begin, end)
along a hilbert curve on the sphere centered at p
with squared radius sq_r
; these arguments are passed in the construction of the object Hilbert_sort_on_sphere_3
.
InputPointIterator | must be a model of RandomAccessIterator with value type Traits::Point_3 . |