// revision : 2.8 // revision_date : 28 Oct 1999 // author(s) : Hervé Brönnimann #ifndef CGAL_LINE_D_H #define CGAL_LINE_D_H #ifndef CGAL_REP_CLASS_DEFINED #error no representation class defined #endif // CGAL_REP_CLASS_DEFINED #ifdef CGAL_HOMOGENEOUS_H #include #endif // CGAL_HOMOGENEOUS_H #ifdef CGAL_CARTESIAN_H #include #endif // CGAL_CARTESIAN_H #include #include #include CGAL_BEGIN_NAMESPACE template class Line_d : public _R::Line_d_base { public: typedef _R R; typedef typename R::RT RT; typedef typename R::FT FT; typedef typename R::Line_d_base RLine_d; Line_d() : RLine_d() {} Line_d(const CGAL::Line_d & l) : RLine_d( ( const RLine_d& )l) {} Line_d(const CGAL::Point_d & p, const CGAL::Point_d & q) : RLine_d(p,q) {} // conversion impl -> interface class Line_d(const RLine_d& l) : RLine_d(l) {} Line_d(const CGAL::Segment_d & s) : RLine_d( s ) {} Line_d(const CGAL::Ray_d & r) : RLine_d( r ) {} Line_d(const CGAL::Point_d & p, const CGAL::Direction_d & d) : RLine_d( p, d ) {} CGAL::Line_d& operator=(const CGAL::Line_d & l) { RLine_d::operator=(l); return *this; } bool operator==(const CGAL::Line_d & l) const { return RLine_d::operator==(l); } bool operator!=(const CGAL::Line_d & l) const { return !(*this == l); } int id() const /* XXX */ { return (int) PTR; } CGAL::Plane_d perpendicular_plane(const CGAL::Point_d & p) const { return RLine_d::perpendicular_plane(p); } CGAL::Line_d opposite() const { return RLine_d::opposite(); } CGAL::Point_d point() const { return RLine_d::point(); } CGAL::Point_d point(int i) const { return RLine_d::point(i); } CGAL::Point_d projection(const CGAL::Point_d& p) const { return RLine_d::projection(p); } CGAL::Direction_d direction() const { return RLine_d::direction(); } bool has_on(const CGAL::Point_d& p) const { return RLine_d::has_on(p); } bool is_degenerate() const { return RLine_d::is_degenerate(); } // CGAL::Line_d transform(const CGAL::Aff_transformation_d & t) const // { return RLine_d::transform(t); } }; #ifndef NO_OSTREAM_INSERT_LINE_D template < class R > std::ostream& operator<<(std::ostream& os, const Line_d& l) { typedef typename R::Line_d_base RLine_d; return os << (const RLine_d& )l; } #endif // NO_OSTREAM_INSERT_LINE_D #ifndef NO_ISTREAM_EXTRACT_LINE_D template < class R > std::istream& operator>>(std::istream & is, Line_d & p) { typedef typename R::Line_d_base RLine_d; is >> ( RLine_d& )p; return is; } #endif // NO_ISTREAM_EXTRACT_LINE_D CGAL_END_NAMESPACE #ifndef CGAL_PLANE_D_H #include #endif // CGAL_PLANE_3_H #endif // CGAL_LINE_3_H