53 #ifndef CGAL_REP_CLASS_DEFINED
54 #error no representation class defined
55 #endif // CGAL_REP_CLASS_DEFINED
57 #ifndef CGAL_SEGMENT_2_H
59 #endif // CGAL_SEGMENT_2_H
61 #ifdef CGAL_HOMOGENEOUS_H
63 #include <CGAL/RayH2.h>
64 #endif // CGAL_RAYH2_H
65 #endif // CGAL_HOMOGENEOUS_H
67 #ifdef CGAL_CARTESIAN_H
69 #include <CGAL/Cartesian/Ray_2.h>
70 #endif // CGAL_RAYC2_H
71 #endif // CGAL_CARTESIAN_H
73 #ifdef CGAL_SIMPLE_CARTESIAN_H
75 #endif // CGAL_SIMPLE_CARTESIAN_H
81 class Ray_2 :
public R_::Ray_2_base
85 typedef typename R::RT
RT;
86 typedef typename R::FT
FT;
87 typedef typename R::Ray_2_base
RRay_2;
109 const CGAL::Point_2<R> &secondp)
114 const CGAL::Direction_2<R> &
d)
123 {
return !(*
this == r); }
126 {
return RRay_2::start(); }
129 {
return RRay_2::source(); }
132 {
return RRay_2::second_point(); }
135 {
return RRay_2::point(i); }
138 {
return RRay_2::direction(); }
141 {
return RRay_2::supporting_line(); }
146 CGAL::Ray_2<R>
transform(
const CGAL::Aff_transformation_2<R> &t)
const
147 {
return RRay_2::transform(t); }
150 {
return RRay_2::is_horizontal(); }
153 {
return RRay_2::is_vertical(); }
156 {
return RRay_2::is_degenerate(); }
158 bool has_on(
const CGAL::Point_2<R> &p)
const
159 {
return RRay_2::has_on(p); }
162 {
return RRay_2::collinear_has_on(p); }
166 #ifndef NO_OSTREAM_INSERT_RAY_2
169 operator<<(std::ostream &os, const Ray_2<R> &r)
171 typedef typename R::Ray_2_base RRay_2;
172 return os << (
const RRay_2&)r;
174 #endif // NO_OSTREAM_INSERT_RAY_2
176 #ifndef NO_ISTREAM_EXTRACT_RAY_2
181 typedef typename R::Ray_2_base RRay_2;
182 return is >> (RRay_2&)r;
184 #endif // NO_ISTREAM_EXTRACT_RAY_2
189 #endif // CGAL_RAY_2_H
CGAL::Point_2< R > point(int i) const
CGAL_END_NAMESPACE CGAL_BEGIN_NAMESPACE bool operator==(const Origin &o, const Point_2< R > &p)
bool is_degenerate() const
Ray_2(const CGAL::Ray_2< R > &r)
bool is_horizontal() const
CGAL::Point_2< R > start() const
bool operator!=(const CGAL::Ray_2< R > &r) const
bool collinear_has_on(const CGAL::Point_2< R > &p) const
Ray_2(const CGAL::Point_2< R > &sp, const CGAL::Direction_2< R > &d)
bool has_on(const CGAL::Point_2< R > &p) const
CGAL::Direction_2< R > direction() const
CGAL::Ray_2< R > transform(const CGAL::Aff_transformation_2< R > &t) const
CGAL::Ray_2< R > opposite() const
CGAL_BEGIN_NAMESPACE T opposite(const T &t)
CGAL::Point_2< R > source() const
#define CGAL_BEGIN_NAMESPACE
CGAL::Point_2< R > second_point() const
bool operator==(const CGAL::Ray_2< R > &r) const
CGAL::Line_2< R > supporting_line() const
Ray_2(const CGAL::Point_2< R > &sp, const CGAL::Point_2< R > &secondp)
#define CGAL_END_NAMESPACE