51 #ifndef CGAL_SEGMENTS2_H
52 #define CGAL_SEGMENTS2_H
102 template <
class FT >
106 template <
class FT >
113 template <
class FT >
117 {
return ( (source() == s.
source()) && (target() == s.
target()) ); }
119 template <
class FT >
123 {
return !(*
this ==
s); }
125 template <
class FT >
131 template <
class FT >
138 template <
class FT >
144 template <
class FT >
151 template <
class FT >
160 template <
class FT >
169 template <
class FT >
173 {
return (i%2 ==0) ? source() : target(); }
175 template <
class FT >
179 {
return (i%2 ==0) ? source() : target(); }
181 template <
class FT >
185 {
return vertex(i); }
187 template <
class FT >
193 template <
class FT >
199 template <
class FT >
205 template <
class FT >
211 template <
class FT >
217 template <
class FT >
221 {
return source().bbox() + target().bbox(); }
223 template <
class FT >
227 {
return (source() == target()); }
230 #ifndef CGAL_NO_OSTREAM_INSERT_SEGMENTS2
231 template <
class FT >
232 std::ostream& operator<<(std::ostream &os, const SegmentS2<FT> &
s)
236 return os <<
s.source() <<
' ' <<
s.target();
238 return os <<
s.source() <<
s.target();
240 return os <<
"SegmentS2(" <<
s.source() <<
", " <<
s.target() <<
")";
243 #endif // CGAL_NO_OSTREAM_INSERT_SEGMENTS2
245 #ifndef CGAL_NO_ISTREAM_EXTRACT_SEGMENTS2
246 template <
class FT >
256 #endif // CGAL_NO_ISTREAM_EXTRACT_SEGMENTS2
258 template <
class FT >
262 {
return source().y() == target().y(); }
264 template <
class FT >
268 {
return source().x() == target().x(); }
270 template <
class FT >
275 return(( p == source() )
286 template <
class FT >
294 if (p.
x() < source().x())
295 return (p.
x() >= target().x());
296 if (p.
x() <= target().x())
298 return (p.
x() == source().x());
300 if (p.
y() < source().y())
301 return (p.
y() >= target().y());
302 if (p.
y() <= target().y())
304 return (p.
y() == source().y());
PointS2< FT > max() const
#define CGAL_KERNEL_CTOR_INLINE
PointS2< FT > point(int i) const
void int int REAL REAL * y
#define CGAL_KERNEL_INLINE
bool lexicographically_xy_smaller(const Point_2< R > &p, const Point_2< R > &q)
bool has_on(const PointS2< FT > &p) const
#define CGAL_KERNEL_MEDIUM_INLINE
const PointS2< FT > & start() const
bool operator!=(const SegmentS2< FT > &s) const
bool operator==(const SegmentS2< FT > &s) const
bool is_degenerate() const
FT squared_distance(const PointS3< FT > &p, const PointS3< FT > &q)
bool collinear(const Point_2< R > &p, const Point_2< R > &q, const Point_2< R > &r)
SegmentS2< FT > opposite() const
PointS2< FT > operator[](int i) const
PointS2< FT > min() const
bool collinear_has_on(const PointS2< FT > &p) const
#define CGAL_kernel_exactness_precondition(EX)
const PointS2< FT > & end() const
const PointS2< FT > & source() const
FT squared_length() const
SegmentS2< FT > transform(const Aff_transformationS2< FT > &t) const
#define CGAL_BEGIN_NAMESPACE
const PointS2< FT > & target() const
DirectionS2< FT > direction() const
PointS2< FT > vertex(int i) const
#define CGAL_END_NAMESPACE
LineS2< FT > supporting_line() const
bool is_horizontal() const