mirror of https://github.com/CGAL/cgal
Kernel_23: Call function objects from CGAL::Segment_3
This commit is contained in:
parent
c837828770
commit
d39c7742f1
|
|
@ -52,10 +52,10 @@ public:
|
|||
{ *this = l.rep().direction(); }
|
||||
|
||||
explicit DirectionC3(const Ray_3 &r)
|
||||
{ *this = r.direction(); }
|
||||
{ *this = r.rep().direction(); }
|
||||
|
||||
explicit DirectionC3(const Segment_3 &s)
|
||||
{ *this = s.direction(); }
|
||||
{ *this = s.rep().direction(); }
|
||||
|
||||
DirectionC3(const FT &x, const FT &y, const FT &z)
|
||||
: base(CGAL::make_array(x, y, z)) {}
|
||||
|
|
|
|||
|
|
@ -3988,7 +3988,7 @@ namespace CartesianKernelFunctors {
|
|||
|
||||
result_type
|
||||
operator()( const Segment_3& s, const Point_3& p) const
|
||||
{ return s.has_on(p); }
|
||||
{ return s.rep().has_on(p); }
|
||||
|
||||
result_type
|
||||
operator()( const Plane_3& pl, const Point_3& p) const
|
||||
|
|
|
|||
|
|
@ -49,16 +49,16 @@ public:
|
|||
//: base(p) {}
|
||||
|
||||
DirectionH3(const Vector_3 & v )
|
||||
{ *this = v.direction(); }
|
||||
{ *this = v.rep().direction(); }
|
||||
|
||||
DirectionH3(const Line_3 & l )
|
||||
{ *this = l.rep().direction(); }
|
||||
|
||||
DirectionH3(const Ray_3 & r )
|
||||
{ *this = r.direction(); }
|
||||
{ *this = r.rep().direction(); }
|
||||
|
||||
DirectionH3(const Segment_3 & s )
|
||||
{ *this = s.direction(); }
|
||||
{ *this = s.rep().direction(); }
|
||||
|
||||
// the fourth argument is not documented. Should go away ?
|
||||
DirectionH3(const RT& x, const RT& y,
|
||||
|
|
|
|||
|
|
@ -4090,7 +4090,7 @@ namespace HomogeneousKernelFunctors {
|
|||
|
||||
result_type
|
||||
operator()( const Segment_3& s, const Point_3& p) const
|
||||
{ return s.has_on(p); }
|
||||
{ return s.rep().has_on(p); }
|
||||
|
||||
result_type
|
||||
operator()( const Plane_3& pl, const Point_3& p) const
|
||||
|
|
|
|||
|
|
@ -136,10 +136,8 @@ public:
|
|||
}
|
||||
|
||||
bool has_on(const Point_3 &p) const
|
||||
{ // TODO : use one predicate.
|
||||
return R_().are_ordered_along_line_3_object()(source(),
|
||||
p,
|
||||
target());
|
||||
{
|
||||
return R().has_on_3_object()(*this, p);
|
||||
}
|
||||
|
||||
Segment_3 opposite() const
|
||||
|
|
@ -149,8 +147,7 @@ public:
|
|||
|
||||
Direction_3 direction() const
|
||||
{
|
||||
typename R::Construct_vector_3 construct_vector;
|
||||
return Direction_3( construct_vector( source(), target()));
|
||||
return R().construct_direction_3_object()(*this);
|
||||
}
|
||||
|
||||
bool is_degenerate() const
|
||||
|
|
|
|||
Loading…
Reference in New Issue