Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Ray_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 : Ray_3.fw
37 // file : include/CGAL/Ray_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_RAY_3_H
52 #define CGAL_RAY_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_RAYH3_H
60 #include <CGAL/RayH3.h>
61 #endif // CGAL_RAYH3_H
62 #endif // CGAL_HOMOGENEOUS_H
63 
64 #ifdef CGAL_CARTESIAN_H
65 #ifndef CGAL_RAYC3_H
66 #include <CGAL/Cartesian/Ray_3.h>
67 #endif // CGAL_RAYC3_H
68 #endif // CGAL_CARTESIAN_H
69 
70 #ifdef CGAL_SIMPLE_CARTESIAN_H
72 #endif // CGAL_SIMPLE_CARTESIAN_H
73 
74 
76 
77 template <class R_>
78 class Ray_3 : public R_::Ray_3_base
79 {
80 public:
81  typedef R_ R;
82  typedef typename R::RT RT;
83  typedef typename R::FT FT;
84  typedef typename R::Ray_3_base RRay_3;
85 
86  Ray_3() : RRay_3()
87  {}
88  Ray_3(const CGAL::Ray_3<R>& r) : RRay_3(r)
89  {}
90  Ray_3(const RRay_3& r) : RRay_3(r)
91  {}
92  Ray_3(const CGAL::Point_3<R>& sp,
93  const CGAL::Point_3<R>& secondp)
94  : RRay_3(sp, secondp)
95  {}
96  Ray_3(const CGAL::Point_3<R>& sp,
97  const CGAL::Direction_3<R>& d)
98  : RRay_3(sp, d)
99  {}
100 
101  bool operator==(const CGAL::Ray_3<R>& r) const
102  { return RRay_3::operator==(r); }
103  bool operator!=(const CGAL::Ray_3<R>& r) const
104  { return !(*this == r); }
105 
106  CGAL::Point_3<R> start() const
107  { return RRay_3::start(); }
108  CGAL::Point_3<R> source() const
109  { return RRay_3::source(); }
110  CGAL::Point_3<R> second_point() const
111  { return RRay_3::second_point(); }
112  CGAL::Point_3<R> point(int i) const
113  { return RRay_3::point(i); }
114  CGAL::Direction_3<R> direction() const
115  { return RRay_3::direction(); }
116  CGAL::Line_3<R> supporting_line() const
117  { return RRay_3::supporting_line(); }
118  CGAL::Ray_3<R> opposite() const
119  { return RRay_3::opposite(); }
120  CGAL::Ray_3<R> transform(const CGAL::Aff_transformation_3<R>& t) const
121  { return RRay_3::transform(t); }
122  bool is_degenerate() const
123  { return RRay_3::is_degenerate(); }
124  bool has_on(const CGAL::Point_3<R>& p) const
125  { return RRay_3::has_on(p); }
126 };
127 
128 #ifndef NO_OSTREAM_INSERT_RAY_3
129 template < class R >
130 std::ostream&
131 operator<<(std::ostream& os, const Ray_3<R>& r)
132 {
133  typedef typename R::Ray_3_base RRay_3;
134  return os << (const RRay_3& )r;
135 }
136 #endif // NO_OSTREAM_INSERT_RAY_3
137 
138 #ifndef NO_ISTREAM_EXTRACT_RAY_3
139 template < class R >
140 std::istream&
141 operator>>(std::istream& is, Ray_3<R>& r)
142 {
143  typedef typename R::Ray_3_base RRay_3;
144  return is >> (RRay_3& )r;
145 }
146 #endif // NO_ISTREAM_EXTRACT_RAY_3
147 
148 
150 
151 
152 #ifndef CGAL_LINE_3_H
153 #include <CGAL/Line_3.h>
154 #endif // CGAL_LINE_3_H
155 
156 #endif // CGAL_RAY_3_H
CGAL::Line_3< R > supporting_line() const
Definition: Ray_3.h:116
R::RT RT
Definition: Ray_3.h:82
CGAL_END_NAMESPACE CGAL_BEGIN_NAMESPACE bool operator==(const Origin &o, const Point_2< R > &p)
Definition: Point_2.h:239
Ray_3(const RRay_3 &r)
Definition: Ray_3.h:90
Ray_3(const CGAL::Point_3< R > &sp, const CGAL::Direction_3< R > &d)
Definition: Ray_3.h:96
const NT & d
R_ R
Definition: Ray_3.h:81
bool is_degenerate() const
Definition: Ray_3.h:122
bool operator==(const CGAL::Ray_3< R > &r) const
Definition: Ray_3.h:101
bool operator!=(const CGAL::Ray_3< R > &r) const
Definition: Ray_3.h:103
bool has_on(const CGAL::Point_3< R > &p) const
Definition: Ray_3.h:124
CGAL::Point_3< R > start() const
Definition: Ray_3.h:106
CGAL::Ray_3< R > transform(const CGAL::Aff_transformation_3< R > &t) const
Definition: Ray_3.h:120
R::FT FT
Definition: Ray_3.h:83
R::Ray_3_base RRay_3
Definition: Ray_3.h:84
CGAL::Point_3< R > source() const
Definition: Ray_3.h:108
blockLoc i
Definition: read.cpp:79
CGAL::Ray_3< R > opposite() const
Definition: Ray_3.h:118
CGAL::Point_3< R > second_point() const
Definition: Ray_3.h:110
Ray_3(const CGAL::Point_3< R > &sp, const CGAL::Point_3< R > &secondp)
Definition: Ray_3.h:92
CGAL::Direction_3< R > direction() const
Definition: Ray_3.h:114
CGAL_BEGIN_NAMESPACE T opposite(const T &t)
Ray_3(const CGAL::Ray_3< R > &r)
Definition: Ray_3.h:88
Ray_3()
Definition: Ray_3.h:86
#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
CGAL::Point_3< R > point(int i) const
Definition: Ray_3.h:112