From 89d1821b6fd3dcdf7f90c2c63ec4cc4cc8255d04 Mon Sep 17 00:00:00 2001 From: Sylvain Pion Date: Thu, 3 Aug 2006 08:39:26 +0000 Subject: [PATCH] Remove blanks at end of lines --- .../include/CGAL/Cartesian/function_objects.h | 310 ++++++++--------- .../CGAL/Homogeneous/function_objects.h | 326 +++++++++--------- 2 files changed, 318 insertions(+), 318 deletions(-) diff --git a/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h b/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h index e87523f9281..38db483ee93 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h @@ -17,7 +17,7 @@ // // $URL$ // $Id$ -// +// // // Author(s) : Stefan Schirra, Sylvain Pion, Michael Hoffmann @@ -60,7 +60,7 @@ namespace CartesianKernelFunctors { result_type operator()(const Point_3& p, const Point_3& q, const Point_3& r) const - { + { return angleC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), r.x(), r.y(), r.z()); @@ -73,7 +73,7 @@ namespace CartesianKernelFunctors { typedef typename K::Line_2 Line_2; typedef typename K::Segment_2 Segment_2; typedef typename K::Ray_2 Ray_2; - + public: typedef typename K::Bool_type result_type; typedef Arity_tag< 2 > Arity; @@ -106,7 +106,7 @@ namespace CartesianKernelFunctors { typedef typename K::Segment_3 Segment_3; typedef typename K::Ray_3 Ray_3; typedef typename K::Plane_3 Plane_3; - + public: typedef typename K::Bool_type result_type; typedef Arity_tag< 2 > Arity; @@ -154,7 +154,7 @@ namespace CartesianKernelFunctors { result_type operator()( const Circle_2& c, const Point_2& p) const - { + { typename K::Compute_squared_distance_2 squared_distance; return enum_cast(CGAL_NTS compare(c.squared_radius(), squared_distance(c.center(),p))); @@ -162,14 +162,14 @@ namespace CartesianKernelFunctors { result_type operator()( const Triangle_2& t, const Point_2& p) const - { - typename K::Collinear_are_ordered_along_line_2 + { + typename K::Collinear_are_ordered_along_line_2 collinear_are_ordered_along_line; typename K::Orientation_2 orientation; typename K::Orientation o1 = orientation(t.vertex(0), t.vertex(1), p), o2 = orientation(t.vertex(1), t.vertex(2), p), o3 = orientation(t.vertex(2), t.vertex(3), p); - + if (o2 == o1 && o3 == o1) return ON_BOUNDED_SIDE; return @@ -185,7 +185,7 @@ namespace CartesianKernelFunctors { result_type operator()( const Iso_rectangle_2& r, const Point_2& p) const - { + { bool x_incr = (r.xmin() < p.x()) && (p.x() < r.xmax()), y_incr = (r.ymin() < p.y()) && (p.y() < r.ymax()); if (x_incr) @@ -199,7 +199,7 @@ namespace CartesianKernelFunctors { if ( y_incr || (p.y() == r.ymin()) || (r.ymax() == p.y()) ) return ON_BOUNDARY; - return ON_UNBOUNDED_SIDE; + return ON_UNBOUNDED_SIDE; } }; @@ -251,18 +251,18 @@ namespace CartesianKernelFunctors { class Collinear_are_ordered_along_line_2 { typedef typename K::Point_2 Point_2; -#ifdef CGAL_kernel_exactness_preconditions +#ifdef CGAL_kernel_exactness_preconditions typedef typename K::Collinear_2 Collinear_2; Collinear_2 c; -#endif // CGAL_kernel_exactness_preconditions +#endif // CGAL_kernel_exactness_preconditions public: typedef typename K::Bool_type result_type; typedef Arity_tag< 3 > Arity; -#ifdef CGAL_kernel_exactness_preconditions +#ifdef CGAL_kernel_exactness_preconditions Collinear_are_ordered_along_line_2() {} Collinear_are_ordered_along_line_2(const Collinear_2& c_) : c(c_) {} -#endif // CGAL_kernel_exactness_preconditions +#endif // CGAL_kernel_exactness_preconditions result_type operator()(const Point_2& p, const Point_2& q, const Point_2& r) const @@ -277,18 +277,18 @@ namespace CartesianKernelFunctors { class Collinear_are_ordered_along_line_3 { typedef typename K::Point_3 Point_3; -#ifdef CGAL_kernel_exactness_preconditions +#ifdef CGAL_kernel_exactness_preconditions typedef typename K::Collinear_3 Collinear_3; Collinear_3 c; -#endif // CGAL_kernel_exactness_preconditions +#endif // CGAL_kernel_exactness_preconditions public: typedef typename K::Bool_type result_type; typedef Arity_tag< 3 > Arity; -#ifdef CGAL_kernel_exactness_preconditions +#ifdef CGAL_kernel_exactness_preconditions Collinear_are_ordered_along_line_3() {} Collinear_are_ordered_along_line_3(const Collinear_3& c_) : c(c_) {} -#endif // CGAL_kernel_exactness_preconditions +#endif // CGAL_kernel_exactness_preconditions result_type operator()(const Point_3& p, const Point_3& q, const Point_3& r) const @@ -297,26 +297,26 @@ namespace CartesianKernelFunctors { return collinear_are_ordered_along_lineC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), r.x(), r.y(), r.z()); - } + } }; template class Collinear_are_strictly_ordered_along_line_2 { typedef typename K::Point_2 Point_2; -#ifdef CGAL_kernel_exactness_preconditions +#ifdef CGAL_kernel_exactness_preconditions typedef typename K::Collinear_2 Collinear_2; Collinear_2 c; -#endif // CGAL_kernel_exactness_preconditions +#endif // CGAL_kernel_exactness_preconditions public: typedef typename K::Bool_type result_type; typedef Arity_tag< 3 > Arity; -#ifdef CGAL_kernel_exactness_preconditions +#ifdef CGAL_kernel_exactness_preconditions Collinear_are_strictly_ordered_along_line_2() {} - Collinear_are_strictly_ordered_along_line_2(const Collinear_2& c_) : c(c_) + Collinear_are_strictly_ordered_along_line_2(const Collinear_2& c_) : c(c_) {} -#endif // CGAL_kernel_exactness_preconditions +#endif // CGAL_kernel_exactness_preconditions result_type operator()(const Point_2& p, const Point_2& q, const Point_2& r) const @@ -331,19 +331,19 @@ namespace CartesianKernelFunctors { class Collinear_are_strictly_ordered_along_line_3 { typedef typename K::Point_3 Point_3; -#ifdef CGAL_kernel_exactness_preconditions +#ifdef CGAL_kernel_exactness_preconditions typedef typename K::Collinear_3 Collinear_3; Collinear_3 c; -#endif // CGAL_kernel_exactness_preconditions +#endif // CGAL_kernel_exactness_preconditions public: typedef typename K::Bool_type result_type; typedef Arity_tag< 3 > Arity; -#ifdef CGAL_kernel_exactness_preconditions +#ifdef CGAL_kernel_exactness_preconditions Collinear_are_strictly_ordered_along_line_3() {} Collinear_are_strictly_ordered_along_line_3(const Collinear_3& c_) : c(c_) {} -#endif // CGAL_kernel_exactness_preconditions +#endif // CGAL_kernel_exactness_preconditions result_type operator()(const Point_3& p, const Point_3& q, const Point_3& r) const @@ -364,7 +364,7 @@ namespace CartesianKernelFunctors { typedef typename K::Construct_point_on_2 Construct_point_on_2; typedef typename K::Compare_x_2 Compare_x_2; typedef typename K::Compare_y_2 Compare_y_2; - typedef typename K::Collinear_are_ordered_along_line_2 + typedef typename K::Collinear_are_ordered_along_line_2 Collinear_are_ordered_along_line_2; Construct_point_on_2 cp; Compare_x_2 cx; @@ -378,14 +378,14 @@ namespace CartesianKernelFunctors { Collinear_has_on_2(const Construct_point_on_2& cp_, const Compare_x_2& cx_, const Compare_y_2& cy_, - const Collinear_are_ordered_along_line_2& co_) + const Collinear_are_ordered_along_line_2& co_) : cp(cp_), cx(cx_), cy(cy_), co(co_) {} result_type operator()( const Ray_2& r, const Point_2& p) const { - Point_2 source = cp(r,0); + Point_2 source = cp(r,0); Point_2 second = cp(r,1); switch(cx(source, second)) { case SMALLER: @@ -403,10 +403,10 @@ namespace CartesianKernelFunctors { } } // switch } - + result_type operator()( const Segment_2& s, const Point_2& p) const - { + { return co(cp(s,0), p, cp(s,1)); } }; @@ -486,7 +486,7 @@ namespace CartesianKernelFunctors { result_type operator()(const Point_3& p, const Point_3& q, const Point_3& r) const - { + { return cmp_dist_to_pointC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), r.x(), r.y(), r.z()); @@ -504,13 +504,13 @@ namespace CartesianKernelFunctors { result_type operator()(const Line_2& l1, const Line_2& l2) const - { + { return compare_slopesC2(l1.a(), l1.b(), l2.a(), l2.b()); } result_type operator()(const Segment_2& s1, const Segment_2& s2) const - { + { return compare_slopesC2(s1.source().x(), s1.source().y(), s1.target().x(), s1.target().y(), s2.source().x(), s2.source().y(), @@ -533,14 +533,14 @@ namespace CartesianKernelFunctors { result_type operator()( const Point_2& p, const Line_2& h1, const Line_2& h2) const - { + { return compare_y_at_xC2(p.y(), h1.b(), h1.a(), h1.c(), h2.b(), h2.a(), h2.c()); } result_type operator()( const Line_2& l1, const Line_2& l2, const Line_2& h) const - { + { return compare_y_at_xC2(l1.b(), l1.a(), l1.c(), l2.b(), l2.a(), l2.c(), h.b(), h.a(), h.c()); } @@ -548,7 +548,7 @@ namespace CartesianKernelFunctors { result_type operator()( const Line_2& l1, const Line_2& l2, const Line_2& h1, const Line_2& h2) const - { + { return compare_y_at_xC2(l1.b(), l1.a(), l1.c(), l2.b(), l2.a(), l2.c(), h1.b(), h1.a(), h1.c(), h2.b(), h2.a(), h2.c()); } @@ -564,7 +564,7 @@ namespace CartesianKernelFunctors { result_type operator()( const Point_3& p, const Point_3& q) const - { + { return compare_lexicographically_xyzC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z()); } @@ -623,7 +623,7 @@ namespace CartesianKernelFunctors { result_type operator()( const Line_2& l1, const Line_2& l2, const Line_2& h1, const Line_2& h2) const - { + { return compare_xC2(l1.a(), l1.b(), l1.c(), l2.a(), l2.b(), l2.c(), h1.a(), h1.b(), h1.c(), h2.a(), h2.b(), h2.c()); } @@ -726,9 +726,9 @@ namespace CartesianKernelFunctors { result_type operator()( const Point_2& p, const Line_2& l1, const Line_2& l2) const - { - return compare_xC2(p.y(), - l1.b(), l1.a(), l1.c(), + { + return compare_xC2(p.y(), + l1.b(), l1.a(), l1.c(), l2.b(), l2.a(), l2.c()); } @@ -907,7 +907,7 @@ namespace CartesianKernelFunctors { result_type operator()( const Point_2& p, const Point_2& q) const - { + { return squared_distanceC2(p.x(), p.y(), q.x(), q.y()); } }; @@ -984,7 +984,7 @@ namespace CartesianKernelFunctors { result_type operator()( const Point_3& p, const Point_3& q, const Point_3& r, const Point_3& s) const - { + { return squared_radiusC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), r.x(), r.y(), r.z(), @@ -1480,7 +1480,7 @@ namespace CartesianKernelFunctors { typedef typename K::FT FT; typedef typename K::Construct_cross_product_vector_3 Construct_cross_product_vector_3; - typedef typename K::Construct_orthogonal_vector_3 + typedef typename K::Construct_orthogonal_vector_3 Construct_orthogonal_vector_3; Construct_cross_product_vector_3 cp; Construct_orthogonal_vector_3 co; @@ -1493,20 +1493,20 @@ namespace CartesianKernelFunctors { const Construct_orthogonal_vector_3& co_) : cp(cp_), co(co_) {} - + result_type operator()( const Plane_3& h, int index ) const { if (index == 1) { if ( CGAL_NTS is_zero(h.a()) ) // parallel to x-axis return Vector_3(FT(1), FT(0), FT(0)); - + if ( CGAL_NTS is_zero(h.b()) ) // parallel to y-axis return Vector_3(FT(0), FT(1), FT(0)); - + if ( CGAL_NTS is_zero(h.c()) ) // parallel to z-axis return Vector_3(FT(0), FT(0), FT(1)); - + return Vector_3(-h.b(), h.a(), FT(0)); } else { return cp(co(h), this->operator()(h,1)); @@ -1526,52 +1526,52 @@ namespace CartesianKernelFunctors { public: typedef Bbox_2 result_type; typedef Arity_tag< 1 > Arity; - + result_type operator()( const Point_2& p) const - { + { typename K::Compute_x_2 x;// = K().compute_x_2_object(); std::pair xp = CGAL_NTS to_interval(x(p)); std::pair yp = CGAL_NTS to_interval(p.y()); return Bbox_2(xp.first, yp.first, xp.second, yp.second); } - + result_type operator()( const Segment_2& s) const { return s.source().bbox() + s.target().bbox(); } result_type operator()( const Triangle_2& t) const - { + { typename K::Construct_bbox_2 construct_bbox_2; - return construct_bbox_2(t.vertex(0)) - + construct_bbox_2(t.vertex(1)) + return construct_bbox_2(t.vertex(0)) + + construct_bbox_2(t.vertex(1)) + construct_bbox_2(t.vertex(2)); } result_type operator()( const Iso_rectangle_2& r) const - { + { typename K::Construct_bbox_2 construct_bbox_2; return construct_bbox_2(r.min()) + construct_bbox_2(r.max()); } result_type operator()( const Circle_2& c) const - { + { typename K::Construct_bbox_2 construct_bbox_2; Bbox_2 b = construct_bbox_2(c.center()); Interval_nt<> x (b.xmin(), b.xmax()); Interval_nt<> y (b.ymin(), b.ymax()); - + Interval_nt<> sqr = CGAL_NTS to_interval(c.squared_radius()); Interval_nt<> r = CGAL::sqrt(sqr); Interval_nt<> minx = x-r; Interval_nt<> maxx = x+r; Interval_nt<> miny = y-r; Interval_nt<> maxy = y+r; - + return Bbox_2(minx.inf(), miny.inf(), maxx.sup(), maxy.sup()); } }; @@ -1662,7 +1662,7 @@ namespace CartesianKernelFunctors { } result_type - operator()(const Point_2& p, const Point_2& q, + operator()(const Point_2& p, const Point_2& q, const Point_2& r, const Point_2& s) const { typename K::Construct_point_2 construct_point_2; @@ -1685,7 +1685,7 @@ namespace CartesianKernelFunctors { result_type operator()(const Point_3& p, const Point_3& q, const Point_3& r) const - { + { typename K::Construct_point_3 construct_point_3; FT x, y, z; centroidC3(p.x(), p.y(), p.z(), @@ -1696,7 +1696,7 @@ namespace CartesianKernelFunctors { } result_type - operator()(const Point_3& p, const Point_3& q, + operator()(const Point_3& p, const Point_3& q, const Point_3& r, const Point_3& s) const { typename K::Construct_point_3 construct_point_3; @@ -1734,7 +1734,7 @@ namespace CartesianKernelFunctors { result_type operator()(const Point_2& p, const Point_2& q, const Point_2& r) const - { + { typename K::Construct_point_2 construct_point_2; typedef typename K::FT FT; FT x, y; @@ -1744,7 +1744,7 @@ namespace CartesianKernelFunctors { result_type operator()(const Triangle_2& t) const - { + { return this->operator()(t.vertex(0), t.vertex(1), t.vertex(2)); } }; @@ -1762,7 +1762,7 @@ namespace CartesianKernelFunctors { Point_3 operator()(const Point_3& p, const Point_3& q, const Point_3& r) const - { + { typename K::Construct_point_3 construct_point_3; FT x, y, z; circumcenterC3(p.x(), p.y(), p.z(), @@ -1774,7 +1774,7 @@ namespace CartesianKernelFunctors { Point_3 operator()(const Triangle_3& t) const - { + { return this->operator()(t.vertex(0), t.vertex(1), t.vertex(2)); } @@ -1794,7 +1794,7 @@ namespace CartesianKernelFunctors { Point_3 operator()(const Tetrahedron_3& t) const - { + { return this->operator()(t.vertex(0), t.vertex(1), t.vertex(2), t.vertex(3)); } @@ -1826,7 +1826,7 @@ namespace CartesianKernelFunctors { typedef typename K::Construct_base_vector_3 Construct_base_vector_3; typedef typename K::Construct_point_on_3 Construct_point_on_3; typedef typename K::Construct_scaled_vector_3 Construct_scaled_vector_3; - typedef typename K::Construct_translated_point_3 + typedef typename K::Construct_translated_point_3 Construct_translated_point_3; Construct_base_vector_3 cb; Construct_point_on_3 cp; @@ -1846,7 +1846,7 @@ namespace CartesianKernelFunctors { Point_3 operator()(const Plane_3& h, const Point_2& p) const - { + { return ct(ct(cp(h), cs(cb(h,1), p.x())), cs(cb(h,2), p.y())); } }; @@ -1882,14 +1882,14 @@ namespace CartesianKernelFunctors { Direction_2 operator()(const Ray_2& r) const - { + { typename K::Construct_direction_2 construct_direction; return construct_direction(r.source(), r.second_point()); } Direction_2 operator()(const Segment_2& s) const - { + { typename K::Construct_direction_2 construct_direction; return construct_direction( s.source(), s.target()); } @@ -1897,7 +1897,7 @@ namespace CartesianKernelFunctors { Direction_2 operator()(const Point_2& p, const Point_2& q) const { - return Rep(q.x() - p.x(), q.y() - p.y()); + return Rep(q.x() - p.x(), q.y() - p.y()); } }; @@ -1954,13 +1954,13 @@ namespace CartesianKernelFunctors { Iso_rectangle_2 operator()(const Point_2& p, const Point_2& q) const - { + { FT minx, maxx, miny, maxy; if (p.x() < q.x()) { minx = p.x(); maxx = q.x(); } else { minx = q.x(); maxx = p.x(); } if (p.y() < q.y()) { miny = p.y(); maxy = q.y(); } else { miny = q.y(); maxy = p.y(); } - + return Rep(Point_2(minx, miny), Point_2(maxx, maxy)); } @@ -1968,7 +1968,7 @@ namespace CartesianKernelFunctors { Iso_rectangle_2 operator()(const Point_2 &left, const Point_2 &right, const Point_2 &bottom, const Point_2 &top) const - { + { CGAL_kernel_assertion_code(typename K::Less_x_2 less_x;) CGAL_kernel_assertion_code(typename K::Less_y_2 less_y;) CGAL_kernel_assertion(!less_x(right, left)); @@ -1978,7 +1978,7 @@ namespace CartesianKernelFunctors { } Iso_rectangle_2 - operator()(const RT& min_hx, const RT& min_hy, + operator()(const RT& min_hx, const RT& min_hy, const RT& max_hx, const RT& max_hy) const { CGAL_kernel_precondition(min_hx <= max_hx); @@ -1988,7 +1988,7 @@ namespace CartesianKernelFunctors { } Iso_rectangle_2 - operator()(const RT& min_hx, const RT& min_hy, + operator()(const RT& min_hx, const RT& min_hy, const RT& max_hx, const RT& max_hy, const RT& hw) const { if (hw == 1) @@ -2026,7 +2026,7 @@ namespace CartesianKernelFunctors { Line_2 operator()(const Point_2& p, const Point_2& q) const - { + { FT a, b, cc; line_from_pointsC2(p.x(), p.y(), q.x(), q.y(), a, b, cc); return Rep(a, b, cc); @@ -2034,7 +2034,7 @@ namespace CartesianKernelFunctors { Line_2 operator()(const Point_2& p, const Direction_2& d) const - { + { FT a, b, cc; line_from_point_directionC2(p.x(), p.y(), d.dx(), d.dy(), a, b, cc); return Rep(a, b, cc); @@ -2042,7 +2042,7 @@ namespace CartesianKernelFunctors { Line_2 operator()(const Point_2& p, const Vector_2& v) const - { + { FT a, b, cc; line_from_point_directionC2(p.x(), p.y(), v.x(), v.y(), a, b, cc); return Rep(a, b, cc); @@ -2078,8 +2078,8 @@ namespace CartesianKernelFunctors { Construct_line_3() {} Construct_line_3(const Construct_vector_3& cv_, - const Construct_point_on_3& cp_) - : cv(cv_), cp(cp_) + const Construct_point_on_3& cp_) + : cv(cv_), cp(cp_) {} Line_3 @@ -2114,7 +2114,7 @@ namespace CartesianKernelFunctors { Point_2 operator()(const Point_2& p, const Point_2& q) const - { + { typename K::Construct_point_2 construct_point_2; FT x, y; midpointC2(p.x(), p.y(), q.x(), q.y(), x, y); @@ -2133,7 +2133,7 @@ namespace CartesianKernelFunctors { Point_3 operator()(const Point_3& p, const Point_3& q) const - { + { typename K::Construct_point_3 construct_point_3; FT x, y, z; midpointC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), x, y, z); @@ -2236,7 +2236,7 @@ namespace CartesianKernelFunctors { Vector_3 operator()( const Point_3& p, const Point_3& q, const Point_3& r ) const - { + { FT rpx = p.x()-r.x(); FT rpy = p.y()-r.y(); FT rpz = p.z()-r.z(); @@ -2248,8 +2248,8 @@ namespace CartesianKernelFunctors { FT vy = rpz*rqx - rqz*rpx; FT vz = rpx*rqy - rqx*rpy; typename K::Construct_vector_3 construct_vector; - - return construct_vector(vx, vy, vz); + + return construct_vector(vx, vy, vz); } }; @@ -2263,7 +2263,7 @@ namespace CartesianKernelFunctors { Vector_2 operator()( const Vector_2& v, Orientation o) const - { + { CGAL_kernel_precondition( o != COLLINEAR ); if (o == COUNTERCLOCKWISE) return K().construct_vector_2_object()(-v.y(), v.x()); @@ -2282,7 +2282,7 @@ namespace CartesianKernelFunctors { Direction_2 operator()( const Direction_2& d, Orientation o) const - { + { CGAL_kernel_precondition( o != COLLINEAR ); if (o == COUNTERCLOCKWISE) return K().construct_direction_2_object()(-d.dy(), d.dx()); @@ -2303,7 +2303,7 @@ namespace CartesianKernelFunctors { Line_2 operator()( const Line_2& l, const Point_2& p) const - { + { typename K::FT fta, ftb, ftc; perpendicular_through_pointC2(l.a(), l.b(), p.x(), p.y(), fta, ftb, ftc); return Line_2(fta, ftb, ftc); @@ -2333,23 +2333,23 @@ namespace CartesianKernelFunctors { Point_2 operator()(const RT& x, const RT& y, const RT& w) const { return Rep(x, y, w); } - + Point_2 operator()(const Line_2& l) const - { + { typename K::Construct_point_2 construct_point_2; typename K::FT x, y; line_get_pointC2(l.a(), l.b(), l.c(), 0, x, y); - return construct_point_2(x,y); + return construct_point_2(x,y); } Point_2 operator()(const Line_2& l, int i) const - { + { typename K::Construct_point_2 construct_point_2; typename K::FT x, y; line_get_pointC2(l.a(), l.b(), l.c(), i, x, y); - return construct_point_2(x,y); + return construct_point_2(x,y); } }; @@ -2364,7 +2364,7 @@ namespace CartesianKernelFunctors { Point_2 operator()( const Line_2& l, const Point_2& p ) const - { + { typename K::FT x, y; typename K::Construct_point_2 construct_point_2; line_project_pointC2(l.a(), l.b(), l.c(), p.x(), p.y(), x, y); @@ -2419,7 +2419,7 @@ namespace CartesianKernelFunctors { Vector_2 operator()( const Vector_2& v, const FT& c) const - { + { return Vector_2(c * v.x(), c * v.y()); } }; @@ -2435,7 +2435,7 @@ namespace CartesianKernelFunctors { Vector_2 operator()( const Vector_2& v, const FT& c) const - { + { return Vector_2(v.x()/c, v.y()/c); } }; @@ -2451,7 +2451,7 @@ namespace CartesianKernelFunctors { Vector_3 operator()( const Vector_3& v, const FT& c) const - { + { return Vector_3(v.x()/c, v.y()/c, v.z()/c); } }; @@ -2467,7 +2467,7 @@ namespace CartesianKernelFunctors { Vector_3 operator()( const Vector_3& w, const FT& c) const - { + { return Vector_3(c * w.x(), c * w.y(), c * w.z()); } }; @@ -2483,14 +2483,14 @@ namespace CartesianKernelFunctors { Point_2 operator()( const Point_2& p, const Vector_2& v) const - { + { typename K::Construct_point_2 construct_point_2; return construct_point_2(p.x() + v.x(), p.y() + v.y()); } - + Point_2 operator()( const Origin& , const Vector_2& v) const - { + { typename K::Construct_point_2 construct_point_2; return construct_point_2(v.x(), v.y()); } @@ -2507,14 +2507,14 @@ namespace CartesianKernelFunctors { Point_3 operator()( const Point_3& p, const Vector_3& v) const - { + { typename K::Construct_point_3 construct_point_3; return construct_point_3(p.x() + v.x(), p.y() + v.y(), p.z() + v.z()); } Point_3 operator()( const Origin& , const Vector_3& v) const - { + { typename K::Construct_point_3 construct_point_3; return construct_point_3(v.x(), v.y(), v.z()); } @@ -2596,19 +2596,19 @@ namespace CartesianKernelFunctors { Vector_3 operator()( const Point_3& p, const Point_3& q) const - { + { return Rep(q.x() - p.x(), q.y() - p.y(), q.z() - p.z()); } Vector_3 operator()( const Origin&, const Point_3& q) const - { + { return Rep(q.x(), q.y(), q.z()); } Vector_3 operator()( const Point_3& p, const Origin&) const - { + { return Rep(- p.x(), - p.y(), - p.z()); } @@ -2664,7 +2664,7 @@ namespace CartesianKernelFunctors { Point_2 operator()( const Iso_rectangle_2& r, int i) const - { + { switch (i%4) { case 0: return r.min(); case 1: return Point_2(r.xmax(), r.ymin()); @@ -2698,26 +2698,26 @@ namespace CartesianKernelFunctors { class Coplanar_orientation_3 { typedef typename K::Point_3 Point_3; -#ifdef CGAL_kernel_exactness_preconditions +#ifdef CGAL_kernel_exactness_preconditions typedef typename K::Coplanar_3 Coplanar_3; typedef typename K::Collinear_3 Collinear_3; Coplanar_3 cp; Collinear_3 cl; -#endif // CGAL_kernel_exactness_preconditions +#endif // CGAL_kernel_exactness_preconditions public: typedef typename K::Orientation result_type; typedef Arity_tag< 4 > Arity; -#ifdef CGAL_kernel_exactness_preconditions +#ifdef CGAL_kernel_exactness_preconditions Coplanar_orientation_3() {} - Coplanar_orientation_3(const Coplanar_3& cp_, const Collinear_3& cl_) + Coplanar_orientation_3(const Coplanar_3& cp_, const Collinear_3& cl_) : cp(cp_), cl(cl_) {} -#endif // CGAL_kernel_exactness_preconditions +#endif // CGAL_kernel_exactness_preconditions result_type operator()(const Point_3& p, const Point_3& q, const Point_3& r) const - { + { return coplanar_orientationC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), r.x(), r.y(), r.z()); @@ -2726,7 +2726,7 @@ namespace CartesianKernelFunctors { result_type operator()( const Point_3& p, const Point_3& q, const Point_3& r, const Point_3& s) const - { + { // p,q,r,s supposed to be coplanar // p,q,r supposed to be non collinear // tests whether s is on the same side of p,q as r @@ -2747,31 +2747,31 @@ namespace CartesianKernelFunctors { class Coplanar_side_of_bounded_circle_3 { typedef typename K::Point_3 Point_3; -#ifdef CGAL_kernel_exactness_preconditions +#ifdef CGAL_kernel_exactness_preconditions typedef typename K::Coplanar_3 Coplanar_3; typedef typename K::Collinear_3 Collinear_3; Coplanar_3 cp; Collinear_3 cl; -#endif // CGAL_kernel_exactness_preconditions +#endif // CGAL_kernel_exactness_preconditions public: typedef typename K::Bounded_side result_type; typedef Arity_tag< 4 > Arity; -#ifdef CGAL_kernel_exactness_preconditions +#ifdef CGAL_kernel_exactness_preconditions Coplanar_side_of_bounded_circle_3() {} - Coplanar_side_of_bounded_circle_3(const Coplanar_3& cp_, - const Collinear_3& cl_) + Coplanar_side_of_bounded_circle_3(const Coplanar_3& cp_, + const Collinear_3& cl_) : cp(cp_), cl(cl_) {} -#endif // CGAL_kernel_exactness_preconditions +#endif // CGAL_kernel_exactness_preconditions result_type operator()( const Point_3& p, const Point_3& q, const Point_3& r, const Point_3& t) const - { + { // p,q,r,t are supposed to be coplanar. // p,q,r determine an orientation of this plane (not collinear). - // returns the equivalent of side_of_bounded_circle(p,q,r,t) + // returns the equivalent of side_of_bounded_circle(p,q,r,t) // in this plane CGAL_kernel_exactness_precondition( cp(p,q,r,t) ); CGAL_kernel_exactness_precondition( !cl(p,q,r) ); @@ -2792,7 +2792,7 @@ namespace CartesianKernelFunctors { result_type operator()( const Point_3& p, const Point_3& q) const - { + { return p.x() == q.x() && p.y() == q.y(); } }; @@ -2922,9 +2922,9 @@ namespace CartesianKernelFunctors { result_type operator()(const Point_2& p, const Point_2& q, const Point_2& r) const - { - return has_smaller_dist_to_pointC2(p.x(), p.y(), - q.x(), q.y(), + { + return has_smaller_dist_to_pointC2(p.x(), p.y(), + q.x(), q.y(), r.x(), r.y()); } }; @@ -2939,7 +2939,7 @@ namespace CartesianKernelFunctors { result_type operator()(const Point_3& p, const Point_3& q, const Point_3& r) const - { + { return has_smaller_dist_to_pointC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), r.x(), r.y(), r.z()); @@ -2963,7 +2963,7 @@ namespace CartesianKernelFunctors { { CGAL_kernel_precondition_code(Equal_2 equal;) CGAL_kernel_precondition(! equal(a,b)); - return cmp_signed_dist_to_lineC2( a.x(), a.y(), + return cmp_signed_dist_to_lineC2( a.x(), a.y(), b.x(), b.y(), c.x(), c.y(), d.x(), d.y()) == SMALLER; @@ -2972,7 +2972,7 @@ namespace CartesianKernelFunctors { result_type operator()(const Line_2& l, const Point_2& p, const Point_2& q) const { - return has_smaller_signed_dist_to_directionC2(l.a(), l.b(), + return has_smaller_signed_dist_to_directionC2(l.a(), l.b(), p.x(), p.y(), q.x(), q.y()); } @@ -2990,7 +2990,7 @@ namespace CartesianKernelFunctors { result_type operator()( const Plane_3& h, const Point_3& p, const Point_3& q) const - { + { return has_smaller_signed_dist_to_directionC3(h.a(), h.b(), h.c(), p.x(), p.y(), p.z(), q.x(), q.y(), q.z()); @@ -2999,7 +2999,7 @@ namespace CartesianKernelFunctors { result_type operator()( const Point_3& hp, const Point_3& hq, const Point_3& hr, const Point_3& p, const Point_3& q) const - { + { CGAL_kernel_precondition_code(Collinear_3 collinear_3;) CGAL_kernel_precondition(! collinear_3(hp, hq, hr)); return has_smaller_signed_dist_to_planeC3(hp.x(), hp.y(), hp.z(), @@ -3100,9 +3100,9 @@ namespace CartesianKernelFunctors { result_type operator()( const Point_2& p, const Point_2& q) const - { - return compare_lexicographically_xyC2(p.y(), p.x(), - q.y(), q.x()) == SMALLER; + { + return compare_lexicographically_xyC2(p.y(), p.x(), + q.y(), q.x()) == SMALLER; } }; @@ -3157,19 +3157,19 @@ namespace CartesianKernelFunctors { result_type operator()(const Point_2& p, const Point_2& q, const Point_2& r) const - { + { return orientationC2(p.x(), p.y(), q.x(), q.y(), r.x(), r.y()); } result_type operator()(const Vector_2& u, const Vector_2& v) const - { + { return orientationC2(u.x(), u.y(), v.x(), v.y()); } result_type operator()(const Circle_2& c) const - { + { return c.rep().orientation(); } }; @@ -3188,7 +3188,7 @@ namespace CartesianKernelFunctors { result_type operator()( const Point_3& p, const Point_3& q, const Point_3& r, const Point_3& s) const - { + { return orientationC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), r.x(), r.y(), r.z(), @@ -3197,7 +3197,7 @@ namespace CartesianKernelFunctors { result_type operator()( const Vector_3& u, const Vector_3& v, const Vector_3& w) const - { + { return orientationC3(u.x(), u.y(), u.z(), v.x(), v.y(), v.z(), w.x(), w.y(), w.z()); @@ -3205,13 +3205,13 @@ namespace CartesianKernelFunctors { result_type operator()( const Tetrahedron_3& t) const - { + { return t.rep().orientation(); } result_type operator()(const Sphere_3& s) const - { + { return s.rep().orientation(); } }; @@ -3237,8 +3237,8 @@ namespace CartesianKernelFunctors { result_type operator()( const Triangle_2& t, const Point_2& p) const - { - typename K::Collinear_are_ordered_along_line_2 + { + typename K::Collinear_are_ordered_along_line_2 collinear_are_ordered_along_line; typename K::Orientation_2 orientation; // depends on the orientation of the vertices @@ -3271,16 +3271,16 @@ namespace CartesianKernelFunctors { result_type operator()( const Point_2& p, const Point_2& q, const Point_2& t) const - { - return side_of_bounded_circleC2(p.x(), p.y(), - q.x(), q.y(), + { + return side_of_bounded_circleC2(p.x(), p.y(), + q.x(), q.y(), t.x(), t.y()); } result_type operator()( const Point_2& p, const Point_2& q, const Point_2& r, const Point_2& t) const - { + { return side_of_bounded_circleC2(p.x(), p.y(), q.x(), q.y(), r.x(), r.y(), t.x(), t.y()); } @@ -3296,7 +3296,7 @@ namespace CartesianKernelFunctors { result_type operator()( const Point_3& p, const Point_3& q, const Point_3& test) const - { + { return side_of_bounded_sphereC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), test.x(), test.y(), test.z()); @@ -3336,8 +3336,8 @@ namespace CartesianKernelFunctors { operator()( const Point_2& p, const Point_2& q, const Point_2& r, const Point_2& t) const { - return side_of_oriented_circleC2(p.x(), p.y(), - q.x(), q.y(), + return side_of_oriented_circleC2(p.x(), p.y(), + q.x(), q.y(), r.x(), r.y(), t.x(), t.y()); } @@ -3354,7 +3354,7 @@ namespace CartesianKernelFunctors { result_type operator()( const Point_3& p, const Point_3& q, const Point_3& r, const Point_3& s, const Point_3& test) const - { + { return side_of_oriented_sphereC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), r.x(), r.y(), r.z(), diff --git a/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h b/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h index 7f6252e356c..7c8cd87c07a 100644 --- a/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h +++ b/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h @@ -17,7 +17,7 @@ // // $URL$ // $Id$ -// +// // // Author(s) : Stefan Schirra, Sylvain Pion, Michael Hoffmann @@ -49,13 +49,13 @@ namespace HomogeneousKernelFunctors { public: typedef typename K::Angle result_type; typedef Arity_tag< 3 > Arity; - + Angle_2() {} Angle_2(const Construct_vector_2& c_) : c(c_) {} result_type operator()(const Point_2& p, const Point_2& q, const Point_2& r) const - { return enum_cast(CGAL_NTS sign(c(q,p) * c(q,r))); } + { return enum_cast(CGAL_NTS sign(c(q,p) * c(q,r))); } // FIXME: scalar product }; @@ -74,7 +74,7 @@ namespace HomogeneousKernelFunctors { result_type operator()(const Point_3& p, const Point_3& q, const Point_3& r) const - { return enum_cast(CGAL_NTS sign(c(q,p) * c(q,r))); } + { return enum_cast(CGAL_NTS sign(c(q,p) * c(q,r))); } // FIXME: scalar product }; @@ -92,7 +92,7 @@ namespace HomogeneousKernelFunctors { result_type operator()( const Circle_2& c, const Point_2& p) const - { + { typename K::Compute_squared_distance_2 squared_distance; return enum_cast(CGAL_NTS compare(c.squared_radius(), squared_distance(c.center(),p))); @@ -100,14 +100,14 @@ namespace HomogeneousKernelFunctors { result_type operator()( const Triangle_2& t, const Point_2& p) const - { - typename K::Collinear_are_ordered_along_line_2 + { + typename K::Collinear_are_ordered_along_line_2 collinear_are_ordered_along_line; typename K::Orientation_2 orientation; typename K::Orientation o1 = orientation(t.vertex(0), t.vertex(1), p), o2 = orientation(t.vertex(1), t.vertex(2), p), o3 = orientation(t.vertex(2), t.vertex(3), p); - + if (o2 == o1 && o3 == o1) return ON_BOUNDED_SIDE; return @@ -123,8 +123,8 @@ namespace HomogeneousKernelFunctors { result_type operator()( const Iso_rectangle_2& r, const Point_2& p) const - { - return r.rep().bounded_side(p); + { + return r.rep().bounded_side(p); } }; @@ -228,18 +228,18 @@ namespace HomogeneousKernelFunctors { { typedef typename K::RT RT; typedef typename K::Point_2 Point_2; -#ifdef CGAL_kernel_exactness_preconditions +#ifdef CGAL_kernel_exactness_preconditions typedef typename K::Collinear_2 Collinear_2; Collinear_2 c; -#endif // CGAL_kernel_exactness_preconditions +#endif // CGAL_kernel_exactness_preconditions public: typedef typename K::Bool_type result_type; typedef Arity_tag< 3 > Arity; -#ifdef CGAL_kernel_exactness_preconditions +#ifdef CGAL_kernel_exactness_preconditions Collinear_are_ordered_along_line_2() {} Collinear_are_ordered_along_line_2(const Collinear_2& c_) : c(c_) {} -#endif // CGAL_kernel_exactness_preconditions +#endif // CGAL_kernel_exactness_preconditions result_type operator()(const Point_2& p, const Point_2& q, const Point_2& r) const @@ -279,18 +279,18 @@ namespace HomogeneousKernelFunctors { class Collinear_are_ordered_along_line_3 { typedef typename K::Point_3 Point_3; -#ifdef CGAL_kernel_exactness_preconditions +#ifdef CGAL_kernel_exactness_preconditions typedef typename K::Collinear_3 Collinear_3; Collinear_3 c; -#endif // CGAL_kernel_exactness_preconditions +#endif // CGAL_kernel_exactness_preconditions public: typedef typename K::Bool_type result_type; typedef Arity_tag< 3 > Arity; -#ifdef CGAL_kernel_exactness_preconditions +#ifdef CGAL_kernel_exactness_preconditions Collinear_are_ordered_along_line_3() {} Collinear_are_ordered_along_line_3(const Collinear_3& c_) : c(c_) {} -#endif // CGAL_kernel_exactness_preconditions +#endif // CGAL_kernel_exactness_preconditions result_type operator()(const Point_3& p, const Point_3& q, const Point_3& r) const @@ -354,26 +354,26 @@ namespace HomogeneousKernelFunctors { } // p == r return ((rqx == qrx) && (rqy == qry) && (rqz == qrz)); - } + } }; template class Collinear_are_strictly_ordered_along_line_2 { typedef typename K::Point_2 Point_2; -#ifdef CGAL_kernel_exactness_preconditions +#ifdef CGAL_kernel_exactness_preconditions typedef typename K::Collinear_2 Collinear_2; Collinear_2 c; -#endif // CGAL_kernel_exactness_preconditions +#endif // CGAL_kernel_exactness_preconditions public: typedef typename K::Bool_type result_type; typedef Arity_tag< 3 > Arity; -#ifdef CGAL_kernel_exactness_preconditions +#ifdef CGAL_kernel_exactness_preconditions Collinear_are_strictly_ordered_along_line_2() {} - Collinear_are_strictly_ordered_along_line_2(const Collinear_2& c_) : c(c_) + Collinear_are_strictly_ordered_along_line_2(const Collinear_2& c_) : c(c_) {} -#endif // CGAL_kernel_exactness_preconditions +#endif // CGAL_kernel_exactness_preconditions result_type operator()(const Point_2& p, const Point_2& q, const Point_2& r) const @@ -413,19 +413,19 @@ namespace HomogeneousKernelFunctors { { typedef typename K::Point_3 Point_3; typedef typename K::Direction_3 Direction_3; -#ifdef CGAL_kernel_exactness_preconditions +#ifdef CGAL_kernel_exactness_preconditions typedef typename K::Collinear_3 Collinear_3; Collinear_3 c; -#endif // CGAL_kernel_exactness_preconditions +#endif // CGAL_kernel_exactness_preconditions public: typedef typename K::Bool_type result_type; typedef Arity_tag< 3 > Arity; -#ifdef CGAL_kernel_exactness_preconditions +#ifdef CGAL_kernel_exactness_preconditions Collinear_are_strictly_ordered_along_line_3() {} Collinear_are_strictly_ordered_along_line_3(const Collinear_3& c_) : c(c_) {} -#endif // CGAL_kernel_exactness_preconditions +#endif // CGAL_kernel_exactness_preconditions result_type operator()(const Point_3& p, const Point_3& q, const Point_3& r) const @@ -465,13 +465,13 @@ namespace HomogeneousKernelFunctors { result_type operator()( const Ray_2& r, const Point_2& p) const { - const Point_2 & source = cp(r,0); + const Point_2 & source = cp(r,0); return p == source || Direction_2(p - source) == r.direction(); } // FIXME - + result_type operator()( const Segment_2& s, const Point_2& p) const - { + { return co(cp(s,0), p, cp(s,1)); } }; @@ -524,7 +524,7 @@ namespace HomogeneousKernelFunctors { std::cerr << "det: " << det << " det_old: " << det_old << flush; } */ - + return CGAL_NTS is_zero(det); } }; @@ -581,12 +581,12 @@ namespace HomogeneousKernelFunctors { // COLLINEAR == EQUAL ( == 0 ) // CLOCKWISE == SMALLER ( == -1 ) } - + // ( y_sign1 * y_sign2 == 0 ) - + bool b1 = (y_sign1 == 0) && (x_sign1 >= 0); bool b2 = (y_sign2 == 0) && (x_sign2 >= 0); - + if ( b1 ) { return b2 ? EQUAL : SMALLER; } if ( b2 ) { return b1 ? EQUAL : LARGER; } if ( y_sign1 == y_sign2 ) // == 0 @@ -659,7 +659,7 @@ namespace HomogeneousKernelFunctors { result_type operator()(const Point_3& p, const Point_3& q, const Point_3& r) const - { + { typedef typename K::RT RT; const RT & phx = p.hx(); @@ -699,13 +699,13 @@ namespace HomogeneousKernelFunctors { result_type operator()(const Line_2& l1, const Line_2& l2) const - { + { typedef typename K::RT RT; if (l1.is_horizontal()) - return l2.is_vertical() ? + return l2.is_vertical() ? SMALLER : enum_cast(CGAL_NTS sign(l2.a() * l2.b())); - if (l2.is_horizontal()) - return l1.is_vertical() ? + if (l2.is_horizontal()) + return l1.is_vertical() ? LARGER : enum_cast(- CGAL_NTS sign(l1.a() * l1.b())); if (l1.is_vertical()) return l2.is_vertical() ? EQUAL : LARGER; if (l2.is_vertical()) return SMALLER; @@ -725,7 +725,7 @@ namespace HomogeneousKernelFunctors { result_type operator()(const Segment_2& s1, const Segment_2& s2) const - { + { typedef typename K::FT FT; typename K::Comparison_result cmp_y1 = compare_y(s1.source(), s1.target()); @@ -771,7 +771,7 @@ namespace HomogeneousKernelFunctors { FT s2_ydiff = s2.source().hy()*s2_t_hw - s2.target().hy()*s2_s_hw; typename K::Sign s1_sign = CGAL_NTS sign(s1_ydiff * s1_xdiff); typename K::Sign s2_sign = CGAL_NTS sign(s2_ydiff * s2_xdiff); - + if (s1_sign < s2_sign) return SMALLER; if (s1_sign > s2_sign) return LARGER; @@ -835,7 +835,7 @@ namespace HomogeneousKernelFunctors { result_type operator()( const Point_3& p, const Point_3& q) const - { + { typedef typename K::RT RT; RT pV = p.hx()*q.hw(); RT qV = q.hx()*p.hw(); @@ -875,7 +875,7 @@ namespace HomogeneousKernelFunctors { result_type operator()( const Point_2& p, const Point_2& q) const - { + { typedef typename K::RT RT; const RT& phx = p.hx(); @@ -906,7 +906,7 @@ namespace HomogeneousKernelFunctors { result_type operator()( const Point_2& p, const Point_2& q) const - { + { typedef typename K::RT RT; const RT& phx = p.hx(); @@ -937,7 +937,7 @@ namespace HomogeneousKernelFunctors { result_type operator()( const Point_3& p, const Point_3& q) const - { + { typedef typename K::RT RT; RT pV = p.hx()*q.hw(); RT qV = q.hx()*p.hw(); @@ -987,7 +987,7 @@ namespace HomogeneousKernelFunctors { result_type operator()( const Line_2& l1, const Line_2& l2, const Line_2& h1, const Line_2& h2) const - { + { Point_2 lip = gp_linear_intersection( l1, l2 ); Point_2 hip = gp_linear_intersection( h1, h2 ); return this->operator()(lip, hip); @@ -1019,7 +1019,7 @@ namespace HomogeneousKernelFunctors { result_type operator()( const Point_2& p, const Line_2& h) const - { + { typedef typename K::RT RT; CGAL_kernel_precondition( ! h.is_vertical() ); typename K::Oriented_side ors = h.oriented_side( p ); @@ -1027,7 +1027,7 @@ namespace HomogeneousKernelFunctors { ors = opposite( ors ); return enum_cast(ors); } // FIXME - + result_type operator()( const Point_2& p, const Line_2& h1, const Line_2& h2) const { return CGAL_NTS compare(h1.y_at_x( p.x() ), h2.y_at_x( p.x() )); } @@ -1076,7 +1076,7 @@ namespace HomogeneousKernelFunctors { operator()( const Point_2& p, const Segment_2& s1, const Segment_2& s2) const { - // compares the y-coordinates of the vertical projections + // compares the y-coordinates of the vertical projections // of p on s1 and s2 // Precondition : p is in the x-range of s1 and s2. // - if one or two segments are vertical : @@ -1141,9 +1141,9 @@ namespace HomogeneousKernelFunctors { result_type operator()( const Point_2& p, const Point_2& q) const - { + { typedef typename K::RT RT; - + const RT& phy = p.hy(); const RT& phw = p.hw(); const RT& qhy = q.hy(); @@ -1153,7 +1153,7 @@ namespace HomogeneousKernelFunctors { result_type operator()( const Point_2& p, const Line_2& l1, const Line_2& l2) const - { + { Point_2 ip = gp_linear_intersection( l1, l2 ); return compare_y( p, ip ); } // FIXME @@ -1324,7 +1324,7 @@ namespace HomogeneousKernelFunctors { FT operator()( const Point_2& p, const Point_2& q) const - { + { typedef typename K::FT FT; return squared_distance(p, q)/FT(4); } // FIXME @@ -1365,7 +1365,7 @@ namespace HomogeneousKernelFunctors { FT operator()( const Point_3& p, const Point_3& q, const Point_3& r, const Point_3& s) const - { + { return squared_distance(p, circumcenter(p, q, r, s)); } // FIXME }; @@ -1807,7 +1807,7 @@ namespace HomogeneousKernelFunctors { typedef typename K::Vector_3 Vector_3; typedef typename K::Plane_3 Plane_3; typedef typename K::RT RT; - typedef typename K::Construct_orthogonal_vector_3 + typedef typename K::Construct_orthogonal_vector_3 Construct_orthogonal_vector_3; Construct_orthogonal_vector_3 co; public: @@ -1818,7 +1818,7 @@ namespace HomogeneousKernelFunctors { Construct_base_vector_3(const Construct_orthogonal_vector_3& co_) : co(co_) {} - + Vector_3 operator()( const Plane_3& h, int index ) const { @@ -1831,7 +1831,7 @@ namespace HomogeneousKernelFunctors { // a() != RT0 : Point_3( -b()-d(), a(), RT0, a() ); // b() != RT0 : Point_3( RT0, -c()-d(), b(), b() ); // : Point_3( c(), RT0, -a()-d(), c() ); - + const RT RT0(0); if ( h.a() != RT0 ) { @@ -1865,56 +1865,56 @@ namespace HomogeneousKernelFunctors { public: typedef Bbox_2 result_type; typedef Arity_tag< 1 > Arity; - + Bbox_2 operator()( const Point_2& p) const - { + { Interval_nt<> ihx = CGAL_NTS to_interval(p.hx()); Interval_nt<> ihy = CGAL_NTS to_interval(p.hy()); Interval_nt<> ihw = CGAL_NTS to_interval(p.hw()); - + Interval_nt<> ix = ihx/ihw; Interval_nt<> iy = ihy/ihw; - + return Bbox_2(ix.inf(), iy.inf(), ix.sup(), iy.sup()); } - + Bbox_2 operator()( const Segment_2& s) const { return s.source().bbox() + s.target().bbox(); } Bbox_2 operator()( const Triangle_2& t) const - { + { typename K::Construct_bbox_2 construct_bbox_2; - return construct_bbox_2(t.vertex(0)) - + construct_bbox_2(t.vertex(1)) + return construct_bbox_2(t.vertex(0)) + + construct_bbox_2(t.vertex(1)) + construct_bbox_2(t.vertex(2)); } Bbox_2 operator()( const Iso_rectangle_2& r) const - { + { typename K::Construct_bbox_2 construct_bbox_2; - return construct_bbox_2(r.min()) + construct_bbox_2(r.max()); + return construct_bbox_2(r.min()) + construct_bbox_2(r.max()); } Bbox_2 operator()( const Circle_2& c) const - { + { typename K::Construct_bbox_2 construct_bbox_2; Bbox_2 b = construct_bbox_2(c.center()); Interval_nt<> x (b.xmin(), b.xmax()); Interval_nt<> y (b.ymin(), b.ymax()); - + Interval_nt<> sqr = CGAL_NTS to_interval(c.squared_radius()); Interval_nt<> r = CGAL::sqrt(sqr); Interval_nt<> minx = x-r; Interval_nt<> maxx = x+r; Interval_nt<> miny = y-r; Interval_nt<> maxy = y+r; - + return Bbox_2(minx.inf(), miny.inf(), maxx.sup(), maxy.sup()); } }; @@ -1945,7 +1945,7 @@ namespace HomogeneousKernelFunctors { RT a = RT(2) * ( phx*phw*qhw*qhw - qhx*qhw*phw*phw ); RT b = RT(2) * ( phy*phw*qhw*qhw - qhy*qhw*phw*phw ); - RT c = qhx*qhx*phw*phw + qhy*qhy*phw*phw + RT c = qhx*qhx*phw*phw + qhy*qhy*phw*phw - phx*phx*qhw*qhw - phy*phy*qhw*qhw; return Line_2( a, b, c ); @@ -2040,7 +2040,7 @@ namespace HomogeneousKernelFunctors { } Point_2 - operator()(const Point_2& p, const Point_2& q, + operator()(const Point_2& p, const Point_2& q, const Point_2& r, const Point_2& s) const { typedef typename K::RT RT; @@ -2048,7 +2048,7 @@ namespace HomogeneousKernelFunctors { const RT qhw(q.hw()); const RT rhw(r.hw()); const RT shw(s.hw()); - RT hx(p.hx()*qhw*rhw*shw + q.hx()*phw*rhw*shw + r.hx()*phw*qhw*shw + RT hx(p.hx()*qhw*rhw*shw + q.hx()*phw*rhw*shw + r.hx()*phw*qhw*shw + s.hx()*phw*qhw*rhw); RT hy(p.hy()*qhw*rhw*shw + q.hy()*phw*rhw*shw + r.hy()*phw*qhw*shw + s.hy()*phw*qhw*rhw); @@ -2070,7 +2070,7 @@ namespace HomogeneousKernelFunctors { Point_3 operator()(const Point_3& p, const Point_3& q, const Point_3& r) const - { + { const RT& phw = p.hw(); const RT& qhw = q.hw(); const RT& rhw = r.hw(); @@ -2082,7 +2082,7 @@ namespace HomogeneousKernelFunctors { } Point_3 - operator()(const Point_3& p, const Point_3& q, + operator()(const Point_3& p, const Point_3& q, const Point_3& r, const Point_3& s) const { const RT& phw = p.hw(); @@ -2125,7 +2125,7 @@ namespace HomogeneousKernelFunctors { Point_2 operator()(const Point_2& p, const Point_2& q, const Point_2& r) const - { + { typedef typename K::RT RT; const RT & phx = p.hx(); const RT & phy = p.hy(); @@ -2140,18 +2140,18 @@ namespace HomogeneousKernelFunctors { #ifdef CGAL_EXPANDED_CIRCUMCENTER_COMPUTATION RT vvx = ( qhy*qhw*phw*phw - phy*phw*qhw*qhw ) - *( phx*phx*rhw*rhw + phy*phy*rhw*rhw - + *( phx*phx*rhw*rhw + phy*phy*rhw*rhw - rhx*rhx*phw*phw - rhy*rhy*phw*phw ) - ( rhy*rhw*phw*phw - phy*phw*rhw*rhw ) - *( phx*phx*qhw*qhw + phy*phy*qhw*qhw - + *( phx*phx*qhw*qhw + phy*phy*qhw*qhw - qhx*qhx*phw*phw - qhy*qhy*phw*phw ); RT vvy = - ( qhx*qhw*phw*phw - phx*phw*qhw*qhw ) - *( phx*phx*rhw*rhw + phy*phy*rhw*rhw - + *( phx*phx*rhw*rhw + phy*phy*rhw*rhw - rhx*rhx*phw*phw - rhy*rhy*phw*phw ) + ( rhx*rhw*phw*phw - phx*phw*rhw*rhw ) - *( phx*phx*qhw*qhw + phy*phy*qhw*qhw - + *( phx*phx*qhw*qhw + phy*phy*qhw*qhw - qhx*qhx*phw*phw - qhy*qhy*phw*phw ); RT vvw = RT(2) * @@ -2167,10 +2167,10 @@ namespace HomogeneousKernelFunctors { RT ry_py = ( rhy*rhw*phw*phw - phy*phw*rhw*rhw ); RT px2_py2_rx2_ry_2 = - phx*phx*rhw*rhw + phy*phy*rhw*rhw - + phx*phx*rhw*rhw + phy*phy*rhw*rhw - rhx*rhx*phw*phw - rhy*rhy*phw*phw ; RT px2_py2_qx2_qy_2 = - phx*phx*qhw*qhw + phy*phy*qhw*qhw - + phx*phx*qhw*qhw + phy*phy*qhw*qhw - qhx*qhx*phw*phw - qhy*qhy*phw*phw ; RT vvx = qy_py * px2_py2_rx2_ry_2 - ry_py * px2_py2_qx2_qy_2; @@ -2201,7 +2201,7 @@ namespace HomogeneousKernelFunctors { Point_3 operator()(const Point_3& p, const Point_3& q, const Point_3& r) const - { + { return gp_linear_intersection( Plane_3(p,q,r), bisector(p,q), bisector(p,r)); @@ -2308,7 +2308,7 @@ namespace HomogeneousKernelFunctors { template class Construct_difference_of_vectors_2 { - typedef typename K::Vector_2 Vector_2; + typedef typename K::Vector_2 Vector_2; public: typedef Vector_2 result_type; typedef Arity_tag< 2 > Arity; @@ -2325,7 +2325,7 @@ namespace HomogeneousKernelFunctors { template class Construct_difference_of_vectors_3 { - typedef typename K::Vector_3 Vector_3; + typedef typename K::Vector_3 Vector_3; public: typedef Vector_3 result_type; typedef Arity_tag< 2 > Arity; @@ -2426,7 +2426,7 @@ namespace HomogeneousKernelFunctors { template class Construct_sum_of_vectors_2 { - typedef typename K::Vector_2 Vector_2; + typedef typename K::Vector_2 Vector_2; public: typedef Vector_2 result_type; typedef Arity_tag< 2 > Arity; @@ -2443,7 +2443,7 @@ namespace HomogeneousKernelFunctors { template class Construct_sum_of_vectors_3 { - typedef typename K::Vector_3 Vector_3; + typedef typename K::Vector_3 Vector_3; public: typedef Vector_3 result_type; typedef Arity_tag< 2 > Arity; @@ -2463,7 +2463,7 @@ namespace HomogeneousKernelFunctors { { typedef typename K::FT FT; typedef typename K::RT RT; - typedef typename K::Vector_2 Vector_2; + typedef typename K::Vector_2 Vector_2; public: typedef Vector_2 result_type; typedef Arity_tag< 2 > Arity; @@ -2472,7 +2472,7 @@ namespace HomogeneousKernelFunctors { operator()(const Vector_2& v, const FT& f ) const { return Vector_2( v.hx()*f.denominator(), v.hy()*f.denominator(), - v.hw()*f.numerator() ); + v.hw()*f.numerator() ); } Vector_2 @@ -2487,7 +2487,7 @@ namespace HomogeneousKernelFunctors { { typedef typename K::FT FT; typedef typename K::RT RT; - typedef typename K::Vector_3 Vector_3; + typedef typename K::Vector_3 Vector_3; public: typedef Vector_3 result_type; typedef Arity_tag< 2 > Arity; @@ -2496,7 +2496,7 @@ namespace HomogeneousKernelFunctors { operator()(const Vector_3& v, const FT& f ) const { return Vector_3( v.hx()*f.denominator(), v.hy()*f.denominator(), - v.hz()*f.denominator(), v.hw()*f.numerator() ); + v.hz()*f.denominator(), v.hw()*f.numerator() ); } Vector_3 @@ -2554,7 +2554,7 @@ namespace HomogeneousKernelFunctors { Iso_rectangle_2 operator()(const Point_2 &left, const Point_2 &right, const Point_2 &bottom, const Point_2 &top) const - { + { CGAL_kernel_assertion_code(typename K::Less_x_2 less_x;) CGAL_kernel_assertion_code(typename K::Less_y_2 less_y;) CGAL_kernel_assertion(!less_x(right, left)); @@ -2568,7 +2568,7 @@ namespace HomogeneousKernelFunctors { } Iso_rectangle_2 - operator()(const RT& min_hx, const RT& min_hy, + operator()(const RT& min_hx, const RT& min_hy, const RT& max_hx, const RT& max_hy) const { CGAL_kernel_precondition(min_hx <= max_hx); @@ -2578,7 +2578,7 @@ namespace HomogeneousKernelFunctors { } Iso_rectangle_2 - operator()(const RT& min_hx, const RT& min_hy, + operator()(const RT& min_hx, const RT& min_hy, const RT& max_hx, const RT& max_hy, const RT& hw) const { return Rep(Point_2(min_hx, min_hy, hw), @@ -2600,7 +2600,7 @@ namespace HomogeneousKernelFunctors { Point_3 operator()(const Plane_3& h, const Point_2& p) const - { + { Point_3 hp( p.hx(), p.hy(), RT(0.0), p.hw()); return hp.transform( h.transform_to_2d().inverse() ); } @@ -2633,13 +2633,13 @@ namespace HomogeneousKernelFunctors { Line_2 operator()(const Point_2& p, const Point_2& q) const - { + { return Rep( // a() * X + b() * Y + c() * W() == 0 // | X Y W | // | p.hx() p.hy() p.hw() | // | q.hx() q.hy() q.hw() | - + p.hy()*q.hw() - p.hw()*q.hy(), p.hw()*q.hx() - p.hx()*q.hw(), p.hx()*q.hy() - p.hy()*q.hx() ); @@ -2647,7 +2647,7 @@ namespace HomogeneousKernelFunctors { Line_2 operator()(const Point_2& p, const Vector_2& v) const - { + { Point_2 q = p + v; return Rep( p.hy()*q.hw() - p.hw()*q.hy(), p.hw()*q.hx() - p.hx()*q.hw(), @@ -2656,7 +2656,7 @@ namespace HomogeneousKernelFunctors { Line_2 operator()(const Point_2& p, const Direction_2& d) const - { + { Point_2 q = p + d.to_vector(); return Rep( p.hy()*q.hw() - p.hw()*q.hy(), p.hw()*q.hx() - p.hx()*q.hw(), @@ -2683,11 +2683,11 @@ namespace HomogeneousKernelFunctors { Point_2 operator()(const Point_2& p, const Point_2& q) const - { + { typedef typename K::RT RT; const RT& phw = p.hw(); const RT& qhw = q.hw(); - return Point_2( p.hx()*qhw + q.hx()*phw, + return Point_2( p.hx()*qhw + q.hx()*phw, p.hy()*qhw + q.hy()*phw, phw * qhw * RT( 2)); } @@ -2704,7 +2704,7 @@ namespace HomogeneousKernelFunctors { Point_3 operator()(const Point_3& p, const Point_3& q) const - { + { typedef typename K::RT RT; RT phw = p.hw(); RT qhw = q.hw(); @@ -2773,7 +2773,7 @@ namespace HomogeneousKernelFunctors { Vector_2 operator()( const Vector_2& v, Orientation o) const - { + { CGAL_kernel_precondition( o != COLLINEAR ); if (o == COUNTERCLOCKWISE) return K().construct_vector_2_object()(-v.hy(), v.hx(), v.hw()); @@ -2792,7 +2792,7 @@ namespace HomogeneousKernelFunctors { Direction_2 operator()( const Direction_2& d, Orientation o) const - { + { CGAL_kernel_precondition(o != COLLINEAR); if (o == COUNTERCLOCKWISE) { return Direction_2(-d.dy(), d.dx()); @@ -2844,7 +2844,7 @@ namespace HomogeneousKernelFunctors { Point_2 operator()(const Line_2& l) const - { + { CGAL_kernel_precondition( ! l.is_degenerate() ); if (l.is_vertical() ) { @@ -2860,7 +2860,7 @@ namespace HomogeneousKernelFunctors { Point_2 p = K().construct_point_2_object()(l); Vector_2 v = K().construct_vector_2_object()(l); return K().construct_translated_point_2_object() - (p, K().construct_scaled_vector_2_object()(v, RT(i))); + (p, K().construct_scaled_vector_2_object()(v, RT(i))); } }; @@ -2876,7 +2876,7 @@ namespace HomogeneousKernelFunctors { Point_2 operator()( const Line_2& l, const Point_2& p ) const - { + { CGAL_kernel_precondition( ! l.is_degenerate() ); Line_2 l2( p, Direction_2( l.a(), l.b() )); return Point_2( l.b()*l2.c() - l2.b()*l.c(), @@ -2936,7 +2936,7 @@ namespace HomogeneousKernelFunctors { Vector_2 operator()( const Vector_2& v, const RT& c) const - { + { return Vector_2(c * v.hx(), c * v.hy(), v.hw()); } @@ -2959,7 +2959,7 @@ namespace HomogeneousKernelFunctors { Vector_3 operator()( const Vector_3& v, const RT& c) const - { + { return Vector_3(c * v.hx(), c * v.hy(), c * v.hz(), v.hw()); } @@ -2981,7 +2981,7 @@ namespace HomogeneousKernelFunctors { Point_2 operator()( const Point_2& p, const Vector_2& v) const - { + { return Point_2( p.hx()*v.hw() + v.hx()*p.hw(), p.hy()*v.hw() + v.hy()*p.hw(), p.hw()*v.hw() ); @@ -2989,7 +2989,7 @@ namespace HomogeneousKernelFunctors { Point_2 operator()( const Origin&, const Vector_2& v) const - { + { return Point_2( v.hx(), v.hy(), v.hw() ); } }; @@ -3005,7 +3005,7 @@ namespace HomogeneousKernelFunctors { Point_3 operator()( const Point_3& p, const Vector_3& v) const - { + { return Point_3(p.hx()*v.hw() + v.hx()*p.hw(), p.hy()*v.hw() + v.hy()*p.hw(), p.hz()*v.hw() + v.hz()*p.hw(), @@ -3014,7 +3014,7 @@ namespace HomogeneousKernelFunctors { Point_3 operator()( const Origin&, const Vector_3& v) const - { + { return Point_3( v.hx(), v.hy(), v.hz(), v.hw() ); } }; @@ -3037,7 +3037,7 @@ namespace HomogeneousKernelFunctors { Vector_2 operator()( const Point_2& p, const Point_2& q) const - { + { return Rep( q.hx()*p.hw() - p.hx()*q.hw(), q.hy()*p.hw() - p.hy()*q.hw(), p.hw()*q.hw() ); @@ -3045,12 +3045,12 @@ namespace HomogeneousKernelFunctors { Vector_2 operator()( const Origin& , const Point_2& q) const - { + { return Rep( q.hx(), q.hy(), q.hw() ); } Vector_2 operator()( const Point_2& p, const Origin& q) const - { + { return Rep( - p.hx(), - p.hy(), p.hw() ); } @@ -3101,7 +3101,7 @@ namespace HomogeneousKernelFunctors { Vector_3 operator()( const Point_3& p, const Point_3& q) const - { + { return Rep(q.hx()*p.hw() - p.hx()*q.hw(), q.hy()*p.hw() - p.hy()*q.hw(), q.hz()*p.hw() - p.hz()*q.hw(), @@ -3110,13 +3110,13 @@ namespace HomogeneousKernelFunctors { Vector_3 operator()( const Origin&, const Point_3& q) const - { + { return Rep( q.hx(), q.hy(), q.hz(), q.hw()); } Vector_3 operator()( const Point_3& p, const Origin& q) const - { + { return Rep( - p.hx(), - p.hy(), - p.hz(), p.hw() ); } @@ -3176,7 +3176,7 @@ namespace HomogeneousKernelFunctors { { switch (i%4) { case 0: return r.min(); - case 1: + case 1: return Point_2( r.max().hx()*r.min().hw(), r.min().hy()*r.max().hw(), r.min().hw()*r.max().hw() ); @@ -3213,25 +3213,25 @@ namespace HomogeneousKernelFunctors { class Coplanar_orientation_3 { typedef typename K::Point_3 Point_3; -#ifdef CGAL_kernel_exactness_preconditions +#ifdef CGAL_kernel_exactness_preconditions typedef typename K::Coplanar_3 Coplanar_3; typedef typename K::Collinear_3 Collinear_3; Coplanar_3 cp; Collinear_3 cl; -#endif // CGAL_kernel_exactness_preconditions +#endif // CGAL_kernel_exactness_preconditions public: typedef typename K::Orientation result_type; typedef Arity_tag< 4 > Arity; -#ifdef CGAL_kernel_exactness_preconditions +#ifdef CGAL_kernel_exactness_preconditions Coplanar_orientation_3() {} - Coplanar_orientation_3(const Coplanar_3& cp_, const Collinear_3& cl_) + Coplanar_orientation_3(const Coplanar_3& cp_, const Collinear_3& cl_) : cp(cp_), cl(cl_) {} -#endif // CGAL_kernel_exactness_preconditions +#endif // CGAL_kernel_exactness_preconditions result_type operator()(const Point_3& p, const Point_3& q, const Point_3& r) const - { + { Orientation oxy_pqr = orientationH2(p.hx(), p.hy(), p.hw(), q.hx(), q.hy(), q.hw(), r.hx(), r.hy(), r.hw()); @@ -3252,7 +3252,7 @@ namespace HomogeneousKernelFunctors { result_type operator()( const Point_3& p, const Point_3& q, const Point_3& r, const Point_3& s) const - { + { // p,q,r,s supposed to be coplanar // p,q,r supposed to be non collinear // tests whether s is on the same side of p,q as r @@ -3304,30 +3304,30 @@ namespace HomogeneousKernelFunctors { class Coplanar_side_of_bounded_circle_3 { typedef typename K::Point_3 Point_3; -#ifdef CGAL_kernel_exactness_preconditions +#ifdef CGAL_kernel_exactness_preconditions typedef typename K::Coplanar_3 Coplanar_3; typedef typename K::Collinear_3 Collinear_3; Coplanar_3 cp; Collinear_3 cl; -#endif // CGAL_kernel_exactness_preconditions +#endif // CGAL_kernel_exactness_preconditions public: typedef typename K::Bounded_side result_type; typedef Arity_tag< 4 > Arity; -#ifdef CGAL_kernel_exactness_preconditions +#ifdef CGAL_kernel_exactness_preconditions Coplanar_side_of_bounded_circle_3() {} - Coplanar_side_of_bounded_circle_3(const Coplanar_3& cp_, - const Collinear_3& cl_) + Coplanar_side_of_bounded_circle_3(const Coplanar_3& cp_, + const Collinear_3& cl_) : cp(cp_), cl(cl_) {} -#endif // CGAL_kernel_exactness_preconditions +#endif // CGAL_kernel_exactness_preconditions result_type operator()( const Point_3& p, const Point_3& q, const Point_3& r, const Point_3& t) const - { + { // p,q,r,t are supposed to be coplanar. // p,q,r determine an orientation of this plane (not collinear). - // returns the equivalent of side_of_bounded_circle(p,q,r,t) + // returns the equivalent of side_of_bounded_circle(p,q,r,t) // in this plane CGAL_kernel_exactness_precondition( cp(p,q,r,t) ); CGAL_kernel_exactness_precondition( !cl(p,q,r) ); @@ -3346,7 +3346,7 @@ namespace HomogeneousKernelFunctors { result_type operator()( const Point_3& p, const Point_3& q) const - { + { return (p.hx() * q.hw() == q.hx() * p.hw() ) && (p.hy() * q.hw() == q.hy() * p.hw() ); } @@ -3501,7 +3501,7 @@ namespace HomogeneousKernelFunctors { result_type operator()(const Point_2& p, const Point_2& q, const Point_2& r) const - { + { typedef typename K::RT RT; const RT & phx = p.hx(); @@ -3538,8 +3538,8 @@ namespace HomogeneousKernelFunctors { - qhw*qhw * ( phw * ( rhx*rhx + rhy*rhy ) - 2 * rhw * ( phx*rhx + phy*rhy ) ); - - + + return dosd < 0; } }; @@ -3554,7 +3554,7 @@ namespace HomogeneousKernelFunctors { result_type operator()(const Point_3& p, const Point_3& q, const Point_3& r) const - { + { typedef typename K::RT RT; const RT & phx = p.hx(); @@ -3620,7 +3620,7 @@ namespace HomogeneousKernelFunctors { result_type operator()(const Line_2& l, const Point_2& p, const Point_2& q) const - { + { typedef typename K::RT RT; const RT & la = l.a(); @@ -3631,11 +3631,11 @@ namespace HomogeneousKernelFunctors { const RT & qhx= q.hx(); const RT & qhy= q.hy(); const RT & qhw= q.hw(); - + RT scaled_dist_p_minus_scaled_dist_q = la*( phx*qhw - qhx*phw ) + lb*( phy*qhw - qhy*phw ); - + return scaled_dist_p_minus_scaled_dist_q < 0; } }; @@ -3653,7 +3653,7 @@ namespace HomogeneousKernelFunctors { result_type operator()( const Plane_3& pl, const Point_3& p, const Point_3& q) const - { + { const RT & pla = pl.a(); const RT & plb = pl.b(); const RT & plc = pl.c(); @@ -3677,7 +3677,7 @@ namespace HomogeneousKernelFunctors { result_type operator()(const Point_3& plp, const Point_3& plq, const Point_3& plr, const Point_3& p, const Point_3& q) const - { + { Construct_plane_3 construct_plane_3; return operator()(construct_plane_3(plp, plq, plr), p, q); } @@ -3773,7 +3773,7 @@ namespace HomogeneousKernelFunctors { result_type operator()( const Point_2& p, const Point_2& q) const - { + { typedef typename K::RT RT; const RT& phx = p.hx(); @@ -3850,7 +3850,7 @@ namespace HomogeneousKernelFunctors { result_type operator()(const Point_2& p, const Point_2& q, const Point_2& r) const - { + { typedef typename K::RT RT; const RT& phx = p.hx(); @@ -3876,14 +3876,14 @@ namespace HomogeneousKernelFunctors { result_type operator()(const Vector_2& u, const Vector_2& v) const - { + { return enum_cast(sign_of_determinant2x2(u.hx(), u.hy(), v.hx(), v.hy())); } result_type operator()(const Circle_2& c) const - { + { return c.rep().orientation(); } }; @@ -3902,7 +3902,7 @@ namespace HomogeneousKernelFunctors { result_type operator()( const Point_3& p, const Point_3& q, const Point_3& r, const Point_3& s) const - { + { // Two rows are switched, because of the homogeneous column. return enum_cast( sign_of_determinant4x4( p.hx(), p.hy(), p.hz(), p.hw(), @@ -3913,7 +3913,7 @@ namespace HomogeneousKernelFunctors { result_type operator()( const Vector_3& u, const Vector_3& v, const Vector_3& w) const - { + { return enum_cast( sign_of_determinant3x3( u.hx(), u.hy(), u.hz(), v.hx(), v.hy(), v.hz(), @@ -3922,13 +3922,13 @@ namespace HomogeneousKernelFunctors { result_type operator()( const Tetrahedron_3& t) const - { + { return t.rep().orientation(); } result_type operator()(const Sphere_3& s) const - { + { return s.rep().orientation(); } }; @@ -3952,7 +3952,7 @@ namespace HomogeneousKernelFunctors { result_type operator()( const Line_2& l, const Point_2& p) const - { + { CGAL_kernel_precondition( ! l.is_degenerate() ); RT v = l.a()*p.hx() + l.b()*p.hy() + l.c()*p.hw(); return enum_cast(CGAL_NTS sign(v)); @@ -3960,8 +3960,8 @@ namespace HomogeneousKernelFunctors { result_type operator()( const Triangle_2& t, const Point_2& p) const - { - typename K::Collinear_are_ordered_along_line_2 + { + typename K::Collinear_are_ordered_along_line_2 collinear_are_ordered_along_line; typename K::Orientation_2 orientation; // depends on the orientation of the vertices @@ -3995,7 +3995,7 @@ namespace HomogeneousKernelFunctors { result_type operator()( const Point_2& p, const Point_2& q, const Point_2& t) const - { + { typedef typename K::RT RT; const RT& phx = p.hx(); @@ -4008,7 +4008,7 @@ namespace HomogeneousKernelFunctors { const RT& thy = t.hy(); const RT& thw = t.hw(); - return enum_cast( + return enum_cast( CGAL_NTS compare((thx*phw-phx*thw)*(qhx*thw-thx*qhw), (thy*phw-phy*thw)*(thy*qhw-qhy*thw)) ); } @@ -4016,7 +4016,7 @@ namespace HomogeneousKernelFunctors { result_type operator()( const Point_2& q, const Point_2& r, const Point_2& s, const Point_2& t) const - { + { typedef typename K::RT RT; const RT& qhx = q.hx(); @@ -4086,7 +4086,7 @@ namespace HomogeneousKernelFunctors { result_type operator()( const Point_3& p, const Point_3& q, const Point_3& t) const - { + { typedef typename K::RT RT; const RT& phx = p.hx(); @@ -4102,7 +4102,7 @@ namespace HomogeneousKernelFunctors { const RT& thz = t.hz(); const RT& thw = t.hw(); - return enum_cast( + return enum_cast( CGAL_NTS sign((thx*phw-phx*thw)*(qhx*thw-thx*qhw) + (thy*phw-phy*thw)*(qhy*thw-thy*qhw) + (thz*phw-phz*thw)*(qhz*thw-thz*qhw))); @@ -4218,7 +4218,7 @@ namespace HomogeneousKernelFunctors { result_type operator()( const Point_3& p, const Point_3& q, const Point_3& r, const Point_3& s, const Point_3& t) const - { + { typedef typename K::RT RT; CGAL_kernel_precondition( !coplanar(p,q,r,s) ); const RT & phx = p.hx();