mirror of https://github.com/CGAL/cgal
*** empty log message ***
This commit is contained in:
parent
f48541b608
commit
8ba28d9127
|
|
@ -38,6 +38,7 @@ for example \ccc{CGAL::Cartesian<double>} or \ccc{CGAL::Simple_cartesian<CGAL::G
|
|||
|
||||
\ccTypedef {Kernel::Point_2 Point_d;}{Point type.}
|
||||
\ccTypedef {Kernel::Iso_rectangle_2 Iso_box_d;}{Iso box type.}
|
||||
\ccTypedef {Kernel::Sphere_2 Sphere_d;}{Sphere type.}
|
||||
|
||||
\ccTypedef {Kernel::Cartesian_const_iterator_2 Cartesian_const_iterator_d;}{An iterator over the Cartesian coordinates.}
|
||||
|
||||
|
|
@ -49,6 +50,15 @@ has as argument a \ccc{Point_d} and an \ccc{int}.}
|
|||
\ccTypedef {Kernel::Construct_iso_rectangle_2 Construct_iso_box_d;}{Functor with operator to construct
|
||||
the iso box from two points.}
|
||||
|
||||
\ccTypedef {Kernel::Construct_center_2 Construct_center_d;}{Functor with operator to construct
|
||||
the center of an object of type \ccc{Sphere_d}.}
|
||||
|
||||
\ccTypedef {Kernel::Compute_squared_radius_2 Construct_squared_radius_d;}{Functor with operator to compute
|
||||
the squared radius of a an object of type \ccc{Sphere_d}.}
|
||||
|
||||
\ccTypedef {Kernel::Construct_vertex_2 Construct_vertex_d;}{Functor with operator to construct
|
||||
the vertices with index $0$ and $3$ of an object of type \ccc{Iso_box_d}.}
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccc{Search_traits_3<Kernel>}\\
|
||||
|
|
|
|||
|
|
@ -37,7 +37,8 @@ for example \ccc{CGAL::Cartesian<double>} or \ccc{CGAL::Simple_cartesian<CGAL::G
|
|||
\ccTypedef{Kernel::FT FT;}{Number type.}
|
||||
|
||||
\ccTypedef {Kernel::Point_3 Point_d;}{Point type.}
|
||||
\ccTypedef {Kernel::Iso_rectangle_2 Iso_box_d;}{Iso box type.}
|
||||
\ccTypedef {Kernel::Iso_cuboid_3 Iso_box_d;}{Iso box type.}
|
||||
\ccTypedef {Kernel::Sphere_3 Sphere_d;}{Sphere type.}
|
||||
|
||||
\ccTypedef {Kernel::Cartesian_const_iterator_3 Cartesian_const_iterator_d;}{An iterator over the Cartesian
|
||||
coordinates.}
|
||||
|
|
@ -51,6 +52,15 @@ has as argument a \ccc{Point_d} and an \ccc{int}.}
|
|||
\ccTypedef {Kernel::Construct_iso_cuboid_3 Construct_iso_box_d;}{Functor with operator to construct
|
||||
the iso box from two points.}
|
||||
|
||||
\ccTypedef {Kernel::Construct_center_3 Construct_center_d;}{Functor with operator to construct
|
||||
the center of an object of type \ccc{Sphere_d}.}
|
||||
|
||||
\ccTypedef {Kernel::Compute_squared_radius_3 Construct_squared_radius_d;}{Functor with operator to compute
|
||||
the squared radius of a an object of type \ccc{Sphere_d}.}
|
||||
|
||||
\ccTypedef {Kernel::Construct_vertex_3 Construct_vertex_d;}{Functor with operator to construct
|
||||
the vertices with index $0$ and $7$ of an object of type \ccc{Iso_box_d}.}
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccc{Search_traits_2<Kernel>}\\
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ specialized for the point type.
|
|||
\ccTypes
|
||||
\ccNestedType{Point_d}{Point type.}
|
||||
\ccNestedType{Iso_box_d}{Iso box type.}
|
||||
\ccNestedType{Sphere_d}{Sphere type.}
|
||||
|
||||
\ccNestedType{FT}{The number type of the \ccHtmlNoLinksFrom{Cartesian} coordinates of type \ccc{Point_d}.}
|
||||
|
||||
|
|
@ -39,7 +40,14 @@ first and the past-the-end iterator for the \ccHtmlNoLinksFrom{Cartesian} coordi
|
|||
|
||||
\ccNestedType{Construct_iso_box_d}{Functor with operator to construct the iso box from two points.}
|
||||
|
||||
\ccCreationVariable{p} %% choose variable name
|
||||
\ccNestedType {Construct_center_d;}{Functor with operator to construct
|
||||
the center of an object of type \ccc{Sphere_d}.}
|
||||
|
||||
\ccNestedType {Construct_squared_radius_d;}{Functor with operator to compute
|
||||
the squared radius of a an object of type \ccc{Sphere_d}.}
|
||||
|
||||
\ccNestedType {Construct_vertex_d;}{Functor with operator to construct
|
||||
the vertices with index $0$ and $2^d-1$ of an object of type \ccc{Iso_box_d}.}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ for example \ccc{CGAL::Cartesian<double>} or \ccc{CGAL::Simple_cartesian<CGAL::G
|
|||
|
||||
\ccTypedef {Kernel::Point_2 Point_d;}{Point type.}
|
||||
\ccTypedef {Kernel::Iso_rectangle_2 Iso_box_d;}{Iso box type.}
|
||||
\ccTypedef {Kernel::Sphere_2 Sphere_d;}{Sphere type.}
|
||||
|
||||
\ccTypedef {Kernel::Cartesian_const_iterator_2 Cartesian_const_iterator_d;}{An iterator over the Cartesian coordinates.}
|
||||
|
||||
|
|
@ -49,6 +50,15 @@ has as argument a \ccc{Point_d} and an \ccc{int}.}
|
|||
\ccTypedef {Kernel::Construct_iso_rectangle_2 Construct_iso_box_d;}{Functor with operator to construct
|
||||
the iso box from two points.}
|
||||
|
||||
\ccTypedef {Kernel::Construct_center_2 Construct_center_d;}{Functor with operator to construct
|
||||
the center of an object of type \ccc{Sphere_d}.}
|
||||
|
||||
\ccTypedef {Kernel::Compute_squared_radius_2 Construct_squared_radius_d;}{Functor with operator to compute
|
||||
the squared radius of a an object of type \ccc{Sphere_d}.}
|
||||
|
||||
\ccTypedef {Kernel::Construct_vertex_2 Construct_vertex_d;}{Functor with operator to construct
|
||||
the vertices with index $0$ and $3$ of an object of type \ccc{Iso_box_d}.}
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccc{Search_traits_3<Kernel>}\\
|
||||
|
|
|
|||
|
|
@ -37,7 +37,8 @@ for example \ccc{CGAL::Cartesian<double>} or \ccc{CGAL::Simple_cartesian<CGAL::G
|
|||
\ccTypedef{Kernel::FT FT;}{Number type.}
|
||||
|
||||
\ccTypedef {Kernel::Point_3 Point_d;}{Point type.}
|
||||
\ccTypedef {Kernel::Iso_rectangle_2 Iso_box_d;}{Iso box type.}
|
||||
\ccTypedef {Kernel::Iso_cuboid_3 Iso_box_d;}{Iso box type.}
|
||||
\ccTypedef {Kernel::Sphere_3 Sphere_d;}{Sphere type.}
|
||||
|
||||
\ccTypedef {Kernel::Cartesian_const_iterator_3 Cartesian_const_iterator_d;}{An iterator over the Cartesian
|
||||
coordinates.}
|
||||
|
|
@ -51,6 +52,15 @@ has as argument a \ccc{Point_d} and an \ccc{int}.}
|
|||
\ccTypedef {Kernel::Construct_iso_cuboid_3 Construct_iso_box_d;}{Functor with operator to construct
|
||||
the iso box from two points.}
|
||||
|
||||
\ccTypedef {Kernel::Construct_center_3 Construct_center_d;}{Functor with operator to construct
|
||||
the center of an object of type \ccc{Sphere_d}.}
|
||||
|
||||
\ccTypedef {Kernel::Compute_squared_radius_3 Construct_squared_radius_d;}{Functor with operator to compute
|
||||
the squared radius of a an object of type \ccc{Sphere_d}.}
|
||||
|
||||
\ccTypedef {Kernel::Construct_vertex_3 Construct_vertex_d;}{Functor with operator to construct
|
||||
the vertices with index $0$ and $7$ of an object of type \ccc{Iso_box_d}.}
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccc{Search_traits_2<Kernel>}\\
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ specialized for the point type.
|
|||
\ccTypes
|
||||
\ccNestedType{Point_d}{Point type.}
|
||||
\ccNestedType{Iso_box_d}{Iso box type.}
|
||||
\ccNestedType{Sphere_d}{Sphere type.}
|
||||
|
||||
\ccNestedType{FT}{The number type of the \ccHtmlNoLinksFrom{Cartesian} coordinates of type \ccc{Point_d}.}
|
||||
|
||||
|
|
@ -39,7 +40,14 @@ first and the past-the-end iterator for the \ccHtmlNoLinksFrom{Cartesian} coordi
|
|||
|
||||
\ccNestedType{Construct_iso_box_d}{Functor with operator to construct the iso box from two points.}
|
||||
|
||||
\ccCreationVariable{p} %% choose variable name
|
||||
\ccNestedType {Construct_center_d;}{Functor with operator to construct
|
||||
the center of an object of type \ccc{Sphere_d}.}
|
||||
|
||||
\ccNestedType {Construct_squared_radius_d;}{Functor with operator to compute
|
||||
the squared radius of a an object of type \ccc{Sphere_d}.}
|
||||
|
||||
\ccNestedType {Construct_vertex_d;}{Functor with operator to construct
|
||||
the vertices with index $0$ and $2^d-1$ of an object of type \ccc{Iso_box_d}.}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -37,10 +37,14 @@ namespace CGAL {
|
|||
typedef typename SearchTraits::Point_d Point_d;
|
||||
typedef typename SearchTraits::Iso_box_d Iso_box_d;
|
||||
typedef typename SearchTraits::FT FT;
|
||||
|
||||
typedef typename SearchTraits::Construct_vertex_d Construct_vertex_d;
|
||||
typedef typename SearchTraits::Cartesian_const_iterator_d Cartesian_const_iterator_d;
|
||||
typedef typename SearchTraits::Construct_cartesian_const_iterator_d Construct_cartesian_const_iterator_d;
|
||||
|
||||
private:
|
||||
|
||||
Iso_box_d box;
|
||||
Point_d min, max;
|
||||
Cartesian_const_iterator_d min_begin, max_begin;
|
||||
FT eps;
|
||||
unsigned int dim;
|
||||
|
||||
|
|
@ -53,36 +57,46 @@ namespace CGAL {
|
|||
Fuzzy_iso_box(const Point_d& p, const Point_d& q, FT epsilon=FT(0))
|
||||
: eps(epsilon)
|
||||
{
|
||||
typename SearchTraits::Construct_cartesian_const_iterator_d construct_it;
|
||||
typename SearchTraits::Cartesian_const_iterator_d begin = construct_it(p),
|
||||
Construct_cartesian_const_iterator_d construct_it;
|
||||
Cartesian_const_iterator_d begin = construct_it(p),
|
||||
end = construct_it(p,1);
|
||||
dim = end - begin;
|
||||
box = SearchTraits::Construct_iso_box_d()(p,q);
|
||||
|
||||
Iso_box_d box = SearchTraits::Construct_iso_box_d()(p,q);
|
||||
Construct_vertex_d construct_vertex_d;
|
||||
min = construct_vertex_d(box, 0);
|
||||
max = construct_vertex_d(box, (1<<dim)-1);
|
||||
min_begin = construct_it(min);
|
||||
max_begin = construct_it(max);
|
||||
|
||||
}
|
||||
|
||||
|
||||
bool contains(const Point_d& p) const {
|
||||
typename SearchTraits::Construct_cartesian_const_iterator_d construct_it;
|
||||
typename SearchTraits::Cartesian_const_iterator_d pit = construct_it(p);
|
||||
for (unsigned int i = 0; i < dim; ++i, ++pit) {
|
||||
if ( ((*pit) < box.min()[i]) || ((*pit) >= box.max()[i]) ) return false;
|
||||
Construct_cartesian_const_iterator_d construct_it;
|
||||
Cartesian_const_iterator_d pit = construct_it(p);
|
||||
Cartesian_const_iterator_d minit= min_begin, maxit = max_begin;
|
||||
for (unsigned int i = 0; i < dim; ++i, ++pit, ++minit, ++maxit) {
|
||||
if ( ((*pit) < (*minit)) || ((*pit) >= (*maxit)) ) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool inner_range_intersects(const Kd_tree_rectangle<SearchTraits>& rectangle) const {
|
||||
for (unsigned int i = 0; i < dim; ++i) {
|
||||
if ( (box.max()[i]-eps < rectangle.min_coord(i))
|
||||
|| (box.min()[i]+eps >= rectangle.max_coord(i)) ) return false;
|
||||
bool inner_range_intersects(const Kd_tree_rectangle<SearchTraits>& rectangle) const {
|
||||
Cartesian_const_iterator_d minit= min_begin, maxit = max_begin;
|
||||
for (unsigned int i = 0; i < dim; ++i, ++minit, ++maxit) {
|
||||
if ( ((*maxit)-eps < rectangle.min_coord(i))
|
||||
|| ((*minit)+eps >= rectangle.max_coord(i)) ) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool outer_range_is_contained_by(const Kd_tree_rectangle<SearchTraits>& rectangle) const {
|
||||
for (unsigned int i = 0; i < dim; ++i) {
|
||||
if ( (box.max()[i]+eps < rectangle.max_coord(i) )
|
||||
|| (box.min()[i]-eps >= rectangle.min_coord(i)) ) return false;
|
||||
bool outer_range_is_contained_by(const Kd_tree_rectangle<SearchTraits>& rectangle) const {
|
||||
Cartesian_const_iterator_d minit= min_begin, maxit = max_begin;
|
||||
for (unsigned int i = 0; i < dim; ++i, ++minit, ++maxit) {
|
||||
if ( ((*maxit)+eps < rectangle.max_coord(i) )
|
||||
|| ((*minit)-eps >= rectangle.min_coord(i)) ) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ namespace CGAL {
|
|||
typedef typename K::Cartesian_const_iterator_2 Cartesian_const_iterator_d;
|
||||
typedef typename K::Construct_cartesian_const_iterator_2 Construct_cartesian_const_iterator_d;
|
||||
|
||||
typedef typename K::Construct_vertex_2 Construct_vertex_d;
|
||||
typedef typename K::Construct_center_2 Construct_center_d;
|
||||
typedef typename K::Compute_squared_radius_2 Compute_squared_radius_d;
|
||||
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ namespace CGAL {
|
|||
typedef typename K::Sphere_3 Sphere_d;
|
||||
typedef typename K::Construct_iso_cuboid_3 Construct_iso_box_d;
|
||||
|
||||
typedef typename K::Construct_vertex_3 Construct_vertex_d;
|
||||
typedef typename K::Construct_center_3 Construct_center_d;
|
||||
typedef typename K::Compute_squared_radius_3 Compute_squared_radius_d;
|
||||
typedef typename K::FT FT;
|
||||
|
|
|
|||
Loading…
Reference in New Issue