Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Direction_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 : Direction_3.fw
37 // file : include/CGAL/Direction_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_DIRECTION_3_H
52 #define CGAL_DIRECTION_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_DIRECTIONH3_H
60 #include <CGAL/DirectionH3.h>
61 #endif // CGAL_DIRECTIONH3_H
62 #endif // CGAL_HOMOGENEOUS_H
63 
64 #ifdef CGAL_CARTESIAN_H
65 #ifndef CGAL_DIRECTIONC3_H
66 #include <CGAL/Cartesian/Direction_3.h>
67 #endif // CGAL_DIRECTIONC3_H
68 #endif // CGAL_CARTESIAN_H
69 
70 #ifdef CGAL_SIMPLE_CARTESIAN_H
72 #endif // CGAL_SIMPLE_CARTESIAN_H
73 
74 
75 #ifndef CGAL_VECTOR_3_H
76 #include <CGAL/Vector_3.h>
77 #endif // CGAL_VECTOR_3_H
78 
80 
81 template <class R_>
82 class Direction_3 : public R_::Direction_3_base
83 {
84 public:
85  typedef R_ R;
86  typedef typename R::RT RT;
87  typedef typename R::FT FT;
88  typedef typename R::Direction_3_base RDirection_3;
89  typedef typename R::Vector_3_base RVector_3;
90 
92  {}
93  Direction_3(const CGAL::Direction_3<R>& d)
94  : RDirection_3( (const RDirection_3& )d )
95  {}
97  : RDirection_3(d)
98  {}
100  : RDirection_3(v)
101  {}
102  Direction_3(const RT& hx, const RT& hy, const RT& hz)
103  : RDirection_3(hx, hy, hz)
104  {}
105 
106  bool operator==(const CGAL::Direction_3<R> & d) const
107  { return RDirection_3::operator==(d); }
108 
109  bool operator!=(const CGAL::Direction_3<R> & d) const
110  { return !(*this == d); }
111 
112  CGAL::Vector_3<R> vector() const
113  { return (CGAL::Vector_3<R>)RDirection_3::to_vector(); }
114 
115  CGAL::Vector_3<R> to_vector() const
116  { return (CGAL::Vector_3<R>)RDirection_3::to_vector(); }
117 
118  CGAL::Direction_3<R> transform(const CGAL::Aff_transformation_3<R> & t) const
119  { return RDirection_3::transform(t); }
120 
121  CGAL::Direction_3<R> operator-() const
122  { return RDirection_3::operator-(); }
123 
124  RT delta(int i) const
125  { return RDirection_3::delta(i); }
126 
127  RT dx() const
128  { return RDirection_3::dx(); }
129 
130  RT dy() const
131  { return RDirection_3::dy(); }
132 
133  RT dz() const
134  { return RDirection_3::dz(); }
135 };
136 
137 
138 #ifndef NO_OSTREAM_INSERT_DIRECTION_3
139 template < class R >
140 std::ostream& operator<<(std::ostream& os, const Direction_3<R>& d)
141 {
142  typedef typename R::Direction_3_base RDirection_3;
143  return os << (const RDirection_3& )d; }
144 #endif // NO_OSTREAM_INSERT_DIRECTION_3
145 
146 
147 #ifndef NO_ISTREAM_EXTRACT_DIRECTION_3
148 template < class R >
149 std::istream& operator>>(std::istream& is, Direction_3<R>& p)
150 {
151  typedef typename R::Direction_3_base RDirection_3;
152  return is >> (RDirection_3& )p; }
153 #endif // NO_ISTREAM_EXTRACT_DIRECTION_3
154 
156 
157 
158 #endif // CGAL_DIRECTION_3_H
Direction_3(const RDirection_3 &d)
Definition: Direction_3.h:96
Direction_3(const CGAL::Direction_3< R > &d)
Definition: Direction_3.h:93
CGAL_END_NAMESPACE CGAL_BEGIN_NAMESPACE bool operator==(const Origin &o, const Point_2< R > &p)
Definition: Point_2.h:239
RT dy() const
Definition: Direction_3.h:130
const NT & d
NT dx
CGAL::Direction_3< R > transform(const CGAL::Aff_transformation_3< R > &t) const
Definition: Direction_3.h:118
R::Direction_3_base RDirection_3
Definition: Direction_3.h:88
*********************************************************************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::Direction_3< R > &d) const
Definition: Direction_3.h:109
bool operator==(const CGAL::Direction_3< R > &d) const
Definition: Direction_3.h:106
R::Vector_3_base RVector_3
Definition: Direction_3.h:89
Direction_3(const RT &hx, const RT &hy, const RT &hz)
Definition: Direction_3.h:102
Direction_3(const RVector_3 &v)
Definition: Direction_3.h:99
CGAL::Vector_3< R > to_vector() const
Definition: Direction_3.h:115
blockLoc i
Definition: read.cpp:79
RT delta(int i) const
Definition: Direction_3.h:124
RT dz() const
Definition: Direction_3.h:133
NT dy
RT dx() const
Definition: Direction_3.h:127
CGAL::Vector_3< R > vector() const
Definition: Direction_3.h:112
#define CGAL_BEGIN_NAMESPACE
Definition: kdtree_d.h:86
std::istream & operator>>(std::istream &is, CGAL::Aff_transformation_2< R > &t)
#define CGAL_END_NAMESPACE
Definition: kdtree_d.h:87
Point_2< R > operator-(const Origin &o, const Vector_2< R > &v)
CGAL::Direction_3< R > operator-() const
Definition: Direction_3.h:121