/usr/include/CGAL/Conic_2.h is in libcgal-dev 4.2-5ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 | // Copyright (c) 2000,2001
// Utrecht University (The Netherlands),
// ETH Zurich (Switzerland),
// INRIA Sophia-Antipolis (France),
// Max-Planck-Institute Saarbruecken (Germany),
// and Tel-Aviv University (Israel). All rights reserved.
//
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 3 of the License,
// or (at your option) any later version.
//
// Licensees holding a valid commercial license may use this file in
// accordance with the commercial license agreement provided with the software.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
//
// $URL$
// $Id$
//
//
// Author(s) : Bernd Gaertner, Sven Schoenherr <sven@inf.ethz.ch>
#ifndef CGAL_CONIC_2_H
#define CGAL_CONIC_2_H
#include <CGAL/Conic_misc.h>
#include <CGAL/Dimension.h>
namespace CGAL {
template < class R_ >
class Optimisation_ellipse_2;
template < class R_>
class Conic_2 : public R_::Kernel_base::Conic_2 {
friend class Optimisation_ellipse_2<R_>;
public:
typedef Dimension_tag<2> Ambient_dimension;
typedef Dimension_tag<1> Feature_dimension;
// types
typedef R_ R;
typedef typename R_::RT RT;
typedef typename R_::FT FT;
typedef typename R_::Kernel_base::Conic_2 _Conic_2;
// construction
Conic_2 ()
{}
Conic_2 (RT r, RT s, RT t, RT u, RT v, RT w)
: _Conic_2 (r, s, t, u, v, w)
{}
// general access
RT r () const
{
return _Conic_2::r();
}
RT s () const
{
return _Conic_2::s();
}
RT t () const
{
return _Conic_2::t();
}
RT u () const
{
return _Conic_2::u();
}
RT v () const
{
return _Conic_2::v();
}
RT w () const
{
return _Conic_2::w();
}
CGAL::Point_2<R> center () const
{
return _Conic_2::center();
}
// type related access
Conic_type conic_type () const
{
return _Conic_2::conic_type();
}
bool is_hyperbola () const
{
return _Conic_2::is_hyperbola();
}
bool is_parabola () const
{
return _Conic_2::is_parabola();
}
bool is_ellipse () const
{
return _Conic_2::is_ellipse();
}
bool is_circle () const
{
return _Conic_2::is_circle();
}
bool is_empty () const
{
return _Conic_2::is_empty();
}
bool is_trivial () const
{
return _Conic_2::is_trivial();
}
bool is_degenerate () const
{
return _Conic_2::is_degenerate();
}
// orientation related access
CGAL::Orientation orientation () const
{
return _Conic_2::orientation ();
}
CGAL::Oriented_side oriented_side (const CGAL::Point_2<R>& p) const
{
return _Conic_2::oriented_side (p);
}
bool has_on_positive_side (const CGAL::Point_2<R>& p) const
{
return _Conic_2::has_on_positive_side (p);
}
bool has_on_negative_side (const CGAL::Point_2<R>& p) const
{
return _Conic_2::has_on_negative_side (p);
}
bool has_on_boundary (const CGAL::Point_2<R>& p) const
{
return _Conic_2::has_on_boundary (p);
}
bool has_on (const CGAL::Point_2<R>& p) const
{
return _Conic_2::has_on (p);
}
Convex_side convex_side (const CGAL::Point_2<R>& p) const
{
return _Conic_2::convex_side (p);
}
bool has_on_convex_side (const CGAL::Point_2<R>& p) const
{
return _Conic_2::has_on_convex_side (p);
}
bool has_on_nonconvex_side (const CGAL::Point_2<R>& p) const
{
return _Conic_2::has_on_nonconvex_side (p);
}
// comparisons
bool operator == ( const Conic_2<R_>& c) const
{
return _Conic_2::operator == ( (Conic_2)c);
}
bool operator != ( const Conic_2<R_>& c) const
{
return( ! operator == ( c));
}
// set methods
void set (RT r, RT s, RT t,
RT u, RT v, RT w)
{
_Conic_2::set (r, s, t, u, v, w);
}
void set_opposite ()
{
_Conic_2::set_opposite();
}
void set_circle (const CGAL::Point_2<R>& p1, const CGAL::Point_2<R>& p2,
const CGAL::Point_2<R>& p3)
{
// the unique circle through the three points
_Conic_2::set_circle(p1, p2, p3);
}
void set_linepair (const CGAL::Point_2<R>& p1, const CGAL::Point_2<R>& p2,
const CGAL::Point_2<R>& p3, const CGAL::Point_2<R>& p4)
{
_Conic_2::set_linepair (p1, p2, p3, p4);
}
void set_ellipse (const CGAL::Point_2<R>& p1, const CGAL::Point_2<R>& p2,
const CGAL::Point_2<R>& p3)
{
_Conic_2::set_ellipse (p1, p2, p3);
}
void set_ellipse (const CGAL::Point_2<R>& p1, const CGAL::Point_2<R>& p2,
const CGAL::Point_2<R>& p3, const CGAL::Point_2<R>& p4,
CGAL::Orientation o = POSITIVE)
{
_Conic_2::set_ellipse (p1, p2, p3, p4, o);
}
void set (const CGAL::Point_2<R>& p1, const CGAL::Point_2<R>& p2,
const CGAL::Point_2<R>& p3, const CGAL::Point_2<R>& p4,
const CGAL::Point_2<R>& p5,
CGAL::Orientation o = POSITIVE)
{
_Conic_2::set (p1, p2, p3, p4, p5, o);
}
private:
void set_linear_combination (
const RT& a1, const Conic_2<R>& c1,
const RT& a2, const Conic_2<R>& c2)
{
_Conic_2::set_linear_combination (a1, c1, a2, c2);
}
static void set_two_linepairs (const CGAL::Point_2<R>& p1,
const CGAL::Point_2<R>& p2,
const CGAL::Point_2<R>& p3,
const CGAL::Point_2<R>& p4,
Conic_2<R>& pair1,
Conic_2<R>& pair2)
{
_Conic_2::set_two_linepairs (p1, p2, p3, p4, pair1, pair2);
}
void set_ellipse (const Conic_2<R>& pair1,
const Conic_2<R>& pair2)
{
_Conic_2::set_ellipse (pair1, pair2);
}
void set (const Conic_2<R>& c1, const Conic_2<R>& c2,
const CGAL::Point_2<R>& p)
{
_Conic_2::set( c1, c2, p); this->analyse();
}
CGAL::Sign vol_derivative (RT dr, RT ds,
RT dt, RT du,
RT dv, RT dw) const
{
return _Conic_2::vol_derivative (dr, ds, dt, du, dv, dw);
}
double vol_minimum (RT dr, RT ds,
RT dt, RT du,
RT dv, RT dw) const
{
return _Conic_2::vol_minimum (dr, ds, dt, du, dv, dw);
}
};
#ifndef CGAL_NO_OSTREAM_INSERT_CONIC_2
template< class R_>
std::ostream& operator << ( std::ostream& os, const Conic_2<R_>& c)
{
return( os << c.r() << ' ' << c.s() << ' ' << c.t() << ' '
<< c.u() << ' ' << c.v() << ' ' << c.w());
}
#endif // CGAL_NO_OSTREAM_INSERT_CONIC_2
} //namespace CGAL
#endif // CGAL_CONIC_2_H
// ===== EOF ==================================================================
|