51 #ifndef CGAL_SEGMENT_3_H
52 #define CGAL_SEGMENT_3_H
54 #ifndef CGAL_REP_CLASS_DEFINED
55 #error no representation class defined
56 #endif // CGAL_REP_CLASS_DEFINED
58 #ifdef CGAL_HOMOGENEOUS_H
59 #ifndef CGAL_SEGMENTH3_H
60 #include <CGAL/SegmentH3.h>
61 #endif // CGAL_SEGMENTH3_H
62 #endif // CGAL_HOMOGENEOUS_H
64 #ifdef CGAL_CARTESIAN_H
65 #ifndef CGAL_SEGMENTC3_H
66 #include <CGAL/Cartesian/Segment_3.h>
67 #endif // CGAL_SEGMENTC3_H
68 #endif // CGAL_CARTESIAN_H
70 #ifdef CGAL_SIMPLE_CARTESIAN_H
72 #endif // CGAL_SIMPLE_CARTESIAN_H
77 #endif // CGAL_LINE_3_H
82 class Segment_3 :
public R_::Segment_3_base
86 typedef typename R::RT
RT;
87 typedef typename R::FT
FT;
94 Segment_3(
const CGAL::Point_3<R>& sp,
const CGAL::Point_3<R>& ep)
100 bool has_on(
const CGAL::Point_3<R>& p)
const
101 {
return RSegment_3::has_on(p); }
105 {
return !(*
this ==
s); }
107 {
return RSegment_3::start(); }
108 CGAL::Point_3<R>
end()
const
109 {
return RSegment_3::end(); }
111 {
return RSegment_3::source(); }
113 {
return RSegment_3::target(); }
114 CGAL::Point_3<R>
min()
const
116 CGAL::Point_3<R>
max()
const
119 {
return RSegment_3::vertex(i); }
123 {
return RSegment_3::squared_length(); }
125 {
return RSegment_3::direction(); }
128 CGAL::Segment_3<R>
transform(
const CGAL::Aff_transformation_3<R>& t)
const
129 {
return RSegment_3::transform(t); }
131 {
return RSegment_3::supporting_line(); }
133 {
return RSegment_3::is_degenerate(); }
139 #ifndef NO_OSTREAM_INSERT_SEGMENT_3
142 operator<<(std::ostream& os, const Segment_3<R>&
s)
144 typedef typename R::Segment_3_base RSegment_3;
145 return os << (
const RSegment_3& )
s;
147 #endif // NO_OSTREAM_INSERT_SEGMENT_3
149 #ifndef NO_ISTREAM_EXTRACT_SEGMENT_3
154 typedef typename R::Segment_3_base RSegment_3;
155 return is >> (RSegment_3& )s;
157 #endif // NO_ISTREAM_EXTRACT_SEGMENT_3
163 #endif // CGAL_SEGMENT_3_H
CGAL::Direction_3< R > direction() const
CGAL_END_NAMESPACE CGAL_BEGIN_NAMESPACE bool operator==(const Origin &o, const Point_2< R > &p)
CGAL::Segment_3< R > transform(const CGAL::Aff_transformation_3< R > &t) const
CGAL::Point_3< R > end() const
bool operator==(const CGAL::Segment_3< R > &s) const
Vector_n max(const Array_n_const &v1, const Array_n_const &v2)
CGAL::Point_3< R > operator[](int i) const
CGAL::Point_3< R > min() const
bool operator!=(const CGAL::Segment_3< R > &s) const
CGAL::Point_3< R > vertex(int i) const
CGAL::Point_3< R > max() const
CGAL::Point_3< R > start() const
CGAL::Point_3< R > target() const
Segment_3(const RSegment_3 &s)
bool has_on(const CGAL::Point_3< R > &p) const
CGAL::Segment_3< R > opposite() const
Segment_3(const CGAL::Segment_3< R > &s)
Vector_n min(const Array_n_const &v1, const Array_n_const &v2)
CGAL::Line_3< R > supporting_line() const
#define CGAL_BEGIN_NAMESPACE
bool is_degenerate() const
R::Segment_3_base RSegment_3
FT squared_length() const
#define CGAL_END_NAMESPACE
CGAL::Point_3< R > source() const
Segment_3(const CGAL::Point_3< R > &sp, const CGAL::Point_3< R > &ep)