diff --git a/Cartesian_kernel/include/CGAL/Cartesian/Direction_3.h b/Cartesian_kernel/include/CGAL/Cartesian/Direction_3.h index 604b4d9ee92..fa5f1d0ea29 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/Direction_3.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/Direction_3.h @@ -54,7 +54,7 @@ public: // { *this = v.direction(); } DirectionC3(const Line_3 &l) - { *this = l.direction(); } + { *this = l.rep().direction(); } DirectionC3(const Ray_3 &r) { *this = r.direction(); } diff --git a/Cartesian_kernel/include/CGAL/Cartesian/Line_3.h b/Cartesian_kernel/include/CGAL/Cartesian/Line_3.h index 6fc7113b97d..614214448f2 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/Line_3.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/Line_3.h @@ -89,8 +89,6 @@ public: Point_3 point(int i) const; - Point_3 projection(const Point_3 &p) const; - bool has_on(const Point_3 &p) const; bool is_degenerate() const; }; @@ -136,15 +134,6 @@ LineC3::opposite() const return Line_3(point(), -to_vector()); } -template < class R > -inline -typename LineC3::Point_3 -LineC3:: -projection(const typename LineC3::Point_3 &p) const -{ - return R().construct_projected_point_3_object()(*this, p); -} - template < class R > inline bool diff --git a/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h b/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h index 5cf95a691e1..2227a72f656 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h @@ -2124,7 +2124,7 @@ namespace CartesianKernelFunctors { Point_3 operator()( const Plane_3& h, const Point_3& p ) const - { return h.projection(p); } + { return h.rep().projection(p); } }; template @@ -2303,6 +2303,7 @@ namespace CartesianKernelFunctors { typedef typename K::RT RT; typedef typename K::FT FT; typedef typename K::Segment_3 Segment_3; + typedef typename K::Direction_3 Direction_3; typedef typename K::Ray_3 Ray_3; typedef typename K::Line_3 Line_3; typedef typename K::Vector_3 Vector_3; @@ -2329,9 +2330,13 @@ namespace CartesianKernelFunctors { return Vector_3(- p.x(), - p.y(), - p.z()); } + Vector_3 + operator()( const Direction_3& d) const + { return d.rep().to_vector(); } + Vector_3 operator()( const Segment_3& s) const - { return s.to_vector(); } + { return s.rep().to_vector(); } Vector_3 operator()( const Ray_3& r) const @@ -2339,7 +2344,7 @@ namespace CartesianKernelFunctors { Vector_3 operator()( const Line_3& l) const - { return l.to_vector(); } + { return l.rep().to_vector(); } Vector_3 operator()( const Null_vector&) const @@ -2592,7 +2597,7 @@ namespace CartesianKernelFunctors { result_type operator()( const Line_3& l, const Point_3& p) const - { return l.has_on(p); } + { return l.rep().has_on(p); } result_type operator()( const Ray_3& r, const Point_3& p) const @@ -2604,7 +2609,11 @@ namespace CartesianKernelFunctors { result_type operator()( const Plane_3& pl, const Point_3& p) const - { return pl.has_on(p); } + { return pl.rep().has_on(p); } + + result_type + operator()( const Plane_3& pl, const Line_3& l) const + { return pl.rep().has_on(l); } result_type operator()( const Triangle_3& t, const Point_3& p) const diff --git a/Cartesian_kernel/include/CGAL/Cartesian_converter.h b/Cartesian_kernel/include/CGAL/Cartesian_converter.h index da18a1a8cb7..11778200dae 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian_converter.h +++ b/Cartesian_kernel/include/CGAL/Cartesian_converter.h @@ -299,7 +299,7 @@ public: typedef typename K2::Sphere_3 Sphere_3; return Sphere_3(operator()(a.center()), c(a.squared_radius()), - a.orientation()); + a.rep().orientation()); } typename K2::Triangle_3 diff --git a/Homogeneous_kernel/include/CGAL/Homogeneous/DirectionH3.h b/Homogeneous_kernel/include/CGAL/Homogeneous/DirectionH3.h index 4bd85d9887b..b6bf9feb079 100644 --- a/Homogeneous_kernel/include/CGAL/Homogeneous/DirectionH3.h +++ b/Homogeneous_kernel/include/CGAL/Homogeneous/DirectionH3.h @@ -56,7 +56,7 @@ public: { *this = v.direction(); } DirectionH3(const Line_3 & l ) - { *this = l.direction(); } + { *this = l.rep().direction(); } DirectionH3(const Ray_3 & r ) { *this = r.direction(); } diff --git a/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h b/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h index f344d1217d1..eb967ef197c 100644 --- a/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h +++ b/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h @@ -2458,7 +2458,7 @@ namespace HomogeneousKernelFunctors { Vector_3 operator()( const Plane_3& p ) const - { return p.orthogonal_vector(); } + { return p.rep().orthogonal_vector(); } Vector_3 operator()( const Point_3& p, const Point_3& q, const Point_3& r ) const @@ -2625,7 +2625,7 @@ namespace HomogeneousKernelFunctors { Point_3 operator()( const Plane_3& h, const Point_3& p ) const - { return h.projection(p); } + { return h.rep().projection(p); } }; template @@ -2792,6 +2792,7 @@ namespace HomogeneousKernelFunctors { { typedef typename K::RT RT; typedef typename K::FT FT; + typedef typename K::Direction_3 Direction_3; typedef typename K::Segment_3 Segment_3; typedef typename K::Ray_3 Ray_3; typedef typename K::Line_3 Line_3; @@ -2822,9 +2823,14 @@ namespace HomogeneousKernelFunctors { return Vector_3( - p.hx(), - p.hy(), - p.hz(), p.hw() ); } + Vector_3 + operator()( const Direction_3& d) const + { return d.rep().to_vector(); } + Vector_3 operator()( const Segment_3& s) const - { return this->operator()(s.start(), s.end()); } + { return s.rep().to_vector(); } + // { return this->operator()(s.start(), s.end()); } Vector_3 operator()( const Ray_3& r) const @@ -2832,7 +2838,7 @@ namespace HomogeneousKernelFunctors { Vector_3 operator()( const Line_3& l) const - { return l.to_vector(); } + { return l.rep().to_vector(); } Vector_3 operator()( const Null_vector&) const @@ -3130,7 +3136,7 @@ namespace HomogeneousKernelFunctors { result_type operator()( const Line_3& l, const Point_3& p) const - { return l.has_on(p); } + { return l.rep().has_on(p); } result_type operator()( const Ray_3& r, const Point_3& p) const @@ -3142,7 +3148,11 @@ namespace HomogeneousKernelFunctors { result_type operator()( const Plane_3& pl, const Point_3& p) const - { return pl.has_on(p); } + { return pl.rep().has_on(p); } + + result_type + operator()( const Plane_3& pl, const Line_3& l) const + { return pl.rep().has_on(l); } result_type operator()( const Triangle_3& t, const Point_3& p) const diff --git a/Kernel_23/include/CGAL/Direction_3.h b/Kernel_23/include/CGAL/Direction_3.h index c8da4b4852a..f6288e143c9 100644 --- a/Kernel_23/include/CGAL/Direction_3.h +++ b/Kernel_23/include/CGAL/Direction_3.h @@ -83,6 +83,13 @@ public: return R().construct_opposite_direction_3_object()(*this); } + Vector_3 to_vector() const + { + return R().construct_vector_3_object()(*this); + } + + Vector_3 vector() const { return to_vector(); } + }; diff --git a/Kernel_23/include/CGAL/Kernel/function_objects.h b/Kernel_23/include/CGAL/Kernel/function_objects.h index 0f0e5d9ff40..f2f87895027 100644 --- a/Kernel_23/include/CGAL/Kernel/function_objects.h +++ b/Kernel_23/include/CGAL/Kernel/function_objects.h @@ -278,6 +278,24 @@ namespace CommonKernelFunctors { } }; + template + class Compute_a_3 + { + typedef typename K::RT RT; + typedef typename K::Plane_3 Plane_3; + + public: + typedef RT result_type; + typedef Arity_tag< 1 > Arity; + + RT + operator()(const Plane_3& l) const + { + return l.rep().a(); + } + }; + + template class Compute_b_2 { @@ -295,6 +313,23 @@ namespace CommonKernelFunctors { } }; + template + class Compute_b_3 + { + typedef typename K::RT RT; + typedef typename K::Plane_3 Plane_3; + + public: + typedef RT result_type; + typedef Arity_tag< 1 > Arity; + + RT + operator()(const Plane_3& l) const + { + return l.rep().b(); + } + }; + template class Compute_c_2 @@ -313,6 +348,40 @@ namespace CommonKernelFunctors { } }; + template + class Compute_c_3 + { + typedef typename K::RT RT; + typedef typename K::Plane_3 Plane_3; + + public: + typedef RT result_type; + typedef Arity_tag< 1 > Arity; + + RT + operator()(const Plane_3& l) const + { + return l.rep().c(); + } + }; + + template + class Compute_d_3 + { + typedef typename K::RT RT; + typedef typename K::Plane_3 Plane_3; + + public: + typedef RT result_type; + typedef Arity_tag< 1 > Arity; + + RT + operator()(const Plane_3& l) const + { + return l.rep().d(); + } + }; + template class Compute_x_at_y_2 { @@ -703,7 +772,7 @@ namespace CommonKernelFunctors { const Point_3& operator()(const Segment_3& s) const - { return s.max(); } + { return s.rep().max(); } }; template @@ -722,7 +791,7 @@ namespace CommonKernelFunctors { const Point_3& operator()(const Segment_3& s) const - { return s.min(); } + { return s.rep().min(); } }; @@ -818,7 +887,7 @@ namespace CommonKernelFunctors { Line_3 operator()( const Line_3& l) const - { return l.opposite(); } + { return l.rep().opposite(); } }; template @@ -883,7 +952,7 @@ namespace CommonKernelFunctors { Segment_3 operator()( const Segment_3& s) const - { return s.opposite(); } + { return s.rep().opposite(); } }; template @@ -924,7 +993,7 @@ namespace CommonKernelFunctors { Line_3 operator()( const Plane_3& pl, const Point_3& p) const - { return pl.perpendicular_line(p); } + { return pl.rep().perpendicular_line(p); } }; template @@ -939,7 +1008,7 @@ namespace CommonKernelFunctors { Plane_3 operator()( const Line_3& l, const Point_3& p) const - { return l.perpendicular_plane(p); } + { return l.rep().perpendicular_plane(p); } }; template @@ -1024,7 +1093,7 @@ namespace CommonKernelFunctors { Point_3 operator()( const Line_3& l, int i) const - { return l.point(i); } + { return l.rep().point(i); } Point_3 operator()( const Segment_3& s, int i) const @@ -1036,7 +1105,7 @@ namespace CommonKernelFunctors { Point_3 operator()( const Plane_3& p) const - { return p.point(); } + { return p.rep().point(); } }; @@ -1226,6 +1295,20 @@ namespace CommonKernelFunctors { { return s.rep().target(); } }; + template + class Construct_target_3 : Has_qrt + { + typedef typename K::Segment_3 Segment_3; + typedef typename K::Point_3 Point_3; + public: + typedef Point_3 result_type; + typedef Arity_tag< 1 > Arity; + + const result_type& + operator()(const Segment_3& s) const + { return s.rep().target(); } + }; + template class Construct_second_point_2 : Has_qrt { @@ -1403,7 +1486,7 @@ namespace CommonKernelFunctors { const Point_3 & operator()( const Segment_3& s, int i) const - { return s.vertex(i); } + { return s.rep().vertex(i); } const Point_3 & operator()( const Triangle_3& t, int i) const @@ -1900,7 +1983,7 @@ namespace CommonKernelFunctors { result_type operator()( const Plane_3& pl, const Point_3& p) const - { return pl.has_on_negative_side(p); } + { return pl.rep().has_on_negative_side(p); } }; template @@ -1948,7 +2031,7 @@ namespace CommonKernelFunctors { result_type operator()( const Plane_3& pl, const Point_3& p) const - { return pl.has_on_positive_side(p); } + { return pl.rep().has_on_positive_side(p); } }; template @@ -2119,11 +2202,11 @@ namespace CommonKernelFunctors { result_type operator()( const Line_3& l) const - { return l.is_degenerate(); } + { return l.rep().is_degenerate(); } result_type operator()( const Plane_3& pl) const - { return pl.is_degenerate(); } + { return pl.rep().is_degenerate(); } result_type operator()( const Ray_3& r) const @@ -2131,7 +2214,7 @@ namespace CommonKernelFunctors { result_type operator()( const Segment_3& s) const - { return s.is_degenerate(); } + { return s.rep().is_degenerate(); } result_type operator()( const Sphere_3& s) const @@ -2264,7 +2347,7 @@ namespace CommonKernelFunctors { result_type operator()( const Plane_3& pl, const Point_3& p) const - { return pl.oriented_side(p); } + { return pl.rep().oriented_side(p); } result_type operator()( const Tetrahedron_3& t, const Point_3& p) const diff --git a/Kernel_23/include/CGAL/Kernel/interface_macros.h b/Kernel_23/include/CGAL/Kernel/interface_macros.h index 07c75912fcf..ca3e84dd6fd 100644 --- a/Kernel_23/include/CGAL/Kernel/interface_macros.h +++ b/Kernel_23/include/CGAL/Kernel/interface_macros.h @@ -99,10 +99,18 @@ CGAL_Kernel_pred(Compare_z_3, compare_z_3_object) CGAL_Kernel_cons(Compute_a_2, compute_a_2_object) +CGAL_Kernel_cons(Compute_a_3, + compute_a_3_object) CGAL_Kernel_cons(Compute_b_2, compute_b_2_object) +CGAL_Kernel_cons(Compute_b_3, + compute_b_3_object) CGAL_Kernel_cons(Compute_c_2, compute_c_2_object) +CGAL_Kernel_cons(Compute_c_3, + compute_c_3_object) +CGAL_Kernel_cons(Compute_d_3, + compute_d_3_object) CGAL_Kernel_cons(Compute_area_2, compute_area_2_object) CGAL_Kernel_cons(Compute_area_3, @@ -313,6 +321,8 @@ CGAL_Kernel_cons(Construct_supporting_plane_3, construct_supporting_plane_3_object) CGAL_Kernel_cons(Construct_target_2, construct_target_2_object) +CGAL_Kernel_cons(Construct_target_3, + construct_target_3_object) CGAL_Kernel_cons(Construct_tetrahedron_3, construct_tetrahedron_3_object) CGAL_Kernel_cons(Construct_translated_point_2, diff --git a/Kernel_23/include/CGAL/Line_2.h b/Kernel_23/include/CGAL/Line_2.h index 1cb1c877741..c3937141df8 100644 --- a/Kernel_23/include/CGAL/Line_2.h +++ b/Kernel_23/include/CGAL/Line_2.h @@ -130,7 +130,6 @@ public: return R().construct_projected_point_2_object()(*this,p); } - bool is_horizontal() const { @@ -143,26 +142,22 @@ public: return R().is_vertical_2_object()(*this); } - bool is_degenerate() const { return R().is_degenerate_2_object()(*this); } - Oriented_side oriented_side(const Point_2 &p) const { return R().oriented_side_2_object()(*this,p); } - bool has_on_boundary(const Point_2 &p) const { return oriented_side(p) == ON_ORIENTED_BOUNDARY; } - bool has_on_positive_side(const Point_2 &p) const { @@ -181,7 +176,6 @@ public: return has_on_boundary(p); } - FT x_at_y(const FT &y) const { @@ -206,21 +200,18 @@ public: return R().construct_point_2_object()(*this,i); } - bool operator==(const Line_2 &l) const { return R().equal_2_object()(*this, l); } - bool operator!=(const Line_2 &l) const { return !(*this == l); } - }; #ifndef CGAL_NO_OSTREAM_INSERT_LINE_2 diff --git a/Kernel_23/include/CGAL/Line_3.h b/Kernel_23/include/CGAL/Line_3.h index 1e59c5583fe..a15fe1ed138 100644 --- a/Kernel_23/include/CGAL/Line_3.h +++ b/Kernel_23/include/CGAL/Line_3.h @@ -36,6 +36,7 @@ class Line_3 : public R_::Kernel_base::Line_3 typedef typename R_::Segment_3 Segment_3; typedef typename R_::Direction_3 Direction_3; typedef typename R_::Vector_3 Vector_3; + typedef typename R_::Plane_3 Plane_3; typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef typename R_::Kernel_base::Line_3 RLine_3; public: @@ -79,6 +80,53 @@ public: { return Line_3(t.transform(this->point()), t.transform(this->direction())); } + + Vector_3 to_vector() const + { + return R().construct_vector_3_object()(*this); + } + + Direction_3 direction() const + { + return R().construct_direction_3_object()(*this); + } + + bool has_on(const Point_3 &p) const + { + return R().has_on_3_object()(*this, p); + //return has_on_boundary(p); + } + + Point_3 point() const + { + return R().construct_point_on_3_object()(*this, 0); + } + + Point_3 point(int i) const + { + return R().construct_point_on_3_object()(*this, i); + } + + Line_3 opposite() const + { + return R().construct_opposite_line_3_object()(*this); + } + + Plane_3 perpendicular_plane(const Point_3 &p) const + { + return R().construct_perpendicular_plane_3_object()(*this, p); + } + + Point_3 projection(const Point_3 &p) const + { + return R().construct_projected_point_3_object()(*this, p); + } + + bool is_degenerate() const + { + return R().is_degenerate_3_object()(*this); + } + }; #ifndef CGAL_NO_OSTREAM_INSERT_LINE_3 diff --git a/Kernel_23/include/CGAL/Plane_3.h b/Kernel_23/include/CGAL/Plane_3.h index d34993fbfc5..b3699eb4423 100644 --- a/Kernel_23/include/CGAL/Plane_3.h +++ b/Kernel_23/include/CGAL/Plane_3.h @@ -30,6 +30,7 @@ template class Plane_3 : public R_::Kernel_base::Plane_3 { typedef typename R_::RT RT; + typedef typename R_::Point_2 Point_2; typedef typename R_::Point_3 Point_3; typedef typename R_::Direction_3 Direction_3; typedef typename R_::Vector_3 Vector_3; @@ -89,6 +90,123 @@ public: { return R().construct_opposite_plane_3_object()(*this); } + + //Vector_3 orthogonal_vector() const; + Direction_3 orthogonal_direction() const + { + return Direction_3(a(), b(), c()); + } + + typename Qualified_result_of::type + a() const + { + return R().compute_a_3_object()(*this); + } + + typename Qualified_result_of::type + b() const + { + return R().compute_b_3_object()(*this); + } + + typename Qualified_result_of::type + c() const + { + return R().compute_c_3_object()(*this); + } + + typename Qualified_result_of::type + d() const + { + return R().compute_d_3_object()(*this); + } + + bool has_on(const Point_3 &p) const + { + return R().has_on_3_object()(*this, p); + } + + bool has_on(const Line_3 &l) const + { + return R().has_on_3_object()(*this, l); + } + + Line_3 perpendicular_line(const Point_3 &p) const + { + return R().construct_perpendicular_line_3_object()(*this, p); + } + + Point_3 projection(const Point_3 &p) const + { + return R().construct_projected_point_3_object()(*this, p); + } + + Point_3 point() const + { + return R().construct_point_on_3_object()(*this); + } + + Vector_3 base1() const + { + return R().construct_base_vector_3_object()(*this, 1); + } + + Vector_3 base2() const + { + return R().construct_base_vector_3_object()(*this, 2); + } + + Vector_3 orthogonal_vector() const + { + return R().construct_orthogonal_vector_3_object()(*this); + } + + Point_2 to_2d(const Point_3 &p) const + { + return rep().to_2d(p); + } + + Point_3 to_3d(const Point_2 &p) const + { + return R().construct_lifted_point_3_object()(*this, p); + } + + + //Point_3 projection(const Point_3 &p) const; + //Direction_3 orthogonal_direction() const; + + Oriented_side oriented_side(const Point_3 &p) const + { + return R().oriented_side_3_object()(*this, p); + } + + bool has_on_positive_side(const Point_3 &p) const + { + return R().has_on_positive_side_3_object()(*this, p); + } + + bool has_on_negative_side(const Point_3 &p) const + { + return R().has_on_negative_side_3_object()(*this, p); + } + +/* + bool has_on(const Point_3 &p) const + { + return oriented_side(p) == ON_ORIENTED_BOUNDARY; + } + bool has_on(const Line_3 &l) const + { + return has_on(l.point()) + && has_on(l.point() + l.direction().to_vector()); + } +*/ + + bool is_degenerate() const + { + return R().is_degenerate_3_object()(*this); + } + }; #ifndef CGAL_NO_OSTREAM_INSERT_PLANE_3 diff --git a/Kernel_23/include/CGAL/Segment_3.h b/Kernel_23/include/CGAL/Segment_3.h index 0c7ff128093..1485b90bfea 100644 --- a/Kernel_23/include/CGAL/Segment_3.h +++ b/Kernel_23/include/CGAL/Segment_3.h @@ -32,6 +32,9 @@ class Segment_3 : public R_::Kernel_base::Segment_3 typedef typename R_::RT RT; typedef typename R_::FT FT; typedef typename R_::Point_3 Point_3; + typedef typename R_::Vector_3 Vector_3; + typedef typename R_::Direction_3 Direction_3; + typedef typename R_::Line_3 Line_3; typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef typename R_::Kernel_base::Segment_3 RSegment_3; public: @@ -58,6 +61,58 @@ public: Segment_3(const RSegment_3& s) : RSegment_3(s) {} +// FIXME TODO : Use Qrt here ! + //typename Qualified_result_of::type + Point_3 + source() const + { + return R_().construct_source_3_object()(*this); + } + + //typename Qualified_result_of::type + Point_3 + target() const + { + return R_().construct_target_3_object()(*this); + } + + //typename Qualified_result_of::type + Point_3 + start() const + { + return source(); + } + + //typename Qualified_result_of::type + Point_3 + end() const + { + return target(); + } + + //typename Qualified_result_of::type + Point_3 + min() const; + + //typename Qualified_result_of::type + Point_3 + max() const; + + //typename Qualified_result_of::type + Point_3 + vertex(int i) const; + + //typename Qualified_result_of::type + Point_3 + point(int i) const + { return vertex(i); } + + //typename Qualified_result_of::type + Point_3 + operator[](int i) const + { return vertex(i); } + + Segment_3 transform(const Aff_transformation_3 &t) const { return Segment_3(t.transform(this->source()), t.transform(this->target())); @@ -67,8 +122,73 @@ public: { return squared_distance(this->target(), this->source()); } + + Vector_3 to_vector() const + { + return R().construct_vector_3_object()(*this); + } + + bool has_on(const Point_3 &p) const + { // TODO : use one predicate. + return R_().are_ordered_along_line_3_object()(source(), + p, + target()); + } + + Segment_3 opposite() const + { + return R().construct_opposite_segment_3_object()(*this); + } + + Direction_3 direction() const + { + typename R::Construct_vector_3 construct_vector; + return Direction_3( construct_vector( source(), target())); + } + + bool is_degenerate() const + { + return R().is_degenerate_3_object()(*this); + } + + Line_3 + supporting_line() const + { + return R().construct_line_3_object()(*this); + } + }; +template < class R_ > +CGAL_KERNEL_INLINE +//typename Qualified_result_of >::type +typename R_::Point_3 +Segment_3::min() const +{ + typename R_::Less_xyz_3 less_xyz; + return less_xyz(source(),target()) ? source() : target(); +} + +template < class R_ > +CGAL_KERNEL_INLINE +//typename Qualified_result_of >::type +typename R_::Point_3 +Segment_3::max() const +{ + typename R_::Less_xyz_3 less_xyz; + return less_xyz(source(),target()) ? target() : source(); +} + +template < class R_ > +CGAL_KERNEL_INLINE +//typename Qualified_result_of, int >::type +typename R_::Point_3 +Segment_3::vertex(int i) const +{ + return (i%2 == 0) ? source() : target(); +} + + #ifndef CGAL_NO_OSTREAM_INSERT_SEGMENT_3 template < class R> std::ostream& diff --git a/Kernel_23/include/CGAL/Sphere_3.h b/Kernel_23/include/CGAL/Sphere_3.h index 8c792301693..5843cdf8001 100644 --- a/Kernel_23/include/CGAL/Sphere_3.h +++ b/Kernel_23/include/CGAL/Sphere_3.h @@ -105,7 +105,7 @@ public: { return R().bounded_side_3_object()(*this, p); } - + Oriented_side oriented_side(const Point_3 &p) const {