Class

CGAL::Euclidean_distance_sphere_point<Traits>

Definition

The class Euclidean_distance_sphere_point<Traits> provides an implementation of the GeneralDistance concept for the Euclidean distance (l2 metric) between a d-dimensional sphere and a point, and the Euclidean distance between a d-dimensional sphere and a d-dimensional iso-rectangle defined as a k-d tree rectangle.

#include <CGAL/Euclidean_distance_sphere_point.h>

Parameters

Expects for the template argument a model of the concept SearchTraits, for example CGAL::Cartesian_d<double>.

Is Model for the Concepts

GeneralDistance

Types

Traits::FT FT; Number type.

Traits::Point_d Point_d; Point type.

Traits::Sphere_d Sphere_d; Query item type.

Creation

Euclidean_distance_sphere_point<Traits> ed ( Traits t=Traits());
Default constructor.

Operations

NT ed.transformed_distance ( Query_item s, Point_d p) const
Returns the distance between s and p.

NT ed.min_distance_to_rectangle ( Query_item s, Kd_tree_rectangle<FT> r) const
Returns the minimal distance between a point from the sphere s and a point from r.

NT ed.max_distance_to_rectangle ( Query_item s, Kd_tree_rectangle<FT> r) const
Returns the maximal distance between the sphere s and a point from r furthest to s.

NT ed.transformed_distance ( NT d) const
Returns d2.

NT ed.inverse_of_transformed_distance ( NT d) const
Returns d1/2.

See Also

GeneralDistance