mirror of https://github.com/CGAL/cgal
BUG-FIX: Compute_squared_radius_2 should not be Compute_squared_radius_3 in projection traits
This commit is contained in:
parent
e1650a8c65
commit
5eace40fa1
|
|
@ -326,6 +326,37 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
template <class R, int dim>
|
||||
class Compute_squared_radius_projected
|
||||
{
|
||||
typedef typename R::Point_3 Point_3;
|
||||
typedef typename R::Point_2 Point_2;
|
||||
|
||||
typename R::FT x(const Point_3 &p) const { return Projector<R,dim>::x(p); }
|
||||
typename R::FT y(const Point_3 &p) const { return Projector<R,dim>::y(p); }
|
||||
|
||||
Point_2 project(const Point_3& p) const
|
||||
{
|
||||
return Point_2(x(p),y(p));
|
||||
}
|
||||
|
||||
|
||||
public:
|
||||
typename R::FT operator() (const Point_3& p1,const Point_3& p2,const Point_3& p3) const
|
||||
{
|
||||
return R().compute_squared_radius_2_object() ( project(p1),project(p2),project(p3) );
|
||||
}
|
||||
typename R::FT operator() (const Point_3& p1,const Point_3& p2) const
|
||||
{
|
||||
return R().compute_squared_radius_2_object() ( project(p1),project(p2) );
|
||||
}
|
||||
|
||||
typename R::FT operator() (const Point_3& p1) const
|
||||
{
|
||||
return R().compute_squared_radius_2_object() ( project(p1) );
|
||||
}
|
||||
};
|
||||
|
||||
template < class R, int dim >
|
||||
class Projection_traits_3 {
|
||||
public:
|
||||
|
|
@ -347,10 +378,10 @@ public:
|
|||
typedef Compare_distance_projected_3<Rp,dim> Compare_distance_2;
|
||||
typedef Squared_distance_projected_3<Rp,dim> Compute_squared_distance_2;
|
||||
typedef Intersect_projected_3<Rp,dim> Intersect_2;
|
||||
typedef Compute_squared_radius_projected<Rp,dim> Compute_squared_radius_2;
|
||||
typedef typename Rp::Construct_segment_3 Construct_segment_2;
|
||||
typedef typename Rp::Construct_triangle_3 Construct_triangle_2;
|
||||
typedef typename Rp::Construct_line_3 Construct_line_2;
|
||||
typedef typename Rp::Compute_squared_radius_3 Compute_squared_radius_2;
|
||||
|
||||
struct Less_xy_2 {
|
||||
typedef bool result_type;
|
||||
|
|
|
|||
Loading…
Reference in New Issue