Get rid of result_type in Kernels + fix some bad return types (wip)

This commit is contained in:
Mael Rouxel-Labbé 2024-12-20 16:12:56 +01:00
parent 468dde773d
commit 4d4549cad6
29 changed files with 1264 additions and 1793 deletions

File diff suppressed because it is too large Load Diff

View File

@ -72,13 +72,10 @@ template < class SK > \
class Compute_circular_x_3 class Compute_circular_x_3
{ {
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3; typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
typedef typename SK::Root_of_2 Root_of_2;
public: public:
// SK::Root_of_2
typedef const Root_of_2& result_type; decltype(auto) operator() (const Circular_arc_point_3 & a) const
result_type operator() (const Circular_arc_point_3 & a) const
{ return (a.rep().x()); } { return (a.rep().x()); }
}; };
@ -86,13 +83,10 @@ template < class SK > \
class Compute_circular_y_3 class Compute_circular_y_3
{ {
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3; typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
typedef typename SK::Root_of_2 Root_of_2;
public: public:
// SK::Root_of_2
typedef const Root_of_2& result_type; decltype(auto) operator() (const Circular_arc_point_3 & a) const
result_type operator() (const Circular_arc_point_3 & a) const
{ return (a.rep().y()); } { return (a.rep().y()); }
}; };
@ -100,13 +94,10 @@ template < class SK > \
class Compute_circular_z_3 class Compute_circular_z_3
{ {
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3; typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
typedef typename SK::Root_of_2 Root_of_2;
public: public:
// SK::Root_of_2
typedef const Root_of_2& result_type; decltype(auto) operator() (const Circular_arc_point_3 & a) const
result_type operator() (const Circular_arc_point_3 & a) const
{ return (a.rep().z()); } { return (a.rep().z()); }
}; };
@ -309,83 +300,78 @@ template < class SK > \
class Construct_sphere_3 class Construct_sphere_3
{ {
typedef typename SK::Circular_arc_3 Circular_arc_3; typedef typename SK::Circular_arc_3 Circular_arc_3;
typedef typename SK::Linear_kernel LK; typedef typename SK::Sphere_3 Sphere_3;
typedef typename LK::Point_3 Point_3; typedef typename SK::Point_3 Point_3;
typedef typename LK::Circle_3 Circle_3; typedef typename SK::Circle_3 Circle_3;
typedef typename LK::Sphere_3 Sphere_3; typedef typename SK::FT FT;
typedef typename SK::Linear_kernel LK;
typedef typename LK::Construct_sphere_3 LK_Construct_sphere_3; typedef typename LK::Construct_sphere_3 LK_Construct_sphere_3;
typedef typename LK::FT FT;
public: public:
Sphere_3
typedef typename SK::Linear_kernel::Construct_sphere_3::result_type result_type;
result_type
operator()( Return_base_tag tag, const Point_3& center, const FT& squared_radius, operator()( Return_base_tag tag, const Point_3& center, const FT& squared_radius,
Orientation orientation = COUNTERCLOCKWISE) const Orientation orientation = COUNTERCLOCKWISE) const
{ return LK_Construct_sphere_3()(tag, center, squared_radius, orientation); } { return LK_Construct_sphere_3()(tag, center, squared_radius, orientation); }
result_type Sphere_3
operator()( Return_base_tag tag, const Point_3& p, const Point_3& q, operator()( Return_base_tag tag, const Point_3& p, const Point_3& q,
const Point_3& r, const Point_3& s) const const Point_3& r, const Point_3& s) const
{ return LK_Construct_sphere_3()(tag, p, q, r, s); } { return LK_Construct_sphere_3()(tag, p, q, r, s); }
result_type Sphere_3
operator()( Return_base_tag tag, const Point_3& p, const Point_3& q, const Point_3& r, operator()( Return_base_tag tag, const Point_3& p, const Point_3& q, const Point_3& r,
Orientation orientation = COUNTERCLOCKWISE) const Orientation orientation = COUNTERCLOCKWISE) const
{ return LK_Construct_sphere_3()(tag, p, q, r, orientation); } { return LK_Construct_sphere_3()(tag, p, q, r, orientation); }
result_type Sphere_3
operator()( Return_base_tag tag, const Point_3& p, const Point_3& q, operator()( Return_base_tag tag, const Point_3& p, const Point_3& q,
Orientation orientation = COUNTERCLOCKWISE) const Orientation orientation = COUNTERCLOCKWISE) const
{ return LK_Construct_sphere_3()(tag, p, q, orientation); } { return LK_Construct_sphere_3()(tag, p, q, orientation); }
result_type Sphere_3
operator()( Return_base_tag tag, const Point_3& center, operator()( Return_base_tag tag, const Point_3& center,
Orientation orientation = COUNTERCLOCKWISE) const Orientation orientation = COUNTERCLOCKWISE) const
{ return LK_Construct_sphere_3()(tag, center, orientation); } { return LK_Construct_sphere_3()(tag, center, orientation); }
result_type decltype(auto)
operator() (Return_base_tag tag, const Circle_3 & c) const operator() (Return_base_tag tag, const Circle_3 & c) const
{ return LK_Construct_sphere_3()(tag, c); } { return LK_Construct_sphere_3()(tag, c); }
Sphere_3
result_type
operator()( const Point_3& center, const FT& squared_radius, operator()( const Point_3& center, const FT& squared_radius,
Orientation orientation = COUNTERCLOCKWISE) const Orientation orientation = COUNTERCLOCKWISE) const
{ return LK_Construct_sphere_3()(center, squared_radius, orientation); } { return LK_Construct_sphere_3()(center, squared_radius, orientation); }
result_type Sphere_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 Point_3& r, const Point_3& s) const
{ return LK_Construct_sphere_3()(p, q, r, s); } { return LK_Construct_sphere_3()(p, q, r, s); }
result_type Sphere_3
operator()( const Point_3& p, const Point_3& q, const Point_3& r, operator()( const Point_3& p, const Point_3& q, const Point_3& r,
Orientation orientation = COUNTERCLOCKWISE) const Orientation orientation = COUNTERCLOCKWISE) const
{ return LK_Construct_sphere_3()(p, q, r, orientation); } { return LK_Construct_sphere_3()(p, q, r, orientation); }
result_type Sphere_3
operator()( const Point_3& p, const Point_3& q, operator()( const Point_3& p, const Point_3& q,
Orientation orientation = COUNTERCLOCKWISE) const Orientation orientation = COUNTERCLOCKWISE) const
{ return LK_Construct_sphere_3()(p, q, orientation); } { return LK_Construct_sphere_3()(p, q, orientation); }
result_type Sphere_3
operator()( const Point_3& center, operator()( const Point_3& center,
Orientation orientation = COUNTERCLOCKWISE) const Orientation orientation = COUNTERCLOCKWISE) const
{ return LK_Construct_sphere_3()(center, orientation); } { return LK_Construct_sphere_3()(center, orientation); }
result_type decltype(auto)
operator() (const Circle_3 & c) const operator() (const Circle_3 & c) const
{ return LK_Construct_sphere_3()(c); } { return LK_Construct_sphere_3()(c); }
result_type Sphere_3
operator() ( const typename SK::Polynomial_for_spheres_2_3 &eq ) operator() ( const typename SK::Polynomial_for_spheres_2_3 &eq )
{ return SphericalFunctors::construct_sphere_3<SK>(eq); } { return SphericalFunctors::construct_sphere_3<SK>(eq); }
result_type operator() (const Circular_arc_3 & c) const decltype(auto) operator() (const Circular_arc_3 & c) const
{ return c.rep().diametral_sphere(); } { return c.rep().diametral_sphere(); }
}; };
@ -394,93 +380,89 @@ template < class SK > \
class Construct_plane_3 class Construct_plane_3
{ {
typedef typename SK::Circular_arc_3 Circular_arc_3; typedef typename SK::Circular_arc_3 Circular_arc_3;
typedef typename SK::RT RT;
typedef typename SK::Point_3 Point_3;
typedef typename SK::Vector_3 Vector_3;
typedef typename SK::Direction_3 Direction_3;
typedef typename SK::Line_3 Line_3;
typedef typename SK::Ray_3 Ray_3;
typedef typename SK::Segment_3 Segment_3;
typedef typename SK::Plane_3 Plane_3;
typedef typename SK::Circle_3 Circle_3;
typedef typename SK::Linear_kernel LK; typedef typename SK::Linear_kernel LK;
typedef typename LK::Construct_plane_3 LK_Construct_plane_3; typedef typename LK::Construct_plane_3 LK_Construct_plane_3;
typedef typename LK::RT RT;
typedef typename LK::Point_3 Point_3;
typedef typename LK::Vector_3 Vector_3;
typedef typename LK::Direction_3 Direction_3;
typedef typename LK::Line_3 Line_3;
typedef typename LK::Ray_3 Ray_3;
typedef typename LK::Segment_3 Segment_3;
typedef typename LK::Plane_3 Plane_3;
typedef typename LK::Circle_3 Circle_3;
public: public:
Plane_3
typedef typename SK::Linear_kernel::Construct_plane_3::result_type result_type;
public:
result_type
operator()(Return_base_tag tag, const RT& a, const RT& b, const RT& c, const RT& d) const operator()(Return_base_tag tag, const RT& a, const RT& b, const RT& c, const RT& d) const
{ return LK_Construct_plane_3()(tag, a, b, c, d); } { return LK_Construct_plane_3()(tag, a, b, c, d); }
result_type Plane_3
operator()(Return_base_tag tag, const Point_3& p, const Point_3& q, const Point_3& r) const operator()(Return_base_tag tag, const Point_3& p, const Point_3& q, const Point_3& r) const
{ return LK_Construct_plane_3()(tag, p, q, r); } { return LK_Construct_plane_3()(tag, p, q, r); }
result_type Plane_3
operator()(Return_base_tag tag, const Point_3& p, const Direction_3& d) const operator()(Return_base_tag tag, const Point_3& p, const Direction_3& d) const
{ return LK_Construct_plane_3()(tag, p, d); } { return LK_Construct_plane_3()(tag, p, d); }
result_type Plane_3
operator()(Return_base_tag tag, const Point_3& p, const Vector_3& v) const operator()(Return_base_tag tag, const Point_3& p, const Vector_3& v) const
{ return LK_Construct_plane_3()(tag, p, v); } { return LK_Construct_plane_3()(tag, p, v); }
result_type Plane_3
operator()(Return_base_tag tag, const Line_3& l, const Point_3& p) const operator()(Return_base_tag tag, const Line_3& l, const Point_3& p) const
{ return LK_Construct_plane_3()(tag, l, p); } { return LK_Construct_plane_3()(tag, l, p); }
result_type Plane_3
operator()(Return_base_tag tag, const Ray_3& r, const Point_3& p) const operator()(Return_base_tag tag, const Ray_3& r, const Point_3& p) const
{ return LK_Construct_plane_3()(tag, r, p); } { return LK_Construct_plane_3()(tag, r, p); }
result_type Plane_3
operator()(Return_base_tag tag, const Segment_3& s, const Point_3& p) const operator()(Return_base_tag tag, const Segment_3& s, const Point_3& p) const
{ return LK_Construct_plane_3()(tag, s, p); } { return LK_Construct_plane_3()(tag, s, p); }
result_type decltype(auto)
operator()(Return_base_tag tag, const Circle_3 & c) const operator()(Return_base_tag tag, const Circle_3 & c) const
{ return LK_Construct_plane_3()(tag, c); } { return LK_Construct_plane_3()(tag, c); }
result_type Plane_3
operator()(const RT& a, const RT& b, const RT& c, const RT& d) const operator()(const RT& a, const RT& b, const RT& c, const RT& d) const
{ return this->operator()(Return_base_tag(), a, b, c, d); } { return this->operator()(Return_base_tag(), a, b, c, d); }
result_type Plane_3
operator()(const Point_3& p, const Point_3& q, const Point_3& r) const operator()(const Point_3& p, const Point_3& q, const Point_3& r) const
{ return this->operator()(Return_base_tag(), p, q, r); } { return this->operator()(Return_base_tag(), p, q, r); }
result_type Plane_3
operator()(const Point_3& p, const Direction_3& d) const operator()(const Point_3& p, const Direction_3& d) const
{ return this->operator()(Return_base_tag(), p, d); } { return this->operator()(Return_base_tag(), p, d); }
result_type Plane_3
operator()(const Point_3& p, const Vector_3& v) const operator()(const Point_3& p, const Vector_3& v) const
{ return this->operator()(Return_base_tag(), p, v); } { return this->operator()(Return_base_tag(), p, v); }
result_type Plane_3
operator()(const Line_3& l, const Point_3& p) const operator()(const Line_3& l, const Point_3& p) const
{ return this->operator()(Return_base_tag(), l, p); } { return this->operator()(Return_base_tag(), l, p); }
result_type Plane_3
operator()(const Ray_3& r, const Point_3& p) const operator()(const Ray_3& r, const Point_3& p) const
{ return this->operator()(Return_base_tag(), r, p); } { return this->operator()(Return_base_tag(), r, p); }
result_type Plane_3
operator()(const Segment_3& s, const Point_3& p) const operator()(const Segment_3& s, const Point_3& p) const
{ return this->operator()(Return_base_tag(), s, p); } { return this->operator()(Return_base_tag(), s, p); }
result_type decltype(auto)
operator()(const Circle_3 & c) const operator()(const Circle_3 & c) const
{ return this->operator()(Return_base_tag(), c); } { return this->operator()(Return_base_tag(), c); }
result_type Plane_3
operator() ( const typename SK::Polynomial_1_3 &eq ) operator() ( const typename SK::Polynomial_1_3 &eq )
{ return SphericalFunctors::construct_plane_3<SK>(eq); } { return SphericalFunctors::construct_plane_3<SK>(eq); }
result_type operator() (const Circular_arc_3 & c) const decltype(auto) operator() (const Circular_arc_3 & c) const
{ return c.rep().supporting_plane(); } { return c.rep().supporting_plane(); }
}; };
@ -498,54 +480,53 @@ template < class SK > \
typedef typename SK::Ray_3 Ray_3; typedef typename SK::Ray_3 Ray_3;
public: public:
typedef typename SK::Linear_kernel::Construct_line_3 LK_Construct_line_3; typedef typename SK::Linear_kernel::Construct_line_3 LK_Construct_line_3;
typedef typename LK_Construct_line_3::result_type result_type;
result_type Line_3
operator()(Return_base_tag, const Point_3& p, const Point_3& q) const operator()(Return_base_tag, const Point_3& p, const Point_3& q) const
{ return LK_Construct_line_3()(p, Vector_3(p, q)); } { return LK_Construct_line_3()(p, Vector_3(p, q)); }
result_type Line_3
operator()(Return_base_tag, const Point_3& p, const Direction_3& d) const operator()(Return_base_tag, const Point_3& p, const Direction_3& d) const
{ return operator()(Return_base_tag(), p, Vector_3(d.dx(), d.dy(), d.dz())); } { return operator()(Return_base_tag(), p, Vector_3(d.dx(), d.dy(), d.dz())); }
result_type Line_3
operator()(Return_base_tag, const Point_3& p, const Vector_3& v) const operator()(Return_base_tag, const Point_3& p, const Vector_3& v) const
{ return LK_Construct_line_3()(p, v); } { return LK_Construct_line_3()(p, v); }
result_type Line_3
operator()(Return_base_tag, const Segment_3& s) const operator()(Return_base_tag, const Segment_3& s) const
{ return LK_Construct_line_3()(s.source(), Vector_3(s.source(), s.target())); } { return LK_Construct_line_3()(s.source(), Vector_3(s.source(), s.target())); }
result_type Line_3
operator()(Return_base_tag, const Ray_3& r) const operator()(Return_base_tag, const Ray_3& r) const
{ return LK_Construct_line_3()(r.source(), Vector_3(r.source(), r.second_point())); } { return LK_Construct_line_3()(r.source(), Vector_3(r.source(), r.second_point())); }
result_type Line_3
operator()(const Point_3& p, const Point_3& q) const operator()(const Point_3& p, const Point_3& q) const
{ return this->operator()(Return_base_tag(), p, q); } { return this->operator()(Return_base_tag(), p, q); }
result_type Line_3
operator()(const Point_3& p, const Direction_3& d) const operator()(const Point_3& p, const Direction_3& d) const
{ return this->operator()(Return_base_tag(), p, d); } { return this->operator()(Return_base_tag(), p, d); }
result_type Line_3
operator()(const Point_3& p, const Vector_3& v) const operator()(const Point_3& p, const Vector_3& v) const
{ return this->operator()(Return_base_tag(), p, v); } { return this->operator()(Return_base_tag(), p, v); }
result_type Line_3
operator()(const Segment_3& s) const operator()(const Segment_3& s) const
{ return this->operator()(Return_base_tag(), s); } { return this->operator()(Return_base_tag(), s); }
result_type Line_3
operator()(const Ray_3& r) const operator()(const Ray_3& r) const
{ return this->operator()(Return_base_tag(), r); } { return this->operator()(Return_base_tag(), r); }
const result_type& decltype(auto)
operator() (const Line_arc_3 & a) const operator() (const Line_arc_3 & a) const
{ return (a.rep().supporting_line()); } { return (a.rep().supporting_line()); }
result_type Line_3
operator() ( const typename SK::Polynomials_for_line_3 &eq ) operator() ( const typename SK::Polynomials_for_line_3 &eq )
{ return SphericalFunctors::construct_line_3<SK>(eq); } { return SphericalFunctors::construct_line_3<SK>(eq); }
@ -554,8 +535,6 @@ template < class SK > \
template < class SK > template < class SK >
class Construct_circle_3 class Construct_circle_3
{ {
typedef typename SK::Linear_kernel::Construct_circle_3 Extended;
typedef typename Extended::result_type forwarded_result_type;
typedef typename SK::FT FT; typedef typename SK::FT FT;
typedef typename SK::Point_3 Point_3; typedef typename SK::Point_3 Point_3;
typedef typename SK::Plane_3 Plane_3; typedef typename SK::Plane_3 Plane_3;
@ -564,57 +543,57 @@ template < class SK > \
typedef typename SK::Vector_3 Vector_3; typedef typename SK::Vector_3 Vector_3;
typedef typename SK::Direction_3 Direction_3; typedef typename SK::Direction_3 Direction_3;
typedef typename SK::Circular_arc_3 Circular_arc_3; typedef typename SK::Circular_arc_3 Circular_arc_3;
typedef typename SK::Kernel_base::Circle_3 RCircle_3;
typedef typename Circle_3::Rep Rep; typedef typename Circle_3::Rep Rep;
public:
forwarded_result_type typedef typename SK::Linear_kernel::Construct_circle_3 LK_Construct_circle_3;
public:
Circle_3
operator()(const Point_3& p, const FT& sr, operator()(const Point_3& p, const FT& sr,
const Plane_3& plane) const const Plane_3& plane) const
{ return Extended()(p, sr, plane); } { return LK_Construct_circle_3()(p, sr, plane); }
forwarded_result_type Circle_3
operator() (const Point_3& p, const FT& sr, operator() (const Point_3& p, const FT& sr,
const Vector_3& v) const const Vector_3& v) const
{ return Extended()(p, sr, v); } { return LK_Construct_circle_3()(p, sr, v); }
forwarded_result_type Circle_3
operator() (const Point_3& p, const FT& sr, operator() (const Point_3& p, const FT& sr,
const Direction_3& d) const const Direction_3& d) const
{ return Extended()(p, sr, d); } { return LK_Construct_circle_3()(p, sr, d); }
forwarded_result_type Circle_3
operator() (const Sphere_3& s1, const Sphere_3& s2) const operator() (const Sphere_3& s1, const Sphere_3& s2) const
{ return Extended()(s1, s2); } { return LK_Construct_circle_3()(s1, s2); }
forwarded_result_type Circle_3
operator() (const Plane_3& p, const Sphere_3& s) const operator() (const Plane_3& p, const Sphere_3& s) const
{ return Extended()(p, s); } { return LK_Construct_circle_3()(p, s); }
forwarded_result_type Circle_3
operator() (const Sphere_3& s, const Plane_3& p) const operator() (const Sphere_3& s, const Plane_3& p) const
{ return Extended()(p, s); } { return LK_Construct_circle_3()(p, s); }
forwarded_result_type Circle_3
operator() (const Plane_3& p, const Sphere_3& s, int a) const operator() (const Plane_3& p, const Sphere_3& s, int a) const
{ return Extended()(p, s, a); } { return LK_Construct_circle_3()(p, s, a); }
forwarded_result_type Circle_3
operator() (const Sphere_3& s, const Plane_3& p, int a) const operator() (const Sphere_3& s, const Plane_3& p, int a) const
{ return Extended()(p, s, a); } { return LK_Construct_circle_3()(p, s, a); }
forwarded_result_type Circle_3
operator()( const Point_3& p1, const Point_3& p2, const Point_3& p3) const operator()( const Point_3& p1, const Point_3& p2, const Point_3& p3) const
{ return Extended()(p1, p2, p3); } { return LK_Construct_circle_3()(p1, p2, p3); }
forwarded_result_type Circle_3
operator() ( const typename SK::Polynomials_for_circle_3 &eq ) operator() ( const typename SK::Polynomials_for_circle_3 &eq )
{ return Rep(construct_circle_3<SK>(eq)); } { return construct_circle_3<SK>(eq); }
const forwarded_result_type& decltype(auto)
operator() (const Circular_arc_3 & a) const operator() (const Circular_arc_3 & a) const
{ return (a.rep().supporting_circle()); } { return (a.rep().supporting_circle()); }
}; };
template < class SK > template < class SK >
@ -1297,18 +1276,15 @@ template < class SK > \
typedef typename SK::Line_arc_3 Line_arc_3; typedef typename SK::Line_arc_3 Line_arc_3;
public: public:
typedef typename SK::Linear_kernel::Construct_bbox_3::result_type result_type;
using SK::Linear_kernel::Construct_bbox_3::operator(); using SK::Linear_kernel::Construct_bbox_3::operator();
result_type operator() (const Circular_arc_point_3 & c) const decltype(auto) operator() (const Circular_arc_point_3 & c) const
{ return c.rep().bbox(); } { return c.rep().bbox(); }
result_type operator() (const Line_arc_3 & l) const decltype(auto) operator() (const Line_arc_3 & l) const
{ return l.rep().bbox(); } { return l.rep().bbox(); }
result_type operator() (const Circular_arc_3 & c) const decltype(auto) operator() (const Circular_arc_3 & c) const
{ return c.rep().bbox(); } { return c.rep().bbox(); }
}; };
@ -1322,8 +1298,8 @@ template < class SK > \
typedef typename SK::FT FT; typedef typename SK::FT FT;
public: public:
typedef double result_type; typedef double result_type;
using SK::Linear_kernel::Compute_approximate_squared_length_3::operator(); using SK::Linear_kernel::Compute_approximate_squared_length_3::operator();
result_type operator() (const Circular_arc_3 & c) const result_type operator() (const Circular_arc_3 & c) const
@ -1341,7 +1317,6 @@ template < class SK > \
typedef typename SK::FT FT; typedef typename SK::FT FT;
public: public:
typedef double result_type; typedef double result_type;
using SK::Linear_kernel::Compute_approximate_angle_3::operator(); using SK::Linear_kernel::Compute_approximate_angle_3::operator();

View File

@ -34,13 +34,12 @@ template < typename K_base >
class Angle_3 class Angle_3
: public K_base::Angle_3 : public K_base::Angle_3
{ {
typedef typename K_base::Point_3 Point_3; typedef typename K_base::Angle Angle;
typedef typename K_base::Point_3 Point_3;
typedef typename K_base::Angle_3 Base; typedef typename K_base::Angle_3 Base;
public: public:
typedef typename Base::result_type result_type;
using Base::operator(); using Base::operator();
Sign sign_with_error(const double x, const double error) const { Sign sign_with_error(const double x, const double error) const {
@ -49,7 +48,7 @@ public:
else return ZERO; else return ZERO;
} }
result_type operator()(const Point_3 &p, const Point_3& q, const Point_3& r) const Angle operator()(const Point_3& p, const Point_3& q, const Point_3& r) const
{ {
CGAL_BRANCH_PROFILER_3("semi-static failures/attempts/calls to : Angle_3", tmp); CGAL_BRANCH_PROFILER_3("semi-static failures/attempts/calls to : Angle_3", tmp);

View File

@ -24,16 +24,16 @@ template < typename K_base >
class Collinear_3 class Collinear_3
: public K_base::Collinear_3 : public K_base::Collinear_3
{ {
typedef typename K_base::Boolean Boolean;
typedef typename K_base::Point_3 Point_3; typedef typename K_base::Point_3 Point_3;
typedef typename K_base::Vector_3 Vector_3; typedef typename K_base::Vector_3 Vector_3;
typedef typename K_base::Sphere_3 Sphere_3; typedef typename K_base::Sphere_3 Sphere_3;
typedef typename K_base::Tetrahedron_3 Tetrahedron_3; typedef typename K_base::Tetrahedron_3 Tetrahedron_3;
typedef typename K_base::Collinear_3 Base;
typedef typename K_base::Collinear_3 Base;
public: public:
Boolean
typedef typename Base::result_type result_type;
result_type
operator()(const Point_3 &p, const Point_3 &q, const Point_3 &r) const operator()(const Point_3 &p, const Point_3 &q, const Point_3 &r) const
{ {
CGAL_BRANCH_PROFILER_3("semi-static failures/attempts/calls to : Collinear_3", tmp); CGAL_BRANCH_PROFILER_3("semi-static failures/attempts/calls to : Collinear_3", tmp);

View File

@ -30,17 +30,16 @@ template < typename K_base >
class Compare_distance_3 class Compare_distance_3
: public K_base::Compare_distance_3 : public K_base::Compare_distance_3
{ {
typedef typename K_base::Point_3 Point_3; typedef typename K_base::Comparison_result Comparison_result;
typedef typename K_base::Vector_3 Vector_3; typedef typename K_base::Point_3 Point_3;
typedef typename K_base::Vector_3 Vector_3;
typedef typename K_base::Compare_distance_3 Base; typedef typename K_base::Compare_distance_3 Base;
public: public:
typedef typename Base::result_type result_type;
using Base::operator(); using Base::operator();
result_type operator()(const Point_3 &p, const Point_3& q, const Point_3& r) const Comparison_result operator()(const Point_3& p, const Point_3& q, const Point_3& r) const
{ {
CGAL_BRANCH_PROFILER(std::string("semi-static attempts/calls to : ") + CGAL_BRANCH_PROFILER(std::string("semi-static attempts/calls to : ") +
std::string(CGAL_PRETTY_FUNCTION), tmp); std::string(CGAL_PRETTY_FUNCTION), tmp);

View File

@ -24,15 +24,16 @@ namespace CGAL { namespace internal { namespace Static_filters_predicates {
class Compare_squared_radius_3 class Compare_squared_radius_3
: public K_base::Compare_squared_radius_3 : public K_base::Compare_squared_radius_3
{ {
typedef typename K_base::Point_3 Point_3; typedef typename K_base::Comparison_result Comparison_result;
typedef typename K_base::FT FT; typedef typename K_base::Point_3 Point_3;
typedef typename K_base::Compare_squared_radius_3 Base; typedef typename K_base::FT FT;
public:
typedef typename Base::result_type result_type;
typedef typename K_base::Compare_squared_radius_3 Base;
public:
using Base::operator(); using Base::operator();
result_type operator() ( Comparison_result operator() (
const Point_3& p, const Point_3& p,
const Point_3& q, const Point_3& q,
const Point_3& r, const Point_3& r,
@ -185,7 +186,7 @@ namespace CGAL { namespace internal { namespace Static_filters_predicates {
return Base::operator()(p,q,r,s,w); return Base::operator()(p,q,r,s,w);
} }
result_type operator() ( Comparison_result operator() (
const Point_3& p, const Point_3& p,
const Point_3& q, const Point_3& q,
const Point_3& s, const Point_3& s,
@ -312,14 +313,14 @@ namespace CGAL { namespace internal { namespace Static_filters_predicates {
} }
} }
} }
return static_cast<result_type>(int_tmp_result); return static_cast<Comparison_result>(int_tmp_result);
} }
else else
return Base::operator()(p,q,s,w); return Base::operator()(p,q,s,w);
} }
result_type operator() ( Comparison_result operator() (
const Point_3& p, const Point_3& p,
const Point_3& q, const Point_3& q,
const FT& w const FT& w

View File

@ -27,15 +27,16 @@ namespace CGAL { namespace internal { namespace Static_filters_predicates {
class Compare_weighted_squared_radius_3: class Compare_weighted_squared_radius_3:
public K_base::Compare_weighted_squared_radius_3 public K_base::Compare_weighted_squared_radius_3
{ {
typedef typename K_base::Weighted_point_3 Weighted_point_3; typedef typename K_base::Comparison_result Comparison_result;
typedef typename K_base::FT FT; typedef typename K_base::Weighted_point_3 Weighted_point_3;
typedef typename K_base::Compare_weighted_squared_radius_3 Base; typedef typename K_base::FT FT;
public:
typedef typename Base::result_type result_type;
typedef typename K_base::Compare_weighted_squared_radius_3 Base;
public:
using Base::operator(); using Base::operator();
result_type operator() ( Comparison_result operator() (
const Weighted_point_3& p, const Weighted_point_3& p,
const Weighted_point_3& q, const Weighted_point_3& q,
const Weighted_point_3& r, const Weighted_point_3& r,
@ -175,7 +176,7 @@ namespace CGAL { namespace internal { namespace Static_filters_predicates {
return Base::operator()(p,q,r,s,w); return Base::operator()(p,q,r,s,w);
} }
result_type Comparison_result
operator() ( operator() (
const Weighted_point_3& p, const Weighted_point_3& p,
const Weighted_point_3& q , const Weighted_point_3& q ,
@ -292,7 +293,7 @@ namespace CGAL { namespace internal { namespace Static_filters_predicates {
return Base::operator()(p,q,r,w); return Base::operator()(p,q,r,w);
} }
result_type Comparison_result
operator() ( operator() (
const Weighted_point_3& p, const Weighted_point_3& p,
const Weighted_point_3& q, const Weighted_point_3& q,

View File

@ -31,17 +31,16 @@ template < typename K_base >
class Compare_x_2 class Compare_x_2
: public K_base::Compare_x_2 : public K_base::Compare_x_2
{ {
typedef typename K_base::Point_2 Point_2; typedef typename K_base::Comparison_result Comparison_result;
typedef typename K_base::Line_2 Line_2; typedef typename K_base::Point_2 Point_2;
typedef typename K_base::Compare_x_2 Base; typedef typename K_base::Line_2 Line_2;
typedef typename K_base::Compare_x_2 Base;
public: public:
typedef typename Base::result_type result_type;
using Base::operator(); using Base::operator();
result_type operator()(const Point_2 &p, const Point_2& q) const Comparison_result operator()(const Point_2& p, const Point_2& q) const
{ {
CGAL_BRANCH_PROFILER(std::string("semi-static attempts/calls to : ") + CGAL_BRANCH_PROFILER(std::string("semi-static attempts/calls to : ") +
std::string(CGAL_PRETTY_FUNCTION), tmp); std::string(CGAL_PRETTY_FUNCTION), tmp);

View File

@ -31,17 +31,16 @@ template < typename K_base >
class Compare_y_2 class Compare_y_2
: public K_base::Compare_y_2 : public K_base::Compare_y_2
{ {
typedef typename K_base::Point_2 Point_2; typedef typename K_base::Comparison_result Comparison_result;
typedef typename K_base::Line_2 Line_2; typedef typename K_base::Point_2 Point_2;
typedef typename K_base::Compare_y_2 Base; typedef typename K_base::Line_2 Line_2;
typedef typename K_base::Compare_y_2 Base;
public: public:
typedef typename Base::result_type result_type;
using Base::operator(); using Base::operator();
result_type operator()(const Point_2 &p, const Point_2& q) const Comparison_result operator()(const Point_2 &p, const Point_2& q) const
{ {
CGAL_BRANCH_PROFILER(std::string("semi-static attempts/calls to : ") + CGAL_BRANCH_PROFILER(std::string("semi-static attempts/calls to : ") +
std::string(CGAL_PRETTY_FUNCTION), tmp); std::string(CGAL_PRETTY_FUNCTION), tmp);

View File

@ -22,13 +22,14 @@ template < typename K_base, typename Kernel >
class Compare_y_at_x_2 class Compare_y_at_x_2
: public K_base::Compare_y_at_x_2 : public K_base::Compare_y_at_x_2
{ {
typedef typename K_base::Point_2 Point_2; typedef typename K_base::Comparison_result Comparison_result;
typedef typename K_base::Segment_2 Segment_2; typedef typename K_base::Point_2 Point_2;
typedef typename K_base::FT FT; typedef typename K_base::Segment_2 Segment_2;
typedef typename K_base::Compare_y_at_x_2 Base; typedef typename K_base::FT FT;
typedef typename K_base::Compare_y_at_x_2 Base;
public: public:
using Base::operator(); using Base::operator();
Comparison_result Comparison_result

View File

@ -25,17 +25,14 @@ template < typename K_base, typename SFK >
class Coplanar_3 class Coplanar_3
: public K_base::Coplanar_3 : public K_base::Coplanar_3
{ {
typedef typename K_base::Point_3 Point_3; typedef typename K_base::Boolean Boolean;
typedef typename K_base::Point_3 Point_3;
typedef typename K_base::Coplanar_3 Base; typedef typename K_base::Coplanar_3 Base;
typedef typename SFK::Orientation_3 Orientation_3; typedef typename SFK::Orientation_3 Orientation_3;
public: public:
Boolean
typedef typename Base::result_type result_type;
result_type
operator()(const Point_3& p,const Point_3& q, const Point_3& r, const Point_3& s) const operator()(const Point_3& p,const Point_3& q, const Point_3& r, const Point_3& s) const
{ {
return Orientation_3()(p,q,r,s) == COPLANAR; return Orientation_3()(p,q,r,s) == COPLANAR;

View File

@ -40,12 +40,12 @@ template < typename Kernel >
class Coplanar_orientation_3 class Coplanar_orientation_3
: public Kernel::Coplanar_orientation_3 : public Kernel::Coplanar_orientation_3
{ {
typedef typename Kernel::Orientation Orientation;
typedef typename Kernel::Point_3 Point_3; typedef typename Kernel::Point_3 Point_3;
typedef typename Kernel::Coplanar_orientation_3 Base; typedef typename Kernel::Coplanar_orientation_3 Base;
public: public:
typedef Orientation result_type;
Orientation operator()(const Point_3 &p, const Point_3 &q, const Point_3 &r) const Orientation operator()(const Point_3 &p, const Point_3 &q, const Point_3 &r) const
{ {
return opti_coplanar_orientationC3( return opti_coplanar_orientationC3(

View File

@ -28,16 +28,13 @@ template < typename K_base, typename SFK >
class Do_intersect_2 class Do_intersect_2
: public K_base::Do_intersect_2 : public K_base::Do_intersect_2
{ {
typedef typename K_base::Boolean Boolean;
typedef typename K_base::Point_2 Point_2; typedef typename K_base::Point_2 Point_2;
typedef typename K_base::Segment_2 Segment_2; typedef typename K_base::Segment_2 Segment_2;
typedef typename K_base::Do_intersect_2 Base; typedef typename K_base::Do_intersect_2 Base;
typedef K_base TA1;
typedef SFK TA2;
public: public:
typedef typename Base::result_type result_type;
using Base::operator(); using Base::operator();
// The internal::do_intersect(..) function // The internal::do_intersect(..) function
@ -47,19 +44,19 @@ public:
// the statically filtered kernel we avoid // the statically filtered kernel we avoid
// that doubles are put into Interval_nt // that doubles are put into Interval_nt
// to get taken out again with fit_in_double // to get taken out again with fit_in_double
result_type Boolean
operator()(const Segment_2 &s, const Segment_2& t) const operator()(const Segment_2 &s, const Segment_2& t) const
{ {
return Intersections::internal::do_intersect(s,t, SFK()); return Intersections::internal::do_intersect(s,t, SFK());
} }
result_type Boolean
operator()(const Point_2 &p, const Segment_2& t) const operator()(const Point_2 &p, const Segment_2& t) const
{ {
return Intersections::internal::do_intersect(p,t, SFK()); return Intersections::internal::do_intersect(p,t, SFK());
} }
result_type Boolean
operator()(const Segment_2& t, const Point_2 &p) const operator()(const Segment_2& t, const Point_2 &p) const
{ {
return Intersections::internal::do_intersect(p,t, SFK()); return Intersections::internal::do_intersect(p,t, SFK());

View File

@ -39,18 +39,17 @@ template < typename K_base, typename SFK >
class Do_intersect_3 class Do_intersect_3
: public K_base::Do_intersect_3 : public K_base::Do_intersect_3
{ {
typedef typename K_base::Boolean Boolean;
typedef typename K_base::Point_3 Point_3; typedef typename K_base::Point_3 Point_3;
typedef typename K_base::Ray_3 Ray_3; typedef typename K_base::Ray_3 Ray_3;
typedef typename K_base::Segment_3 Segment_3; typedef typename K_base::Segment_3 Segment_3;
typedef typename K_base::Triangle_3 Triangle_3; typedef typename K_base::Triangle_3 Triangle_3;
typedef typename K_base::Tetrahedron_3 Tetrahedron_3; typedef typename K_base::Tetrahedron_3 Tetrahedron_3;
typedef typename K_base::Sphere_3 Sphere_3; typedef typename K_base::Sphere_3 Sphere_3;
typedef typename K_base::Do_intersect_3 Base; typedef typename K_base::Do_intersect_3 Base;
public: public:
typedef typename Base::result_type result_type;
using Base::operator(); using Base::operator();
Sign sign_with_error(const double x, const double error) const { Sign sign_with_error(const double x, const double error) const {
@ -67,32 +66,31 @@ public:
// the statically filtered kernel we avoid // the statically filtered kernel we avoid
// that doubles are put into Interval_nt // that doubles are put into Interval_nt
// to get taken out again with fit_in_double // to get taken out again with fit_in_double
result_type Boolean
operator()(const Segment_3 &s, const Triangle_3& t) const operator()(const Segment_3 &s, const Triangle_3& t) const
{ {
return Intersections::internal::do_intersect(t,s, SFK()); return Intersections::internal::do_intersect(t,s, SFK());
} }
result_type Boolean
operator()(const Triangle_3& t, const Segment_3 &s) const operator()(const Triangle_3& t, const Segment_3 &s) const
{ {
return Intersections::internal::do_intersect(t,s, SFK()); return Intersections::internal::do_intersect(t,s, SFK());
} }
result_type Boolean
operator()(const Triangle_3 &t0, const Triangle_3& t1) const operator()(const Triangle_3 &t0, const Triangle_3& t1) const
{ {
return Intersections::internal::do_intersect(t0,t1, SFK()); return Intersections::internal::do_intersect(t0,t1, SFK());
} }
Boolean
result_type
operator()(const Bbox_3& b, const Segment_3 &s) const operator()(const Bbox_3& b, const Segment_3 &s) const
{ {
return this->operator()(s, b); return this->operator()(s, b);
} }
result_type Boolean
operator()(const Segment_3 &s, const Bbox_3& b) const operator()(const Segment_3 &s, const Bbox_3& b) const
{ {
CGAL_BRANCH_PROFILER_3(std::string("semi-static failures/attempts/calls to : ") + CGAL_BRANCH_PROFILER_3(std::string("semi-static failures/attempts/calls to : ") +
@ -111,7 +109,7 @@ public:
{ {
CGAL_BRANCH_PROFILER_BRANCH_1(tmp); CGAL_BRANCH_PROFILER_BRANCH_1(tmp);
const Uncertain<result_type> ub = const Uncertain<Boolean> ub =
Intersections::internal::do_intersect_bbox_segment_aux Intersections::internal::do_intersect_bbox_segment_aux
<double, <double,
true, // bounded at t=0 true, // bounded at t=0
@ -127,13 +125,13 @@ public:
return Base::operator()(s,b); return Base::operator()(s,b);
} }
result_type Boolean
operator()(const Bbox_3& b, const Tetrahedron_3 &t) const operator()(const Bbox_3& b, const Tetrahedron_3 &t) const
{ {
return this->operator()(t, b); return this->operator()(t, b);
} }
result_type Boolean
operator()(const Tetrahedron_3 &t, const Bbox_3& b) const operator()(const Tetrahedron_3 &t, const Bbox_3& b) const
{ {
CGAL_BRANCH_PROFILER_3(std::string("semi-static failures/attempts/calls to : ") + CGAL_BRANCH_PROFILER_3(std::string("semi-static failures/attempts/calls to : ") +
@ -168,13 +166,13 @@ public:
return Base::operator()(t,b); return Base::operator()(t,b);
} }
result_type Boolean
operator()(const Bbox_3& b, const Ray_3 &r) const operator()(const Bbox_3& b, const Ray_3 &r) const
{ {
return this->operator()(r, b); return this->operator()(r, b);
} }
result_type Boolean
operator()(const Ray_3 &r, const Bbox_3& b) const operator()(const Ray_3 &r, const Bbox_3& b) const
{ {
CGAL_BRANCH_PROFILER_3(std::string("semi-static failures/attempts/calls to : ") + CGAL_BRANCH_PROFILER_3(std::string("semi-static failures/attempts/calls to : ") +
@ -193,7 +191,7 @@ public:
{ {
CGAL_BRANCH_PROFILER_BRANCH_1(tmp); CGAL_BRANCH_PROFILER_BRANCH_1(tmp);
const Uncertain<result_type> ub = const Uncertain<Boolean> ub =
Intersections::internal::do_intersect_bbox_segment_aux Intersections::internal::do_intersect_bbox_segment_aux
<double, <double,
true, // bounded at t=0 true, // bounded at t=0
@ -209,8 +207,7 @@ public:
return Base::operator()(r,b); return Base::operator()(r,b);
} }
Boolean
result_type
operator()(const Bbox_3& b, const Triangle_3 &t) const operator()(const Bbox_3& b, const Triangle_3 &t) const
{ {
return this->operator()(t, b); return this->operator()(t, b);
@ -487,7 +484,7 @@ public:
return false; return false;
}; };
result_type Boolean
operator()(const Triangle_3 &t, const Bbox_3& b) const operator()(const Triangle_3 &t, const Bbox_3& b) const
{ {
CGAL_BRANCH_PROFILER_3(std::string("semi-static failures/attempts/calls to : ") + CGAL_BRANCH_PROFILER_3(std::string("semi-static failures/attempts/calls to : ") +
@ -616,14 +613,14 @@ public:
return Base::operator()(t,b); return Base::operator()(t,b);
} }
result_type Boolean
operator()(const Bbox_3& b, const Sphere_3 &s) const operator()(const Bbox_3& b, const Sphere_3 &s) const
{ {
return this->operator()(s, b); return this->operator()(s, b);
} }
// The parameter overestimate is used to avoid a filter failure in AABB_tree::closest_point() // The parameter overestimate is used to avoid a filter failure in AABB_tree::closest_point()
result_type Boolean
operator()(const Sphere_3 &s, const Bbox_3& b, bool overestimate = false) const operator()(const Sphere_3 &s, const Bbox_3& b, bool overestimate = false) const
{ {
CGAL_BRANCH_PROFILER_3(std::string("semi-static failures/attempts/calls to : ") + CGAL_BRANCH_PROFILER_3(std::string("semi-static failures/attempts/calls to : ") +

View File

@ -31,18 +31,16 @@ template < typename K_base >
class Equal_2 class Equal_2
: public K_base::Equal_2 : public K_base::Equal_2
{ {
typedef typename K_base::Boolean Boolean;
typedef typename K_base::FT FT; typedef typename K_base::FT FT;
typedef typename K_base::Point_2 Point_2; typedef typename K_base::Point_2 Point_2;
typedef typename K_base::Vector_2 Vector_2; typedef typename K_base::Vector_2 Vector_2;
typedef typename K_base::Equal_2 Base; typedef typename K_base::Equal_2 Base;
public: public:
typedef typename Base::result_type result_type;
using Base::operator(); using Base::operator();
result_type operator()(const Point_2 &p, const Point_2& q) const Boolean operator()(const Point_2& p, const Point_2& q) const
{ {
CGAL_BRANCH_PROFILER(std::string("semi-static attempts/calls to : ") + CGAL_BRANCH_PROFILER(std::string("semi-static attempts/calls to : ") +
std::string(CGAL_PRETTY_FUNCTION), tmp); std::string(CGAL_PRETTY_FUNCTION), tmp);
@ -61,8 +59,7 @@ public:
return Base::operator()(p, q); return Base::operator()(p, q);
} }
Boolean operator()(const Vector_2& p, const Vector_2& q) const
result_type operator()(const Vector_2 &p, const Vector_2& q) const
{ {
CGAL_BRANCH_PROFILER(std::string("semi-static attempts/calls to : ") + CGAL_BRANCH_PROFILER(std::string("semi-static attempts/calls to : ") +
std::string(CGAL_PRETTY_FUNCTION), tmp); std::string(CGAL_PRETTY_FUNCTION), tmp);

View File

@ -31,17 +31,16 @@ template < typename K_base >
class Equal_3 class Equal_3
: public K_base::Equal_3 : public K_base::Equal_3
{ {
typedef typename K_base::Boolean Boolean;
typedef typename K_base::Point_3 Point_3; typedef typename K_base::Point_3 Point_3;
typedef typename K_base::Vector_3 Vector_3; typedef typename K_base::Vector_3 Vector_3;
typedef typename K_base::Equal_3 Base; typedef typename K_base::Equal_3 Base;
public: public:
typedef typename Base::result_type result_type;
using Base::operator(); using Base::operator();
result_type operator()(const Point_3 &p, const Point_3& q) const Boolean operator()(const Point_3& p, const Point_3& q) const
{ {
CGAL_BRANCH_PROFILER(std::string("semi-static attempts/calls to : ") + CGAL_BRANCH_PROFILER(std::string("semi-static attempts/calls to : ") +
std::string(CGAL_PRETTY_FUNCTION), tmp); std::string(CGAL_PRETTY_FUNCTION), tmp);
@ -62,7 +61,7 @@ public:
} }
result_type operator()(const Vector_3 &p, const Vector_3& q) const Boolean operator()(const Vector_3& p, const Vector_3& q) const
{ {
CGAL_BRANCH_PROFILER(std::string("semi-static attempts/calls to : ") + CGAL_BRANCH_PROFILER(std::string("semi-static attempts/calls to : ") +
std::string(CGAL_PRETTY_FUNCTION), tmp); std::string(CGAL_PRETTY_FUNCTION), tmp);
@ -83,7 +82,7 @@ public:
} }
result_type operator()(const Vector_3 &p, const Null_vector &q) const Boolean operator()(const Vector_3& p, const Null_vector& q) const
{ {
CGAL_BRANCH_PROFILER(std::string("semi-static attempts/calls to : ") + CGAL_BRANCH_PROFILER(std::string("semi-static attempts/calls to : ") +
std::string(CGAL_PRETTY_FUNCTION), tmp); std::string(CGAL_PRETTY_FUNCTION), tmp);

View File

@ -25,6 +25,7 @@ template < typename K_base, typename SFK >
class Is_degenerate_3 class Is_degenerate_3
: public K_base::Is_degenerate_3 : public K_base::Is_degenerate_3
{ {
typedef typename K_base::Boolean Boolean;
typedef typename K_base::Ray_3 Ray_3; typedef typename K_base::Ray_3 Ray_3;
typedef typename K_base::Segment_3 Segment_3; typedef typename K_base::Segment_3 Segment_3;
typedef typename K_base::Plane_3 Plane_3; typedef typename K_base::Plane_3 Plane_3;
@ -35,25 +36,21 @@ class Is_degenerate_3
typedef typename SFK::Equal_3 Equal_3; typedef typename SFK::Equal_3 Equal_3;
public: public:
typedef typename Base::result_type result_type;
using Base::operator(); using Base::operator();
result_type Boolean
operator()(const Segment_3& s) const operator()(const Segment_3& s) const
{ {
return Equal_3()(Construct_source_3()(s), Construct_target_3()(s)); return Equal_3()(Construct_source_3()(s), Construct_target_3()(s));
} }
Boolean
result_type
operator()(const Ray_3& r) const operator()(const Ray_3& r) const
{ {
return Equal_3()(Construct_source_3()(r), Construct_second_point_3()(r)); return Equal_3()(Construct_source_3()(r), Construct_second_point_3()(r));
} }
result_type Boolean
operator()(const Plane_3& p) const operator()(const Plane_3& p) const
{ {
CGAL_BRANCH_PROFILER(std::string("semi-static attempts/calls to : ") + CGAL_BRANCH_PROFILER(std::string("semi-static attempts/calls to : ") +

View File

@ -25,16 +25,14 @@ template < typename K_base >
class Orientation_2 class Orientation_2
: public K_base::Orientation_2 : public K_base::Orientation_2
{ {
typedef typename K_base::Orientation Orientation;
typedef typename K_base::Point_2 Point_2; typedef typename K_base::Point_2 Point_2;
typedef typename K_base::Vector_2 Vector_2; typedef typename K_base::Vector_2 Vector_2;
typedef typename K_base::Circle_2 Circle_2; typedef typename K_base::Circle_2 Circle_2;
typedef typename K_base::Orientation_2 Base; typedef typename K_base::Orientation_2 Base;
public: public:
typedef typename Base::result_type result_type;
using Base::operator(); using Base::operator();
Orientation Orientation

View File

@ -27,18 +27,18 @@ template < typename K_base >
class Orientation_3 class Orientation_3
: public K_base::Orientation_3 : public K_base::Orientation_3
{ {
typedef typename K_base::Orientation Orientation;
typedef typename K_base::Point_3 Point_3; typedef typename K_base::Point_3 Point_3;
typedef typename K_base::Vector_3 Vector_3; typedef typename K_base::Vector_3 Vector_3;
typedef typename K_base::Sphere_3 Sphere_3; typedef typename K_base::Sphere_3 Sphere_3;
typedef typename K_base::Tetrahedron_3 Tetrahedron_3; typedef typename K_base::Tetrahedron_3 Tetrahedron_3;
typedef typename K_base::Orientation_3 Base; typedef typename K_base::Orientation_3 Base;
public: public:
typedef typename Base::result_type result_type;
using Base::operator(); using Base::operator();
result_type Orientation
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 Point_3 &r, const Point_3 &s) const
{ {

View File

@ -26,12 +26,12 @@ namespace CGAL { namespace internal { namespace Static_filters_predicates {
class Power_side_of_oriented_power_sphere_3: class Power_side_of_oriented_power_sphere_3:
public K_base::Power_side_of_oriented_power_sphere_3 public K_base::Power_side_of_oriented_power_sphere_3
{ {
typedef typename K_base::Oriented_side Oriented_side;
typedef typename K_base::Weighted_point_3 Weighted_point_3; typedef typename K_base::Weighted_point_3 Weighted_point_3;
typedef typename K_base::FT FT; typedef typename K_base::FT FT;
typedef typename K_base::Power_side_of_oriented_power_sphere_3 Base; typedef typename K_base::Power_side_of_oriented_power_sphere_3 Base;
public:
typedef typename Base::result_type result_type;
public:
using Base::operator(); using Base::operator();
void void
@ -107,11 +107,11 @@ namespace CGAL { namespace internal { namespace Static_filters_predicates {
} }
result_type operator() ( const Weighted_point_3 & p, Oriented_side operator() (const Weighted_point_3& p,
const Weighted_point_3 & q, const Weighted_point_3& q,
const Weighted_point_3 & r, const Weighted_point_3& r,
const Weighted_point_3 & s, const Weighted_point_3& s,
const Weighted_point_3 & t) const const Weighted_point_3& t) const
{ {
CGAL_BRANCH_PROFILER_3("semi-static failures/attempts/calls to : Power_side_of_power_sphere_3 with 4+1 wpoints", tmp); CGAL_BRANCH_PROFILER_3("semi-static failures/attempts/calls to : Power_side_of_power_sphere_3 with 4+1 wpoints", tmp);
@ -225,7 +225,7 @@ namespace CGAL { namespace internal { namespace Static_filters_predicates {
return Base::operator()(p,q,r,s,t); return Base::operator()(p,q,r,s,t);
} }
result_type int_tmp_result; Oriented_side int_tmp_result;
double eps = (1.67106803095990471147e-13 * (((max2 * max3) * max4) * (CGAL::max) ( max5, (max1 * max1) ))); double eps = (1.67106803095990471147e-13 * (((max2 * max3) * max4) * (CGAL::max) ( max5, (max1 * max1) )));
@ -253,10 +253,10 @@ namespace CGAL { namespace internal { namespace Static_filters_predicates {
return Base::operator()(p,q,r,s,t); return Base::operator()(p,q,r,s,t);
} }
result_type operator() ( const Weighted_point_3 & p, Oriented_side operator() (const Weighted_point_3& p,
const Weighted_point_3 & q, const Weighted_point_3& q,
const Weighted_point_3 & r, const Weighted_point_3& r,
const Weighted_point_3 & t) const const Weighted_point_3& t) const
{ {
CGAL_BRANCH_PROFILER_3("semi-static failures/attempts/calls to : Power_side_of_oriented_power_sphere_3 with 3+1 wpoints", tmp); CGAL_BRANCH_PROFILER_3("semi-static failures/attempts/calls to : Power_side_of_oriented_power_sphere_3 with 3+1 wpoints", tmp);
@ -410,7 +410,7 @@ namespace CGAL { namespace internal { namespace Static_filters_predicates {
} }
} }
} }
return static_cast<result_type>(cmp * int_tmp_result_FFWKCAA); return static_cast<Oriented_side>(cmp * int_tmp_result_FFWKCAA);
} }
int int_tmp_result_k60Ocge; int int_tmp_result_k60Ocge;
double RT_tmp_result_3SPBwDj = CGAL::determinant( dpx, dpz, dpt, dqx, dqz, dqt, drx, drz, drt ); double RT_tmp_result_3SPBwDj = CGAL::determinant( dpx, dpz, dpt, dqx, dqz, dqt, drx, drz, drt );
@ -498,7 +498,7 @@ namespace CGAL { namespace internal { namespace Static_filters_predicates {
} }
} }
} }
return static_cast<result_type>(cmp * int_tmp_result_k3Lzf6g); return static_cast<Oriented_side>(cmp * int_tmp_result_k3Lzf6g);
} }
int int_tmp_result_AvrrXBP; int int_tmp_result_AvrrXBP;
double RT_tmp_result_feLwnHn = CGAL::determinant( dpy, dpz, dpt, dqy, dqz, dqt, dry, drz, drt ); double RT_tmp_result_feLwnHn = CGAL::determinant( dpy, dpz, dpt, dqy, dqz, dqt, dry, drz, drt );
@ -581,15 +581,15 @@ namespace CGAL { namespace internal { namespace Static_filters_predicates {
} }
} }
} }
return static_cast<result_type>(cmp * int_tmp_result_agX3WsT); return static_cast<Oriented_side>(cmp * int_tmp_result_agX3WsT);
} }
else else
return Base::operator()(p,q,r,t); return Base::operator()(p,q,r,t);
} }
result_type operator() ( const Weighted_point_3 & p, Oriented_side operator() (const Weighted_point_3& p,
const Weighted_point_3 & q, const Weighted_point_3& q,
const Weighted_point_3 & t) const const Weighted_point_3& t) const
{ {
CGAL_BRANCH_PROFILER_3("semi-static failures/attempts/calls to : Power_side_of_oriented_power_sphere_3 with 2+1 wpoints", tmp); CGAL_BRANCH_PROFILER_3("semi-static failures/attempts/calls to : Power_side_of_oriented_power_sphere_3 with 2+1 wpoints", tmp);
@ -679,7 +679,7 @@ namespace CGAL { namespace internal { namespace Static_filters_predicates {
} }
} }
} }
return static_cast<result_type>(cmp * int_tmp_result); return static_cast<Oriented_side>(cmp * int_tmp_result);
} }
cmp = ((py > qy) ? 1 : ((py < qy) ? -1 : 0)); cmp = ((py > qy) ? 1 : ((py < qy) ? -1 : 0));
if( (cmp != 0) ) if( (cmp != 0) )
@ -722,7 +722,7 @@ namespace CGAL { namespace internal { namespace Static_filters_predicates {
} }
} }
} }
return static_cast<result_type>(cmp * int_tmp_result_FFWKCAA); return static_cast<Oriented_side>(cmp * int_tmp_result_FFWKCAA);
} }
cmp = ((pz > qz) ? 1 : ((pz < qz) ? -1 : 0)); cmp = ((pz > qz) ? 1 : ((pz < qz) ? -1 : 0));
int int_tmp_result_3SPBwDj; int int_tmp_result_3SPBwDj;
@ -765,7 +765,7 @@ namespace CGAL { namespace internal { namespace Static_filters_predicates {
} }
} }
} }
return static_cast<result_type>(cmp * int_tmp_result_3SPBwDj); return static_cast<Oriented_side>(cmp * int_tmp_result_3SPBwDj);
} }
else else
return Base::operator()(p,q,t); return Base::operator()(p,q,t);

View File

@ -23,11 +23,11 @@ template < typename K_base >
class Side_of_oriented_circle_2 class Side_of_oriented_circle_2
: public K_base::Side_of_oriented_circle_2 : public K_base::Side_of_oriented_circle_2
{ {
typedef typename K_base::Oriented_side Oriented_side;
typedef typename K_base::Point_2 Point_2; typedef typename K_base::Point_2 Point_2;
typedef typename K_base::Side_of_oriented_circle_2 Base; typedef typename K_base::Side_of_oriented_circle_2 Base;
public: public:
Oriented_side operator()(const Point_2 &p, const Point_2 &q, Oriented_side operator()(const Point_2 &p, const Point_2 &q,
const Point_2 &r, const Point_2 &t) const const Point_2 &r, const Point_2 &t) const
{ {

View File

@ -22,11 +22,11 @@ template < typename K_base >
class Side_of_oriented_sphere_3 class Side_of_oriented_sphere_3
: public K_base::Side_of_oriented_sphere_3 : public K_base::Side_of_oriented_sphere_3
{ {
typedef typename K_base::Oriented_side Oriented_side;
typedef typename K_base::Point_3 Point_3; typedef typename K_base::Point_3 Point_3;
typedef typename K_base::Side_of_oriented_sphere_3 Base; typedef typename K_base::Side_of_oriented_sphere_3 Base;
public: public:
Oriented_side Oriented_side
operator()(const Point_3 &p, const Point_3 &q, const Point_3 &r, operator()(const Point_3 &p, const Point_3 &q, const Point_3 &r,
const Point_3 &s, const Point_3 &t) const const Point_3 &s, const Point_3 &t) const

View File

@ -225,13 +225,11 @@ class Side_of_oriented_hyperbolic_segment_2
typedef typename Traits::Construct_weighted_circumcenter_2 Construct_weighted_circumcenter_2; typedef typename Traits::Construct_weighted_circumcenter_2 Construct_weighted_circumcenter_2;
public: public:
typedef Oriented_side result_type;
Side_of_oriented_hyperbolic_segment_2(const Traits& gt = Traits()) : _gt(gt) {} Side_of_oriented_hyperbolic_segment_2(const Traits& gt = Traits()) : _gt(gt) {}
result_type operator()(const Hyperbolic_point_2& p, Oriented_side operator()(const Hyperbolic_point_2& p,
const Hyperbolic_point_2& q, const Hyperbolic_point_2& q,
const Hyperbolic_point_2& query) const const Hyperbolic_point_2& query) const
{ {
// Check first if the points are collinear with the origin // Check first if the points are collinear with the origin
Circle_2 poincare(Hyperbolic_point_2(FT(0),FT(0)), FT(1)); Circle_2 poincare(Hyperbolic_point_2(FT(0),FT(0)), FT(1));

View File

@ -8,9 +8,8 @@ class MyConstruct_point_2
typedef typename K::Point_2 Point_2; typedef typename K::Point_2 Point_2;
typedef typename K::Line_2 Line_2; typedef typename K::Line_2 Line_2;
typedef typename Point_2::Rep Rep; typedef typename Point_2::Rep Rep;
public:
typedef Point_2 result_type;
public:
// Note : the CGAL::Return_base_tag is really internal CGAL stuff. // Note : the CGAL::Return_base_tag is really internal CGAL stuff.
// Unfortunately it is needed for optimizing away copy-constructions, // Unfortunately it is needed for optimizing away copy-constructions,
// due to current lack of delegating constructors in the C++ standard. // due to current lack of delegating constructors in the C++ standard.

View File

@ -8,8 +8,6 @@ typedef K::Line_2 Line_2;
typedef K::Intersect_2 Intersect_2; typedef K::Intersect_2 Intersect_2;
struct Intersection_visitor { struct Intersection_visitor {
typedef void result_type;
void operator()(const Point_2& p) const void operator()(const Point_2& p) const
{ {
std::cout << p << std::endl; std::cout << p << std::endl;

File diff suppressed because it is too large Load Diff

View File

@ -254,22 +254,23 @@ template <class R, int dim>
class Compare_signed_distance_to_line_projected_3 class Compare_signed_distance_to_line_projected_3
{ {
public: public:
typedef typename R::Comparison_result Comparison_result;
typedef typename R::Point_3 Point_3; typedef typename R::Point_3 Point_3;
typedef typename R::Point_2 Point_2; typedef typename R::Point_2 Point_2;
typedef typename R::FT RT; typedef typename R::FT RT;
typename R::FT x(const Point_3 &p) const { return Projector<R,dim>::x(p); } 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); } typename R::FT y(const Point_3 &p) const { return Projector<R,dim>::y(p); }
typedef typename R::Comparison_result result_type;
Point_2 project(const Point_3& p) const Point_2 project(const Point_3& p) const
{ {
return Point_2(x(p),y(p)); return Point_2(x(p),y(p));
} }
result_type operator()(const Point_3& p, Comparison_result operator()(const Point_3& p,
const Point_3& q, const Point_3& q,
const Point_3& r, const Point_3& r,
const Point_3& s) const const Point_3& s) const
{ {
return typename R::Compare_signed_distance_to_line_2() return typename R::Compare_signed_distance_to_line_2()
( project(p), project(q), project(r), project(s) ); ( project(p), project(q), project(r), project(s) );
@ -280,22 +281,23 @@ template <class R, int dim>
class Less_signed_distance_to_line_projected_3 class Less_signed_distance_to_line_projected_3
{ {
public: public:
typedef typename R::Boolean Boolean;
typedef typename R::Point_3 Point_3; typedef typename R::Point_3 Point_3;
typedef typename R::Point_2 Point_2; typedef typename R::Point_2 Point_2;
typedef typename R::FT RT; typedef typename R::FT RT;
typename R::FT x(const Point_3 &p) const { return Projector<R,dim>::x(p); } 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); } typename R::FT y(const Point_3 &p) const { return Projector<R,dim>::y(p); }
typedef typename R::Boolean result_type;
Point_2 project(const Point_3& p) const Point_2 project(const Point_3& p) const
{ {
return Point_2(x(p),y(p)); return Point_2(x(p),y(p));
} }
result_type operator()(const Point_3& p, Boolean operator()(const Point_3& p,
const Point_3& q, const Point_3& q,
const Point_3& r, const Point_3& r,
const Point_3& s) const const Point_3& s) const
{ {
return typename R::Less_signed_distance_to_line_2() return typename R::Less_signed_distance_to_line_2()
( project(p), project(q), project(r), project(s) ); ( project(p), project(q), project(r), project(s) );
@ -597,8 +599,6 @@ class Compute_squared_length_projected_3
typedef typename R::Vector_3 Vector_3; typedef typename R::Vector_3 Vector_3;
typedef typename R::FT FT; typedef typename R::FT FT;
typedef FT result_type;
FT x(const Vector_3 &v) const { return Projector<R,dim>::x(v); } FT x(const Vector_3 &v) const { return Projector<R,dim>::x(v); }
FT y(const Vector_3 &v) const { return Projector<R,dim>::y(v); } FT y(const Vector_3 &v) const { return Projector<R,dim>::y(v); }
@ -972,8 +972,8 @@ public:
struct Less_xy_2 { struct Less_xy_2 {
typedef typename R::Boolean result_type; typedef typename R::Boolean Boolean;
bool operator()(const Point_2& p, const Point_2& q) const Boolean operator()(const Point_2& p, const Point_2& q) const
{ {
Compare_x_2 cx; Compare_x_2 cx;
Comparison_result crx = cx(p,q); Comparison_result crx = cx(p,q);
@ -986,8 +986,8 @@ public:
struct Less_yx_2 { struct Less_yx_2 {
typedef typename R::Boolean result_type; typedef typename R::Boolean Boolean;
bool operator()(const Point_2& p, const Point_2& q) const Boolean operator()(const Point_2& p, const Point_2& q) const
{ {
Compare_y_2 cy; Compare_y_2 cy;
Comparison_result cry = cy(p,q); Comparison_result cry = cy(p,q);
@ -999,8 +999,8 @@ public:
}; };
struct Equal_2 { struct Equal_2 {
typedef typename R::Boolean result_type; typedef typename R::Boolean Boolean;
bool operator()(const Point_2& p, const Point_2& q) const Boolean operator()(const Point_2& p, const Point_2& q) const
{ {
Equal_x_2 eqx; Equal_x_2 eqx;
@ -1010,8 +1010,8 @@ public:
}; };
struct Left_turn_2 { struct Left_turn_2 {
typedef typename R::Boolean result_type; typedef typename R::Boolean Boolean;
bool operator()(const Point_2& p, const Point_2& q, const Point_2& r) const Boolean operator()(const Point_2& p, const Point_2& q, const Point_2& r) const
{ {
Orientation_2 ori; Orientation_2 ori;
@ -1020,7 +1020,7 @@ public:
}; };
struct Collinear_2 { struct Collinear_2 {
typedef typename R::Boolean result_type; typedef typename R::Boolean Boolean;
bool operator()(const Point_2& p, const Point_2& q, const Point_2& r) const bool operator()(const Point_2& p, const Point_2& q, const Point_2& r) const
{ {
Orientation_2 ori; Orientation_2 ori;

View File

@ -34,7 +34,6 @@ class Projected_orientation_with_normal_3
typedef typename Traits::Vector_3 Vector_3; typedef typename Traits::Vector_3 Vector_3;
public: public:
typedef typename K::Orientation Orientation; typedef typename K::Orientation Orientation;
typedef Orientation result_type;
Projected_orientation_with_normal_3(const Vector_3& normal_) Projected_orientation_with_normal_3(const Vector_3& normal_)
: normal(normal_) : normal(normal_)
@ -69,7 +68,6 @@ class Projected_side_of_oriented_circle_with_normal_3
public: public:
typedef typename K::Oriented_side Oriented_side; typedef typename K::Oriented_side Oriented_side;
typedef Oriented_side result_type;
Projected_side_of_oriented_circle_with_normal_3(const Vector_3& normal_) Projected_side_of_oriented_circle_with_normal_3(const Vector_3& normal_)
: normal(normal_) : normal(normal_)
@ -307,6 +305,7 @@ template <class Traits>
class Less_along_axis class Less_along_axis
{ {
// private members // private members
typedef typename Traits::Boolean Boolean;
typedef typename Traits::Vector_3 Vector_3; typedef typename Traits::Vector_3 Vector_3;
typedef typename Traits::Point_2 Point; typedef typename Traits::Point_2 Point;
Vector_3 base; Vector_3 base;
@ -317,9 +316,7 @@ public:
CGAL_TIME_PROFILER("Construct Less_along_axis") CGAL_TIME_PROFILER("Construct Less_along_axis")
} }
typedef bool result_type; Boolean operator() (const Point &p, const Point &q) const {
bool operator() (const Point &p, const Point &q) const {
return base * (p - q) < 0; return base * (p - q) < 0;
} }
}; // end class Less_along_axis }; // end class Less_along_axis
@ -328,6 +325,7 @@ template <class Traits>
class Compare_along_axis class Compare_along_axis
{ {
// private members // private members
typedef typename Traits::Comparison_result Comparison_result;
typedef typename Traits::Vector_3 Vector_3; typedef typename Traits::Vector_3 Vector_3;
typedef typename Traits::Point_2 Point; typedef typename Traits::Point_2 Point;
Vector_3 base; Vector_3 base;
@ -338,8 +336,6 @@ public:
CGAL_TIME_PROFILER("Construct Compare_along_axis") CGAL_TIME_PROFILER("Construct Compare_along_axis")
} }
typedef Comparison_result result_type;
Comparison_result operator() (const Point &p, const Point &q) const { Comparison_result operator() (const Point &p, const Point &q) const {
return compare(base * (p - q), 0); return compare(base * (p - q), 0);
} }
@ -349,6 +345,7 @@ template <class Traits>
class Less_xy_along_axis class Less_xy_along_axis
{ {
// private members // private members
typedef typename Traits::Boolean Boolean;
typedef typename Traits::Vector_3 Vector_3; typedef typename Traits::Vector_3 Vector_3;
typedef typename Traits::Point_2 Point; typedef typename Traits::Point_2 Point;
Vector_3 base1, base2; Vector_3 base1, base2;
@ -359,9 +356,7 @@ public:
CGAL_TIME_PROFILER("Construct Less_xy_along_axis") CGAL_TIME_PROFILER("Construct Less_xy_along_axis")
} }
typedef bool result_type; Boolean operator() (const Point &p, const Point &q) const {
bool operator() (const Point &p, const Point &q) const {
Compare_along_axis<Traits> cx(base1); Compare_along_axis<Traits> cx(base1);
Comparison_result crx = cx(p, q); Comparison_result crx = cx(p, q);