Have squared_distance(Point_3, Point_3) call its functor.
This commit is contained in:
@@ -212,7 +212,8 @@ namespace CommonKernelFunctors {
|
||||
template <typename K>
|
||||
class Compute_squared_distance_3
|
||||
{
|
||||
typedef typename K::FT FT;
|
||||
typedef typename K::FT FT;
|
||||
typedef typename K::Point_3 Point_3;
|
||||
public:
|
||||
typedef FT result_type;
|
||||
typedef Arity_tag< 2 > Arity;
|
||||
@@ -222,6 +223,14 @@ namespace CommonKernelFunctors {
|
||||
FT
|
||||
operator()( const T1& t1, const T2& t2) const
|
||||
{ return CGALi::squared_distance(t1, t2, K()); }
|
||||
|
||||
FT
|
||||
operator()( const Point_3& pt1, const Point_3& pt2) const
|
||||
{
|
||||
typedef typename K::Vector_3 Vector_3;
|
||||
Vector_3 vec = pt2 - pt1;
|
||||
return vec*vec;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename K>
|
||||
|
||||
Reference in New Issue
Block a user