#include <KSearchTree.h>
Definition at line 58 of file KSearchTree.h.
double Distance::inverse_of_transformed_distance |
( |
double |
d | ) |
|
|
inline |
template<class TreeTraits >
double Distance::max_distance_to_rectangle |
( |
const MyPoint & |
p, |
|
|
const CGAL::Kd_tree_rectangle< TreeTraits > & |
b |
|
) |
| const |
|
inline |
Definition at line 87 of file KSearchTree.h.
References MyPoint::vec.
91 double d0 = (h >= (b.min_coord(0)+b.max_coord(0))/2.0) ?
92 (h-b.min_coord(0))*(h-b.min_coord(0)) : (b.max_coord(0)-h)*(b.max_coord(0)-h);
95 double d1 = (h >= (b.min_coord(1)+b.max_coord(1))/2.0) ?
96 (h-b.min_coord(1))*(h-b.min_coord(1)) : (b.max_coord(1)-h)*(b.max_coord(1)-h);
99 double d2 = (h >= (b.min_coord(2)+b.max_coord(2))/2.0) ?
100 (h-b.min_coord(2))*(h-b.min_coord(2)) : (b.max_coord(2)-h)*(b.max_coord(2)-h);
template<class TreeTraits >
double Distance::min_distance_to_rectangle |
( |
const MyPoint & |
p, |
|
|
const CGAL::Kd_tree_rectangle< TreeTraits > & |
b |
|
) |
| const |
|
inline |
Definition at line 71 of file KSearchTree.h.
References MyPoint::vec.
74 double distance(0.0), h = p.
vec[0];
75 if (h < b.min_coord(0)) distance += (b.min_coord(0)-h)*(b.min_coord(0)-h);
76 if (h > b.max_coord(0)) distance += (h-b.max_coord(0))*(h-b.max_coord(0));
78 if (h < b.min_coord(1)) distance += (b.min_coord(1)-h)*(b.min_coord(1)-h);
79 if (h > b.max_coord(1)) distance += (h-b.max_coord(1))*(h-b.min_coord(1));
81 if (h < b.min_coord(2)) distance += (b.min_coord(2)-h)*(b.min_coord(2)-h);
82 if (h > b.max_coord(2)) distance += (h-b.max_coord(2))*(h-b.max_coord(2));
double Distance::new_distance |
( |
double & |
dist, |
|
|
double |
old_off, |
|
|
double |
new_off, |
|
|
int |
|
|
) |
| const |
|
inline |
Definition at line 104 of file KSearchTree.h.
106 return dist + new_off*new_off - old_off*old_off;
double Distance::transformed_distance |
( |
const MyPoint & |
p1, |
|
|
const MyPoint & |
p2 |
|
) |
| const |
|
inline |
Definition at line 62 of file KSearchTree.h.
References MyPoint::vec.
64 double distx= p1.
vec[0]-p2.
vec[0];
65 double disty= p1.
vec[1]-p2.
vec[1];
66 double distz= p1.
vec[2]-p2.
vec[2];
67 return distx*distx+disty*disty+distz*distz;
double Distance::transformed_distance |
( |
double |
d | ) |
const |
|
inline |
The documentation for this struct was generated from the following file: