Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Point_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 : Point_3.fw
37 // file : include/CGAL/Point_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_POINT_3_H
52 #define CGAL_POINT_3_H
53 
54 #ifndef CGAL_REP_CLASS_DEFINED
55 #error no representation class defined
56 #endif // CGAL_REP_CLASS_DEFINED
57 
58 #ifdef CGAL_HOMOGENEOUS_H
59 #ifndef CGAL_POINTH3_H
60 #include <CGAL/PointH3.h>
61 #endif // CGAL_POINTH3_H
62 #endif // CGAL_HOMOGENEOUS_H
63 
64 #ifdef CGAL_CARTESIAN_H
65 #ifndef CGAL_POINTC3_H
66 #include <CGAL/Cartesian/Point_3.h>
67 #endif // CGAL_POINTC3_H
68 #endif // CGAL_CARTESIAN_H
69 
70 #ifdef CGAL_SIMPLE_CARTESIAN_H
71 #include <CGAL/SimpleCartesian/PointS3.h>
72 #endif // CGAL_SIMPLE_CARTESIAN_H
73 
74 
76 
78 
79 template <class R_>
80 class Point_3 : public R_::Point_3_base
81 {
82 public:
83  typedef R_ R;
84  typedef typename R::RT RT;
85  typedef typename R::FT FT;
86  typedef typename R::Point_3_base RPoint_3;
87  typedef typename R::Vector_3_base RVector_3;
88 
89 friend CGAL_FRIEND_INLINE
90  CGAL::Point_3<R>
92  (const CGAL::Vector_3<R>& v);
93 
94 public:
96  {}
97  Point_3(const Origin& o) : RPoint_3(o)
98  {}
99  Point_3(const CGAL::Point_3<R>& p) : RPoint_3( (const RPoint_3& )p )
100  {}
101  Point_3(const RPoint_3& p) : RPoint_3(p)
102  {}
103  Point_3(const RT& hx, const RT& hy, const RT& hz)
104  : RPoint_3(hx, hy, hz)
105  {}
106  Point_3(const RT& hx, const RT& hy, const RT& hz, const RT& hw)
107  : RPoint_3(hx, hy, hz, hw)
108  {}
109 
110  bool operator==(const CGAL::Point_3<R>& p) const
111  { return RPoint_3::operator==(p); }
112 
113  bool operator!=(const CGAL::Point_3<R>& p) const
114  { return !(*this == p); }
115 
116 
117  RT hx() const
118  { return RPoint_3::hx(); }
119 
120  RT hy() const
121  { return RPoint_3::hy(); }
122 
123  RT hz() const
124  { return RPoint_3::hz(); }
125 
126  RT hw() const
127  { return RPoint_3::hw(); }
128 
129  FT x() const
130  { return RPoint_3::x(); }
131 
132  FT y() const
133  { return RPoint_3::y(); }
134 
135  FT z() const
136  { return RPoint_3::z(); }
137 
138  RT homogeneous(int i) const
139  { return RPoint_3::homogeneous(i); }
140 
141  FT cartesian(int i) const
142  { return RPoint_3::cartesian(i); }
143 
144  FT operator[](int i) const
145  { return cartesian(i); }
146 
147  int dimension() const
148  { return 3; }
149 
150  Bbox_3 bbox() const
151  { return RPoint_3::bbox(); }
152 
153  CGAL::Point_3<R> transform(const CGAL::Aff_transformation_3<R>& t) const
154  { return RPoint_3::transform(t); }
155 
156 private:
158  {}
159 };
160 
162 
163 
164 #ifndef CGAL_VECTOR_3_H
165 #include <CGAL/Vector_3.h>
166 #endif // CGAL_VECTOR_3_H
167 
169 
170 #ifndef CGAL_AFF_TRANSFORMATION_3_H
172 #endif // CGAL_AFF_TRANSFORMATION_3_H
173 
175 
176 template <class R>
177 inline
178 bool
179 operator==(const Origin& o, const Point_3<R>& p)
180 { return p == o; }
181 
182 template <class R>
183 inline
184 bool
185 operator!=(const Origin& o, const Point_3<R>& p)
186 { return p != o; }
187 
188 
189 #ifndef NO_OSTREAM_INSERT_POINT_3
190 
191 template < class R >
192 std::ostream&
193 operator<<(std::ostream& os, const Point_3<R>& p)
194 {
195  typedef typename R::Point_3_base RPoint_3;
196  return os << (const RPoint_3& )p;
197 }
198 #endif // NO_OSTREAM_INSERT_POINT_3
199 
200 #ifndef NO_ISTREAM_EXTRACT_POINT_3
201 template < class R >
202 std::istream& operator>>(std::istream& is, Point_3<R>& p)
203 {
204  typedef typename R::Point_3_base RPoint_3;
205  return is >> (RPoint_3& )p;
206 }
207 #endif // NO_ISTREAM_EXTRACT_POINT_3
208 
210 
211 
212 #endif // CGAL_POINT_3_H
CGAL::Point_3< R > transform(const CGAL::Aff_transformation_3< R > &t) const
Definition: Point_3.h:153
CGAL_END_NAMESPACE CGAL_BEGIN_NAMESPACE bool operator==(const Origin &o, const Point_2< R > &p)
Definition: Point_2.h:239
friend CGAL_FRIEND_INLINE CGAL::Point_3< R > vector_to_point_conversion CGAL_NULL_TMPL_ARGS(const CGAL::Vector_3< R > &v)
RT homogeneous(int i) const
Definition: Point_3.h:138
R::Point_3_base RPoint_3
Definition: Point_3.h:86
R::Vector_3_base RVector_3
Definition: Vector_3.h:83
Point_3()
Definition: Point_3.h:95
void int int REAL REAL * y
Definition: read.cpp:74
RT hx() const
Definition: Point_3.h:117
Point_3(const RVector_3 &v)
Definition: Point_3.h:157
R::RT RT
Definition: Point_3.h:84
Point_3(const RT &hx, const RT &hy, const RT &hz, const RT &hw)
Definition: Point_3.h:106
Point_3(const RPoint_3 &p)
Definition: Point_3.h:101
Point_3(const Origin &o)
Definition: Point_3.h:97
Bbox_3 bbox() const
Definition: Point_3.h:150
Point_2< R > vector_to_point_conversion(const Vector_2< R > &v)
*********************************************************************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
bool operator==(const CGAL::Point_3< R > &p) const
Definition: Point_3.h:110
int dimension() const
Definition: Point_3.h:147
RT hy() const
Definition: Point_3.h:120
void int int int REAL REAL REAL * z
Definition: write.cpp:76
blockLoc i
Definition: read.cpp:79
FT operator[](int i) const
Definition: Point_3.h:144
void int int REAL * x
Definition: read.cpp:74
FT cartesian(int i) const
Definition: Point_3.h:141
R_ R
Definition: Point_3.h:83
bool operator!=(const Origin &o, const Point_2< R > &p)
Definition: Point_2.h:245
FT x() const
Definition: Point_3.h:129
R::Vector_3_base RVector_3
Definition: Point_3.h:87
FT y() const
Definition: Point_3.h:132
bool operator!=(const CGAL::Point_3< R > &p) const
Definition: Point_3.h:113
RT hz() const
Definition: Point_3.h:123
Point_3(const RT &hx, const RT &hy, const RT &hz)
Definition: Point_3.h:103
#define CGAL_BEGIN_NAMESPACE
Definition: kdtree_d.h:86
std::istream & operator>>(std::istream &is, CGAL::Aff_transformation_2< R > &t)
RT hw() const
Definition: Point_3.h:126
Point_3(const CGAL::Point_3< R > &p)
Definition: Point_3.h:99
R::FT FT
Definition: Point_3.h:85
#define CGAL_END_NAMESPACE
Definition: kdtree_d.h:87
#define CGAL_FRIEND_INLINE
Definition: kernel_basic.h:61
FT z() const
Definition: Point_3.h:135