Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Plane_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 : Plane_3.fw
37 // file : include/CGAL/Plane_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 #ifndef CGAL_PLANE_3_H
52 #define CGAL_PLANE_3_H
53 
54 #ifndef CGAL_REP_CLASS_DEFINED
55 #error no representation class defined
56 #endif // CGAL_REP_CLASS_DEFINED
57 
58 #if defined(CGAL_CFG_INCOMPLETE_TYPE_BUG_1) && \
59  !defined(CGAL_NO_PLANE_TRANSFORM_IN_AT)
60 #define CGAL_NO_PLANE_TRANSFORM_IN_AT
61 #endif // CGAL_CFG_INCOMPLETE_TYPE_BUG_1
62 
63 #ifdef CGAL_HOMOGENEOUS_H
64 #ifndef CGAL_PLANEH3_H
65 #include <CGAL/PlaneH3.h>
66 #endif // CGAL_PLANEH3_H
67 #endif // CGAL_HOMOGENEOUS_H
68 
69 #ifdef CGAL_CARTESIAN_H
70 #ifndef CGAL_PLANEC3_H
71 #include <CGAL/Cartesian/Plane_3.h>
72 #endif // CGAL_PLANEC3_H
73 #endif // CGAL_CARTESIAN_H
74 
75 #ifdef CGAL_SIMPLE_CARTESIAN_H
77 #endif // CGAL_SIMPLE_CARTESIAN_H
78 
79 
80 #ifndef CGAL_LINE_3_H
81 #include <CGAL/Line_3.h>
82 #endif // CGAL_LINE_3_H
83 #ifndef CGAL_POINT_2_H
84 #include <CGAL/Point_2.h>
85 #endif // CGAL_POINT_2_H
86 
88 
89 template <class R_>
90 class Plane_3 : public R_::Plane_3_base
91 {
92 public:
93  typedef R_ R;
94  typedef typename R::RT RT;
95  typedef typename R::FT FT;
96  typedef typename R::Plane_3_base RPlane_3;
97 
99  {}
100  Plane_3(const CGAL::Plane_3<R>& p) : RPlane_3(p)
101  {}
102  Plane_3(const RPlane_3& p) : RPlane_3(p)
103  {}
104  Plane_3(const CGAL::Point_3<R>& p,
105  const CGAL::Point_3<R>& q,
106  const CGAL::Point_3<R>& r)
107  : RPlane_3(p,q,r)
108  {}
109  Plane_3(const CGAL::Point_3<R>& p, const CGAL::Direction_3<R>& d)
110  : RPlane_3(p,d)
111  {}
112  Plane_3(const CGAL::Point_3<R>& p, const CGAL::Vector_3<R>& v)
113  : RPlane_3(p,v)
114  {}
115  Plane_3(const RT& a, const RT& b, const RT& c, const RT& d)
116  : RPlane_3(a,b,c,d)
117  {}
118  Plane_3(const CGAL::Line_3<R>& l, const CGAL::Point_3<R>& p)
119  : RPlane_3(l,p)
120  {}
121  Plane_3(const CGAL::Segment_3<R>& s, const CGAL::Point_3<R>& p)
122  : RPlane_3(s,p)
123  {}
124  Plane_3(CGAL::Ray_3<R>& r, const CGAL::Point_3<R>& p)
125  : RPlane_3(r,p)
126  {}
127 
128  bool operator==(const CGAL::Plane_3<R>& p) const
129  { return RPlane_3::operator==(p); }
130 
131  bool operator!=(const CGAL::Plane_3<R>& p) const
132  { return !(*this == p); }
133 
134 
135  RT a() const
136  { return RPlane_3::a(); }
137 
138  RT b() const
139  { return RPlane_3::b(); }
140 
141  RT c() const
142  { return RPlane_3::c(); }
143 
144  RT d() const
145  { return RPlane_3::d(); }
146 
147  CGAL::Line_3<R> perpendicular_line(const CGAL::Point_3<R>& p) const
148  { return RPlane_3::perpendicular_line(p); }
149 
150  CGAL::Plane_3<R> opposite() const
151  { return RPlane_3::opposite(); }
152 
153  CGAL::Point_3<R> projection(const CGAL::Point_3<R>& p) const
154  { return RPlane_3::projection(p); }
155 
156  CGAL::Point_3<R> point() const
157  { return RPlane_3::point(); }
158 
159  CGAL::Vector_3<R> orthogonal_vector() const
160  { return RPlane_3::orthogonal_vector(); }
161 
162  CGAL::Direction_3<R> orthogonal_direction() const
163  { return RPlane_3::orthogonal_direction(); }
164 
165  CGAL::Vector_3<R> base1() const
166  { return RPlane_3::base1(); }
167 
168  CGAL::Vector_3<R> base2() const
169  { return RPlane_3::base2(); }
170 
171  CGAL::Point_2<R> to_2d(const CGAL::Point_3<R>& p) const
172  { return RPlane_3::to_2d(p); }
173 
174  CGAL::Point_3<R> to_3d(const CGAL::Point_2<R>& p) const
175  { return RPlane_3::to_3d(p); }
176 
177  CGAL::Plane_3<R> transform( CGAL::Aff_transformation_3<R>& t) const
178  { return CGAL::Plane_3<R>( RPlane_3::transform(t) ); }
179 
180  Oriented_side oriented_side(const CGAL::Point_3<R>& p) const
181  { return RPlane_3::oriented_side(p); }
182 
183  bool has_on(const CGAL::Point_3<R>& p) const
184  { return RPlane_3::has_on_boundary(p); }
185 
186  bool has_on(const CGAL::Line_3<R>& l) const
187  { return RPlane_3::has_on_boundary(l); }
188 
189  bool has_on_boundary(const CGAL::Point_3<R>& p) const
190  { return RPlane_3::has_on_boundary(p); }
191 
192  bool has_on_boundary(const CGAL::Line_3<R>& l) const
193  { return RPlane_3::has_on_boundary(l); }
194 
195  bool has_on_positive_side(const CGAL::Point_3<R>& p) const
196  { return RPlane_3::has_on_positive_side(p); }
197 
198  bool has_on_negative_side(const CGAL::Point_3<R>& p) const
199  { return RPlane_3::has_on_negative_side(p); }
200 
201  bool is_degenerate() const
202  { return RPlane_3::is_degenerate(); }
203 };
204 
205 #ifndef NO_OSTREAM_INSERT_PLANE_3
206 template < class R >
207 std::ostream&
208 operator<<(std::ostream& os, const Plane_3<R>& p)
209 {
210  typedef typename R::Plane_3_base RPlane_3;
211  return os << (const RPlane_3& )p;
212 }
213 #endif // NO_OSTREAM_INSERT_PLANE_3
214 
215 #ifndef NO_ISTREAM_EXTRACT_PLANE_3
216 template < class R >
217 std::istream&
218 operator>>(std::istream& is, Plane_3<R>& t)
219 {
220  typedef typename R::Plane_3_base RPlane_3;
221  return is >> (RPlane_3& )t;
222 }
223 #endif // NO_ISTREAM_EXTRACT_PLANE_3
224 
225 
227 
228 
229 #endif // CGAL_PLANE_3_H
bool has_on(const CGAL::Line_3< R > &l) const
Definition: Plane_3.h:186
RT d() const
Definition: Plane_3.h:144
Plane_3(const CGAL::Point_3< R > &p, const CGAL::Direction_3< R > &d)
Definition: Plane_3.h:109
CGAL_END_NAMESPACE CGAL_BEGIN_NAMESPACE bool operator==(const Origin &o, const Point_2< R > &p)
Definition: Point_2.h:239
CGAL::Plane_3< R > opposite() const
Definition: Plane_3.h:150
bool has_on_positive_side(const CGAL::Point_3< R > &p) const
Definition: Plane_3.h:195
const NT & d
double s
Definition: blastest.C:80
CGAL::Plane_3< R > transform(CGAL::Aff_transformation_3< R > &t) const
Definition: Plane_3.h:177
CGAL::Line_3< R > perpendicular_line(const CGAL::Point_3< R > &p) const
Definition: Plane_3.h:147
bool has_on_boundary(const CGAL::Line_3< R > &l) const
Definition: Plane_3.h:192
Plane_3(const RT &a, const RT &b, const RT &c, const RT &d)
Definition: Plane_3.h:115
Plane_3(CGAL::Ray_3< R > &r, const CGAL::Point_3< R > &p)
Definition: Plane_3.h:124
bool has_on_boundary(const CGAL::Point_3< R > &p) const
Definition: Plane_3.h:189
*********************************************************************Illinois Open Source License ****University of Illinois NCSA **Open Source License University of Illinois All rights reserved ****Developed free of to any person **obtaining a copy of this software and associated documentation to deal with the Software without including without limitation the rights to and or **sell copies of the and to permit persons to whom the **Software is furnished to do subject to the following this list of conditions and the following disclaimers ****Redistributions in binary form must reproduce the above **copyright this list of conditions and the following **disclaimers in the documentation and or other materials **provided with the distribution ****Neither the names of the Center for Simulation of Advanced the University of nor the names of its **contributors may be used to endorse or promote products derived **from this Software without specific prior written permission ****THE SOFTWARE IS PROVIDED AS WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **ARISING OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE v
Definition: roccomf90.h:20
R_ R
Definition: Plane_3.h:93
RT b() const
Definition: Plane_3.h:138
Oriented_side
Definition: enum.h:78
bool operator==(const CGAL::Plane_3< R > &p) const
Definition: Plane_3.h:128
R::RT RT
Definition: Plane_3.h:94
CGAL::Point_3< R > point() const
Definition: Plane_3.h:156
RT a() const
Definition: Plane_3.h:135
CGAL::Point_3< R > projection(const CGAL::Point_3< R > &p) const
Definition: Plane_3.h:153
CGAL::Direction_3< R > orthogonal_direction() const
Definition: Plane_3.h:162
CGAL::Vector_3< R > base1() const
Definition: Plane_3.h:165
Plane_3(const CGAL::Point_3< R > &p, const CGAL::Point_3< R > &q, const CGAL::Point_3< R > &r)
Definition: Plane_3.h:104
CGAL::Vector_3< R > base2() const
Definition: Plane_3.h:168
Plane_3(const CGAL::Line_3< R > &l, const CGAL::Point_3< R > &p)
Definition: Plane_3.h:118
Plane_3(const RPlane_3 &p)
Definition: Plane_3.h:102
Plane_3()
Definition: Plane_3.h:98
CGAL::Vector_3< R > orthogonal_vector() const
Definition: Plane_3.h:159
Plane_3(const CGAL::Plane_3< R > &p)
Definition: Plane_3.h:100
NT q
R::Plane_3_base RPlane_3
Definition: Plane_3.h:96
CGAL_BEGIN_NAMESPACE T opposite(const T &t)
Plane_3(const CGAL::Point_3< R > &p, const CGAL::Vector_3< R > &v)
Definition: Plane_3.h:112
CGAL_KERNEL_LARGE_INLINE PointS3< FT > projection(const PointS3< FT > &p, const PlaneS3< FT > &h)
R::FT FT
Definition: Plane_3.h:95
#define CGAL_BEGIN_NAMESPACE
Definition: kdtree_d.h:86
CGAL::Point_3< R > to_3d(const CGAL::Point_2< R > &p) const
Definition: Plane_3.h:174
std::istream & operator>>(std::istream &is, CGAL::Aff_transformation_2< R > &t)
bool operator!=(const CGAL::Plane_3< R > &p) const
Definition: Plane_3.h:131
bool has_on(const CGAL::Point_3< R > &p) const
Definition: Plane_3.h:183
Plane_3(const CGAL::Segment_3< R > &s, const CGAL::Point_3< R > &p)
Definition: Plane_3.h:121
RT c() const
Definition: Plane_3.h:141
bool has_on_negative_side(const CGAL::Point_3< R > &p) const
Definition: Plane_3.h:198
#define CGAL_END_NAMESPACE
Definition: kdtree_d.h:87
Oriented_side oriented_side(const CGAL::Point_3< R > &p) const
Definition: Plane_3.h:180
CGAL::Point_2< R > to_2d(const CGAL::Point_3< R > &p) const
Definition: Plane_3.h:171
bool is_degenerate() const
Definition: Plane_3.h:201