\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.7 - dD Spatial Searching
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
CGAL::Fuzzy_sphere< Traits > Class Template Reference

#include <CGAL/Fuzzy_sphere.h>

Definition

The class Fuzzy_sphere implements fuzzy d-dimensional spheres.

A fuzzy sphere with radius \( r\) and fuzziness value \( \epsilon\) has as outer approximation a sphere with radius \( r+\epsilon\) and as inner approximation a sphere with radius \( r-\epsilon\).

Template Parameters
Traitsmust be a model of the concept SearchTraits, for example CGAL::Cartesian_d<double>.
Is Model Of:
FuzzyQueryItem
See also
FuzzyQueryItem
Examples:
Spatial_searching/circular_query.cpp, Spatial_searching/fuzzy_range_query.cpp, and Spatial_searching/searching_with_circular_query.cpp.

Types

typedef unspecified_type D
 Dimension Tag. More...
 
typedef Traits::Point_d Point_d
 Point type. More...
 
typedef Traits::FT FT
 Number type. More...
 

Creation

 Fuzzy_sphere (Point_d center, FT radius, FT epsilon=FT(0), Traits t=Traits())
 Constructs a fuzzy sphere centered at center with radius radius and fuzziness value epsilon. More...
 
 Fuzzy_sphere (Traits::Base::Point_d center, FT radius, FT epsilon=FT(0), Traits t=Traits())
 Constructs 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...
 

Member Typedef Documentation

template<typename Traits >
typedef unspecified_type CGAL::Fuzzy_sphere< Traits >::D

Dimension Tag.

template<typename Traits >
typedef Traits::FT CGAL::Fuzzy_sphere< Traits >::FT

Number type.

template<typename Traits >
typedef Traits::Point_d CGAL::Fuzzy_sphere< Traits >::Point_d

Point type.

Constructor & Destructor Documentation

template<typename Traits >
CGAL::Fuzzy_sphere< Traits >::Fuzzy_sphere ( Point_d  center,
FT  radius,
FT  epsilon = FT(0),
Traits  t = Traits() 
)

Constructs a fuzzy sphere centered at center with radius radius and fuzziness value epsilon.

template<typename Traits >
CGAL::Fuzzy_sphere< Traits >::Fuzzy_sphere ( Traits::Base::Point_d  center,
FT  radius,
FT  epsilon = FT(0),
Traits  t = Traits() 
)

Constructs a fuzzy sphere centered at center with radius radius and fuzziness value epsilon.

Attention
Only available in case Traits is Search_traits_adapter<Key,PointPropertyMap,BaseTraits>.

Member Function Documentation

template<typename Traits >
bool CGAL::Fuzzy_sphere< Traits >::contains ( const Point_d p) const

test whether the fuzzy sphere contains p.

template<typename Traits >
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.

template<typename Traits >
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.