#ifndef CGAL_KERNEL_D_CARTESIAN_CHANGE_FT_H #define CGAL_KERNEL_D_CARTESIAN_CHANGE_FT_H #include #include #include #include namespace CGAL { template < typename Base_, typename FT_, typename LA_=CGAL::LA_eigen > struct Cartesian_change_FT_base : public Base_ { CGAL_CONSTEXPR Cartesian_change_FT_base(){} CGAL_CONSTEXPR Cartesian_change_FT_base(int d):Base_(d){} typedef Cartesian_change_FT_base Self; typedef Base_ Kernel_base; typedef FT_ RT; typedef FT_ FT; typedef LA_ LA; typedef typename Same_uncertainty_nt::type Boolean; typedef typename Same_uncertainty_nt::type Sign; typedef typename Same_uncertainty_nt::type Comparison_result; typedef typename Same_uncertainty_nt::type Orientation; typedef typename Same_uncertainty_nt::type Oriented_side; typedef typename Same_uncertainty_nt::type Bounded_side; typedef typename Same_uncertainty_nt::type Angle; typedef NT_converter FT_converter; typedef transforming_iterator Point_cartesian_const_iterator; typedef transforming_iterator Vector_cartesian_const_iterator; //FIXME: use Iterator_list! /* template::value_tag,FT_tag>::value> struct Iterator : Get_type {}; template struct Iterator { typedef transforming_iterator::type> type; }; */ template struct Construct_cartesian_const_iterator_ { typedef typename Get_functor::type Functor_base; Construct_cartesian_const_iterator_(){} Construct_cartesian_const_iterator_(Self const&r):f(r){} Functor_base f; typedef Type_ result_type; template result_type operator()(T const& v, Begin_tag)const{ return make_transforming_iterator(f(v,Begin_tag()),FT_converter()); } template result_type operator()(T const& v, End_tag)const{ return make_transforming_iterator(f(v,End_tag()),FT_converter()); } }; typedef Construct_cartesian_const_iterator_,Point_cartesian_const_iterator> Construct_point_cartesian_const_iterator; typedef Construct_cartesian_const_iterator_,Vector_cartesian_const_iterator> Construct_vector_cartesian_const_iterator; template struct Compute_cartesian_coordinate { typedef typename Get_functor::type Functor_base; Compute_cartesian_coordinate(){} Compute_cartesian_coordinate(Self const&r):f(r){} Functor_base f; typedef FT result_type; template result_type operator()(Obj_ const& v,int i)const{ return FT_converter()(f(v,i)); } }; template::type> struct Functor : Get_functor { }; template struct Functor { typedef Null_functor type; }; template struct Functor { typedef Null_functor type; }; template struct Functor { typedef Compute_cartesian_coordinate type; }; template struct Functor { typedef Compute_cartesian_coordinate type; }; template struct Functor,D,Construct_iterator_tag> { typedef Construct_point_cartesian_const_iterator type; }; template struct Functor,D,Construct_iterator_tag> { typedef Construct_vector_cartesian_const_iterator type; }; }; template < typename Base_, typename FT_> struct Cartesian_change_FT : public Cartesian_complete_predicates< Cartesian_complete_computes< Cartesian_change_FT_base , true, Cartesian_change_FT > , true, Cartesian_change_FT > { CGAL_CONSTEXPR Cartesian_change_FT(){} CGAL_CONSTEXPR Cartesian_change_FT(int d):Cartesian_change_FT_base(d){} }; } //namespace CGAL #endif // CGAL_KERNEL_D_CARTESIAN_CHANGE_FT_H