#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 Construct::type Cv_; // typedef typename R_::Compute_squared_distance Csd_; typedef std::pair Data_; Data_ data; public: typedef Segmentd Segment; #ifdef CGAL_CXX0X template Segmentd(U&&...u):data(std::forward(u)...){} #else Segmentd(){} Segmentd(Point_ const&a, Point_ const&b): data(a,b) {} #endif Point_ source()const{return data.first;} Point_ target()const{return data.second;} Point_ operator[](int i)const{ if((i%2)==0) return data.first; else return data.second; } Segmentd opposite()const{ return Segmentd(data.second,data.first); } 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