// revision : 2.8 // revision_date : 28 Oct 1999 // author(s) : Hervé Brönnimann #ifndef CGAL_RAY_D_H #define CGAL_RAY_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 CGAL_BEGIN_NAMESPACE template class Ray_d : public _R::Ray_d_base { public: typedef _R R; typedef typename R::RT RT; typedef typename R::FT FT; typedef typename R::Ray_d_base RRay_d; Ray_d() : RRay_d() {} Ray_d(const CGAL::Ray_d& r) : RRay_d(r) {} Ray_d(const RRay_d& r) : RRay_d(r) {} Ray_d(const CGAL::Point_d& sp, const CGAL::Point_d& secondp) : RRay_d(sp, secondp) {} Ray_d(const CGAL::Point_d& sp, const CGAL::Direction_d& d) : RRay_d(sp, d) {} CGAL::Ray_d& operator=(const CGAL::Ray_d& r) { RRay_d::operator=(r); return *this; } bool operator==(const CGAL::Ray_d& r) const { return RRay_d::operator==(r); } bool operator!=(const CGAL::Ray_d& r) const { return !(*this == r); } int id() const /* XXX */ { return (int) PTR ; } CGAL::Point_d start() const { return RRay_d::start(); } CGAL::Point_d source() const { return RRay_d::source(); } CGAL::Point_d second_point() const { return RRay_d::second_point(); } CGAL::Point_d point(int i) const { return RRay_d::point(i); } CGAL::Direction_d direction() const { return RRay_d::direction(); } CGAL::Line_d supporting_line() const { return RRay_d::supporting_line(); } CGAL::Ray_d opposite() const { return RRay_d::opposite(); } // CGAL::Ray_d transform(const CGAL::Aff_transformation_d& t) const // { return RRay_d::transform(t); } bool is_degenerate() const { return RRay_d::is_degenerate(); } bool has_on(const CGAL::Point_d& p) const { return RRay_d::has_on(p); } }; #ifndef NO_OSTREAM_INSERT_RAY_D template < class R > std::ostream& operator<<(std::ostream& os, const Ray_d& r) { typedef typename R::Ray_d_base RRay_d; return os << (const RRay_d& )r; } #endif // NO_OSTREAM_INSERT_RAY_D #ifndef NO_ISTREAM_EXTRACT_RAY_D template < class R > std::istream& operator>>(std::istream& is, Ray_d& r) { typedef typename R::Ray_d_base RRay_d; return is >> (RRay_d& )r; } #endif // NO_ISTREAM_EXTRACT_RAY_D CGAL_END_NAMESPACE #include #endif // CGAL_RAY_D_H