#ifndef CGAL_KERNELD_SEGMENTD_H #define CGAL_KERNELD_SEGMENTD_H #include #include #define Segmentd SegmentCd namespace CGAL { template class Segmentd { typedef typename R_::FT FT_; typedef typename R_::Point Point_; //typedef typename R_::Vector Vector_; //typedef typename R_::template Functor >::type Cv_; // typedef typename R_::Compute_squared_distance Csd_; typedef std::pair Data_; Data_ data; public: typedef Segmentd Segment; #ifdef CGAL_CXX0X //FIXME: don't forward directly, piecewise_constuct should call the point construction functor (I guess? or is it unnecessary?) template::type...>,std::tuple>::value>::type> Segmentd(U&&...u):data(std::forward(u)...){} #else Segmentd(){} Segmentd(Point_ const&a, Point_ const&b): data(a,b) {} //template //Segmentd(A const&,T1 const&t1,T2 const&t2) #endif Point_ source()const{return data.first;} Point_ target()const{return data.second;} Point_ operator[](int i)const{ if((i%2)==0) return source(); else return target(); } Segmentd opposite()const{ return Segmentd(target(),source()); } //Vector_ vector()const{ // return Cv_()(data.first,data.second); //} // FT_ squared_length()const{ // return Csd_()(data.first,data.second); // } }; } // namespace CGAL #undef Segmentd #endif // CGAL_KERNELD_SEGMENTD_H