CGAL 4.10.2 - dD Spatial Searching
|
#include <CGAL/Fuzzy_sphere.h>
The class Fuzzy_sphere
implements fuzzy d
-dimensional spheres.
A fuzzy sphere with radius \( r\) and fuzziness value \( \epsilon\) has as inner approximation a sphere with radius \( r-\epsilon\) and as outer approximation a sphere with radius \( r+\epsilon\).
Fuzzy_sphere
is specified by a parameter \( \epsilon\) denoting a maximal allowed distance to the boundary of a sphere. If the distance to the boundary is greater than \( \epsilon\), points inside the object are always reported and points outside the sphere are never reported. Points whose distance to the boundary is less than or equal to \( \epsilon\) may or may not be reported. Subsequently, points on the inner and outer spheres may or may not be reported. Specifically when \( \epsilon = 0\), points on the sphere of radius \( r\) may or may not be reported.Traits | must be a model of the concept SearchTraits , for example CGAL::Cartesian_d<double> . |
FuzzyQueryItem
Types | |
typedef unspecified_type | D |
Dimension Tag. | |
typedef Traits::Point_d | Point_d |
Point type. | |
typedef Traits::FT | FT |
Number type. | |
Creation | |
Fuzzy_sphere (Point_d center, FT radius, FT epsilon=FT(0), Traits t=Traits()) | |
Construct a fuzzy sphere centered at center with radius radius and fuzziness value epsilon . | |
Fuzzy_sphere (Traits::Base::Point_d center, FT radius, FT epsilon=FT(0), Traits t=Traits()) | |
Construct a fuzzy sphere centered at center with radius radius and fuzziness value epsilon . More... | |
Operations | |
bool | contains (const Point_d &p) const |
Test whether the fuzzy sphere contains p . More... | |
bool | inner_range_intersects (const Kd_tree_rectangle< FT, D > &rectangle) const |
Test whether the inner sphere intersects the rectangle associated with a node of a tree. More... | |
bool | outer_range_contains (const Kd_tree_rectangle< FT, D > &rectangle) const |
Test whether the outer sphere encloses the rectangle associated with a node of a tree. More... | |
CGAL::Fuzzy_sphere< Traits >::Fuzzy_sphere | ( | Traits::Base::Point_d | center, |
FT | radius, | ||
FT | epsilon = FT(0) , |
||
Traits | t = Traits() |
||
) |
Construct a fuzzy sphere centered at center
with radius radius
and fuzziness value epsilon
.
Traits
is Search_traits_adapter<Key,PointPropertyMap,BaseTraits>
. bool CGAL::Fuzzy_sphere< Traits >::contains | ( | const Point_d & | p) | const |
Test whether the fuzzy sphere contains p
.
That is, whether the distance between the center of the fuzzy sphere and p
is less than \( r\).
bool CGAL::Fuzzy_sphere< Traits >::inner_range_intersects | ( | const Kd_tree_rectangle< FT, D > & | rectangle) | const |
Test whether the inner sphere intersects the rectangle associated with a node of a tree.
That is, whether the minimal distance between the center of the fuzzy sphere and rectangle
is less than \( r-\epsilon\).
bool CGAL::Fuzzy_sphere< Traits >::outer_range_contains | ( | const Kd_tree_rectangle< FT, D > & | rectangle) | const |
Test whether the outer sphere encloses the rectangle associated with a node of a tree.
That is, whether the maximal distance between the center of the fuzzy sphere and rectangle
is less than \( r+\epsilon\).