// ====================================================================== // // Copyright (c) 1999 The CGAL Consortium // // This software and related documentation is part of an INTERNAL release // of the Computational Geometry Algorithms Library (CGAL). It is not // intended for general use. // // ---------------------------------------------------------------------- // // release : // release_date : // // file : Ray_3.h // package : _3 // revision : $Revision$ // revision_date : $Date$ // author(s) : Andreas Fabri // Stefan Schirra // // coordinator : MPI, Saarbruecken () // ====================================================================== #ifndef CGAL_RAY_3_H #define CGAL_RAY_3_H #ifndef CGAL_REP_CLASS_DEFINED #error no representation class defined #endif #if defined CGAL_HOMOGENEOUS_H || defined CGAL_SIMPLE_HOMOGENEOUS_H #include #endif #if defined CGAL_CARTESIAN_H || defined CGAL_SIMPLE_CARTESIAN_H #include #endif #include #include #include CGAL_BEGIN_NAMESPACE template class Ray_3 : public R_::Ray_3_base { public: typedef R_ R; typedef typename R::RT RT; typedef typename R::FT FT; typedef typename R::Ray_3_base RRay_3; Ray_3() : RRay_3() {} Ray_3(const CGAL::Ray_3& r) : RRay_3(r) {} Ray_3(const RRay_3& r) : RRay_3(r) {} Ray_3(const CGAL::Point_3& sp, const CGAL::Point_3& secondp) : RRay_3(sp, secondp) {} Ray_3(const CGAL::Point_3& sp, const CGAL::Direction_3& d) : RRay_3(sp, d) {} bool operator==(const CGAL::Ray_3& r) const { return RRay_3::operator==(r); } bool operator!=(const CGAL::Ray_3& r) const { return !(*this == r); } CGAL::Point_3 start() const { return RRay_3::start(); } CGAL::Point_3 source() const { return RRay_3::source(); } CGAL::Point_3 second_point() const { return RRay_3::second_point(); } CGAL::Point_3 point(int i) const { return RRay_3::point(i); } CGAL::Direction_3 direction() const { return RRay_3::direction(); } CGAL::Line_3 supporting_line() const { return RRay_3::supporting_line(); } CGAL::Ray_3 opposite() const { return RRay_3::opposite(); } CGAL::Ray_3 transform(const CGAL::Aff_transformation_3& t) const { return RRay_3::transform(t); } bool is_degenerate() const { return RRay_3::is_degenerate(); } bool has_on(const CGAL::Point_3& p) const { return RRay_3::has_on(p); } }; #ifndef CGAL_NO_OSTREAM_INSERT_RAY_3 template < class R > std::ostream& operator<<(std::ostream& os, const Ray_3& r) { typedef typename R::Ray_3_base RRay_3; return os << static_cast(r); } #endif // CGAL_NO_OSTREAM_INSERT_RAY_3 #ifndef CGAL_NO_ISTREAM_EXTRACT_RAY_3 template < class R > std::istream& operator>>(std::istream& is, Ray_3& r) { typedef typename R::Ray_3_base RRay_3; return is >> static_cast(r); } #endif // CGAL_NO_ISTREAM_EXTRACT_RAY_3 CGAL_END_NAMESPACE #endif // CGAL_RAY_3_H