struct Distance {
typedef Point Query_item;
typedef double FT;
double transformed_distance(const Point& p1, const Point& p2) const {
double distx= p1.x()-p2.x();
double disty= p1.y()-p2.y();
double distz= p1.z()-p2.z();
return distx*distx+disty*disty+distz*distz;
}
double min_distance_to_rectangle(const Point& p,
double distance(0.0), h = p.x();
h=p.y();
h=p.z();
return distance;
}
double min_distance_to_rectangle(const Point& p,
double distance(0.0), h = p.x();
distance += dists[0]*dists[0];
}
distance += dists[0]*dists[0];
}
h=p.y();
distance += dists[1]*dists[1];
}
distance += dists[1]*dists[1];
}
h=p.z();
distance += dists[2]*dists[2];
}
distance += dists[2]*dists[2];
}
return distance;
}
double max_distance_to_rectangle(const Point& p,
double h = p.x();
h=p.y();
h=p.z();
return d0 + d1 + d2;
}
double max_distance_to_rectangle(const Point& p,
double h = p.x();
h=p.y();
h=p.z();
return dists[0] * dists[0] + dists[1] * dists[1] + dists[2] * dists[2];
}
double new_distance(double& dist, double old_off, double new_off,
int ) const {
return dist + new_off*new_off - old_off*old_off;
}
double transformed_distance(double d) const { return d*d; }
double inverse_of_transformed_distance(
double d) {
return std::sqrt(d); }
};