Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Line_3.h
Go to the documentation of this file.
1 // ======================================================================
2 //
3 // Copyright (c) 1999 The CGAL Consortium
4 
5 // This software and related documentation is part of the Computational
6 // Geometry Algorithms Library (CGAL).
7 // This software and documentation is provided "as-is" and without warranty
8 // of any kind. In no event shall the CGAL Consortium be liable for any
9 // damage of any kind.
10 //
11 // Every use of CGAL requires a license.
12 //
13 // Academic research and teaching license
14 // - For academic research and teaching purposes, permission to use and copy
15 // the software and its documentation is hereby granted free of charge,
16 // provided that it is not a component of a commercial product, and this
17 // notice appears in all copies of the software and related documentation.
18 //
19 // Commercial licenses
20 // - A commercial license is available through Algorithmic Solutions, who also
21 // markets LEDA (http://www.algorithmic-solutions.de).
22 // - Commercial users may apply for an evaluation license by writing to
23 // Algorithmic Solutions (contact@algorithmic-solutions.com).
24 //
25 // The CGAL Consortium consists of Utrecht University (The Netherlands),
26 // ETH Zurich (Switzerland), Free University of Berlin (Germany),
27 // INRIA Sophia-Antipolis (France), Martin-Luther-University Halle-Wittenberg
28 // (Germany), Max-Planck-Institute Saarbrucken (Germany), RISC Linz (Austria),
29 // and Tel-Aviv University (Israel).
30 //
31 // ----------------------------------------------------------------------
32 //
33 // release : CGAL-2.2
34 // release_date : 2000, September 30
35 //
36 // source : Line_3.fw
37 // file : include/CGAL/Line_3.h
38 // package : _3 (3.7)
39 // revision : 3.7
40 // revision_date : 16 Aug 2000
41 // author(s) : Andreas Fabri
42 // Stefan Schirra
43 //
44 // coordinator : MPI, Saarbruecken (<Stefan.Schirra>)
45 // email : contact@cgal.org
46 // www : http://www.cgal.org
47 //
48 // ======================================================================
49 
50 
51 
52 #ifndef CGAL_LINE_3_H
53 #define CGAL_LINE_3_H
54 
55 #ifndef CGAL_REP_CLASS_DEFINED
56 #error no representation class defined
57 #endif // CGAL_REP_CLASS_DEFINED
58 
59 #ifdef CGAL_HOMOGENEOUS_H
60 #ifndef CGAL_LINEH3_H
61 #include <CGAL/LineH3.h>
62 #endif // CGAL_LINEH3_H
63 #endif // CGAL_HOMOGENEOUS_H
64 
65 #ifdef CGAL_CARTESIAN_H
66 #ifndef CGAL_LINEC3_H
67 #include <CGAL/Cartesian/Line_3.h>
68 #endif // CGAL_LINEC3_H
69 #endif // CGAL_CARTESIAN_H
70 
71 #ifdef CGAL_SIMPLE_CARTESIAN_H
73 #endif // CGAL_SIMPLE_CARTESIAN_H
74 
75 
76 #ifndef CGAL_SEGMENT_3_H
77 #include <CGAL/Segment_3.h>
78 #endif // CGAL_SEGMENT_3_H
79 #ifndef CGAL_POINT_3_H
80 #include <CGAL/Point_3.h>
81 #endif // CGAL_POINT_3_H
82 #ifndef CGAL_RAY_3_H
83 #include <CGAL/Ray_3.h>
84 #endif // CGAL_RAY_3_H
85 
87 
88 template <class R_>
89 class Line_3 : public R_::Line_3_base
90 {
91 public:
92  typedef R_ R;
93  typedef typename R::RT RT;
94  typedef typename R::FT FT;
95  typedef typename R::Line_3_base RLine_3;
96 
98  {}
99  Line_3(const CGAL::Line_3<R> & l) : RLine_3( ( const RLine_3& )l)
100  {}
101  Line_3(const CGAL::Point_3<R> & p,
102  const CGAL::Point_3<R> & q) : RLine_3(p,q)
103  {}
104  // conversion impl -> interface class
105  Line_3(const RLine_3& l) : RLine_3(l)
106  {}
107  Line_3(const CGAL::Segment_3<R> & s) : RLine_3( s )
108  {}
109  Line_3(const CGAL::Ray_3<R> & r) : RLine_3( r )
110  {}
111  Line_3(const CGAL::Point_3<R> & p,
112  const CGAL::Direction_3<R> & d) : RLine_3( p, d )
113  {}
114 
115  bool operator==(const CGAL::Line_3<R> & l) const
116  { return RLine_3::operator==(l); }
117 
118  bool operator!=(const CGAL::Line_3<R> & l) const
119  { return !(*this == l); }
120 
121  CGAL::Plane_3<R> perpendicular_plane(const CGAL::Point_3<R> & p) const
122  { return RLine_3::perpendicular_plane(p); }
123 
124  CGAL::Line_3<R> opposite() const
125  { return RLine_3::opposite(); }
126 
127  CGAL::Point_3<R> point() const
128  { return RLine_3::point(); }
129 
130  CGAL::Point_3<R> point(int i) const
131  { return RLine_3::point(i); }
132 
133  CGAL::Point_3<R> projection(const CGAL::Point_3<R>& p) const
134  { return RLine_3::projection(p); }
135 
136  CGAL::Direction_3<R> direction() const
137  { return RLine_3::direction(); }
138 
139  bool has_on(const CGAL::Point_3<R>& p) const
140  { return RLine_3::has_on(p); }
141 
142  bool is_degenerate() const
143  { return RLine_3::is_degenerate(); }
144 
145  CGAL::Line_3<R> transform(const CGAL::Aff_transformation_3<R> & t) const
146  { return RLine_3::transform(t); }
147 };
148 
149 #ifndef NO_OSTREAM_INSERT_LINE_3
150 template < class R >
151 std::ostream&
152 operator<<(std::ostream& os, const Line_3<R>& l)
153 {
154  typedef typename R::Line_3_base RLine_3;
155  return os << (const RLine_3& )l;
156 }
157 #endif // NO_OSTREAM_INSERT_LINE_3
158 
159 #ifndef NO_ISTREAM_EXTRACT_LINE_3
160 template < class R >
161 std::istream&
162 operator>>(std::istream & is, Line_3<R> & p)
163 {
164  typedef typename R::Line_3_base RLine_3;
165  is >> ( RLine_3& )p;
166  return is;
167 }
168 #endif // NO_ISTREAM_EXTRACT_LINE_3
169 
171 
172 
173 #ifndef CGAL_PLANE_3_H
174 #include <CGAL/Plane_3.h>
175 #endif // CGAL_PLANE_3_H
176 
177 #endif // CGAL_LINE_3_H
Line_3(const CGAL::Segment_3< R > &s)
Definition: Line_3.h:107
Line_3(const CGAL::Line_3< R > &l)
Definition: Line_3.h:99
CGAL::Point_3< R > projection(const CGAL::Point_3< R > &p) const
Definition: Line_3.h:133
bool operator!=(const CGAL::Line_3< R > &l) const
Definition: Line_3.h:118
CGAL_END_NAMESPACE CGAL_BEGIN_NAMESPACE bool operator==(const Origin &o, const Point_2< R > &p)
Definition: Point_2.h:239
R::FT FT
Definition: Line_3.h:94
const NT & d
Line_3(const CGAL::Ray_3< R > &r)
Definition: Line_3.h:109
double s
Definition: blastest.C:80
bool is_degenerate() const
Definition: Line_3.h:142
CGAL::Plane_3< R > perpendicular_plane(const CGAL::Point_3< R > &p) const
Definition: Line_3.h:121
bool operator==(const CGAL::Line_3< R > &l) const
Definition: Line_3.h:115
Line_3(const CGAL::Point_3< R > &p, const CGAL::Direction_3< R > &d)
Definition: Line_3.h:111
CGAL::Line_3< R > transform(const CGAL::Aff_transformation_3< R > &t) const
Definition: Line_3.h:145
bool has_on(const CGAL::Point_3< R > &p) const
Definition: Line_3.h:139
blockLoc i
Definition: read.cpp:79
Line_3()
Definition: Line_3.h:97
NT q
CGAL_BEGIN_NAMESPACE T opposite(const T &t)
Line_3(const RLine_3 &l)
Definition: Line_3.h:105
CGAL_KERNEL_LARGE_INLINE PointS3< FT > projection(const PointS3< FT > &p, const PlaneS3< FT > &h)
#define CGAL_BEGIN_NAMESPACE
Definition: kdtree_d.h:86
R::Line_3_base RLine_3
Definition: Line_3.h:95
CGAL::Point_3< R > point() const
Definition: Line_3.h:127
std::istream & operator>>(std::istream &is, CGAL::Aff_transformation_2< R > &t)
R_ R
Definition: Line_3.h:92
Line_3(const CGAL::Point_3< R > &p, const CGAL::Point_3< R > &q)
Definition: Line_3.h:101
CGAL::Direction_3< R > direction() const
Definition: Line_3.h:136
CGAL::Line_3< R > opposite() const
Definition: Line_3.h:124
CGAL::Point_3< R > point(int i) const
Definition: Line_3.h:130
#define CGAL_END_NAMESPACE
Definition: kdtree_d.h:87
R::RT RT
Definition: Line_3.h:93