/usr/include/CGAL/HalfedgeDS_halfedge_base.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 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 | // Copyright (c) 1997
// 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) : Lutz Kettner <kettner@mpi-sb.mpg.de>
#ifndef CGAL_HALFEDGEDS_HALFEDGE_BASE_H
#define CGAL_HALFEDGEDS_HALFEDGE_BASE_H 1
#include <CGAL/basic.h>
namespace CGAL {
template < class Refs, class TP, class TV, class TF>
struct HalfedgeDS_halfedge_base_base {
// Base_base will be used to access set_opposite(), which is
// made private in the normal halfedge bases. Since halfedges
// come always in pairs, managed by the HDS, the set_opposite()
// member function is protected from the user.
typedef Refs HalfedgeDS;
typedef HalfedgeDS_halfedge_base_base<Refs,TP,TV,TF> Base_base;
typedef TP Supports_halfedge_prev;
typedef TV Supports_halfedge_vertex;
typedef TF Supports_halfedge_face;
typedef typename Refs::Vertex_handle Vertex_handle;
typedef typename Refs::Vertex_const_handle Vertex_const_handle;
typedef typename Refs::Halfedge_handle Halfedge_handle;
typedef typename Refs::Halfedge_const_handle Halfedge_const_handle;
typedef typename Refs::Face_handle Face_handle;
typedef typename Refs::Face_const_handle Face_const_handle;
typedef typename Refs::Vertex Vertex;
typedef typename Refs::Face Face;
private:
Halfedge_handle opp;
Halfedge_handle nxt;
public:
Halfedge_handle opposite() { return opp;}
Halfedge_const_handle opposite() const { return opp;}
void set_opposite( Halfedge_handle h) { opp = h;}
Halfedge_handle next() { return nxt;}
Halfedge_const_handle next() const { return nxt;}
void set_next( Halfedge_handle h) { nxt = h;}
bool is_border() const { return false;}
// is always false as long as faces are not supported.
};
template < class Refs, class TP = Tag_true,
class TV = Tag_true,
class TF = Tag_true>
class HalfedgeDS_halfedge_base;
template < class Refs >
class HalfedgeDS_halfedge_base< Refs,
Tag_false, // prev
Tag_false, // vertex
Tag_false> // face
: public HalfedgeDS_halfedge_base_base<
Refs, Tag_false, Tag_false, Tag_false>
{
public:
typedef typename Refs::Halfedge_handle Halfedge_handle;
typedef HalfedgeDS_halfedge_base<Refs, Tag_false,Tag_false,Tag_false>
Base;
typedef HalfedgeDS_halfedge_base_base<Refs, Tag_false,Tag_false,Tag_false>
Base_base;
private:
void set_opposite( Halfedge_handle h) { Base_base::set_opposite(h);}
};
template < class Refs >
class HalfedgeDS_halfedge_base< Refs,
Tag_true, // prev
Tag_false, // vertex
Tag_false> // face
: public HalfedgeDS_halfedge_base_base<
Refs, Tag_true, Tag_false, Tag_false>
{
public:
typedef typename Refs::Halfedge_handle Halfedge_handle;
typedef typename Refs::Halfedge_const_handle Halfedge_const_handle;
typedef HalfedgeDS_halfedge_base<Refs, Tag_true,Tag_false,Tag_false>
Base;
typedef HalfedgeDS_halfedge_base_base<Refs, Tag_true,Tag_false,Tag_false>
Base_base;
private:
void set_opposite( Halfedge_handle h) { Base_base::set_opposite(h);}
Halfedge_handle prv;
public:
// the previous halfedge along the face.
Halfedge_handle prev() { return prv; }
Halfedge_const_handle prev() const { return prv; }
void set_prev( Halfedge_handle h) { prv = h; }
};
template < class Refs >
class HalfedgeDS_halfedge_base< Refs,
Tag_false, // prev
Tag_true, // vertex
Tag_false> // face
: public HalfedgeDS_halfedge_base_base<
Refs, Tag_false, Tag_true, Tag_false>
{
public:
typedef typename Refs::Halfedge_handle Halfedge_handle;
typedef typename Refs::Vertex_handle Vertex_handle;
typedef typename Refs::Vertex_const_handle Vertex_const_handle;
typedef HalfedgeDS_halfedge_base<Refs, Tag_false,Tag_true,Tag_false>
Base;
typedef HalfedgeDS_halfedge_base_base<Refs, Tag_false,Tag_true,Tag_false>
Base_base;
private:
void set_opposite( Halfedge_handle h) { Base_base::set_opposite(h);}
Vertex_handle v;
public:
// the incident vertex.
Vertex_handle vertex() { return v; }
Vertex_const_handle vertex() const { return v; }
void set_vertex( Vertex_handle w) { v = w; }
};
template < class Refs >
class HalfedgeDS_halfedge_base< Refs,
Tag_false, // prev
Tag_false, // vertex
Tag_true> // face
: public HalfedgeDS_halfedge_base_base<
Refs, Tag_false, Tag_false, Tag_true>
{
public:
typedef typename Refs::Halfedge_handle Halfedge_handle;
typedef typename Refs::Face_handle Face_handle;
typedef typename Refs::Face_const_handle Face_const_handle;
typedef HalfedgeDS_halfedge_base<Refs, Tag_false,Tag_false,Tag_true>
Base;
typedef HalfedgeDS_halfedge_base_base<Refs, Tag_false,Tag_false,Tag_true>
Base_base;
private:
void set_opposite( Halfedge_handle h) { Base_base::set_opposite(h);}
Face_handle f;
public:
// Explicit initialization of f to denote border halfedges
// is needed if Face_handle is a C style pointer.
HalfedgeDS_halfedge_base() : f( Face_handle()) {}
// the face to the left.
Face_handle face() { return f; }
Face_const_handle face() const { return f; }
void set_face( Face_handle g) { f = g; }
bool is_border() const { return f == Face_handle();}
// is true if `h' is a border halfedge.
};
template < class Refs >
class HalfedgeDS_halfedge_base< Refs,
Tag_true, // prev
Tag_true, // vertex
Tag_false> // face
: public HalfedgeDS_halfedge_base_base<
Refs, Tag_true, Tag_true, Tag_false>
{
public:
typedef typename Refs::Halfedge_handle Halfedge_handle;
typedef typename Refs::Halfedge_const_handle Halfedge_const_handle;
typedef typename Refs::Vertex_handle Vertex_handle;
typedef typename Refs::Vertex_const_handle Vertex_const_handle;
typedef HalfedgeDS_halfedge_base<Refs, Tag_true,Tag_true,Tag_false>
Base;
typedef HalfedgeDS_halfedge_base_base<Refs, Tag_true,Tag_true,Tag_false>
Base_base;
private:
void set_opposite( Halfedge_handle h) { Base_base::set_opposite(h);}
Halfedge_handle prv;
Vertex_handle v;
public:
// the previous halfedge along the face.
Halfedge_handle prev() { return prv; }
Halfedge_const_handle prev() const { return prv; }
void set_prev( Halfedge_handle h) { prv = h; }
// the incident vertex.
Vertex_handle vertex() { return v; }
Vertex_const_handle vertex() const { return v; }
void set_vertex( Vertex_handle w) { v = w; }
};
template < class Refs >
class HalfedgeDS_halfedge_base< Refs,
Tag_true, // prev
Tag_false, // vertex
Tag_true> // face
: public HalfedgeDS_halfedge_base_base<
Refs, Tag_true, Tag_false, Tag_true>
{
public:
typedef typename Refs::Halfedge_handle Halfedge_handle;
typedef typename Refs::Halfedge_const_handle Halfedge_const_handle;
typedef typename Refs::Face_handle Face_handle;
typedef typename Refs::Face_const_handle Face_const_handle;
typedef HalfedgeDS_halfedge_base<Refs, Tag_true,Tag_false,Tag_true>
Base;
typedef HalfedgeDS_halfedge_base_base<Refs, Tag_true,Tag_false,Tag_true>
Base_base;
private:
void set_opposite( Halfedge_handle h) { Base_base::set_opposite(h);}
Halfedge_handle prv;
Face_handle f;
public:
// Explicit initialization of f to denote border halfedges
// is needed if Face_handle is a C style pointer.
HalfedgeDS_halfedge_base() : f( Face_handle()) {}
// the previous halfedge along the face.
Halfedge_handle prev() { return prv; }
Halfedge_const_handle prev() const { return prv; }
void set_prev( Halfedge_handle h) { prv = h; }
// the face to the left.
Face_handle face() { return f; }
Face_const_handle face() const { return f; }
void set_face( Face_handle g) { f = g; }
bool is_border() const { return f == Face_handle();}
// is true if `h' is a border halfedge.
};
template < class Refs >
class HalfedgeDS_halfedge_base< Refs,
Tag_false, // prev
Tag_true, // vertex
Tag_true> // face
: public HalfedgeDS_halfedge_base_base<
Refs, Tag_false, Tag_true, Tag_true>
{
public:
typedef typename Refs::Halfedge_handle Halfedge_handle;
typedef typename Refs::Vertex_handle Vertex_handle;
typedef typename Refs::Vertex_const_handle Vertex_const_handle;
typedef typename Refs::Face_handle Face_handle;
typedef typename Refs::Face_const_handle Face_const_handle;
typedef HalfedgeDS_halfedge_base<Refs, Tag_false,Tag_true,Tag_true>
Base;
typedef HalfedgeDS_halfedge_base_base<Refs, Tag_false,Tag_true,Tag_true>
Base_base;
private:
void set_opposite( Halfedge_handle h) { Base_base::set_opposite(h);}
Vertex_handle v;
Face_handle f;
public:
// Explicit initialization of f to denote border halfedges
// is needed if Face_handle is a C style pointer.
HalfedgeDS_halfedge_base() : f( Face_handle()) {}
// the incident vertex.
Vertex_handle vertex() { return v; }
Vertex_const_handle vertex() const { return v; }
void set_vertex( Vertex_handle w) { v = w; }
// the face to the left.
Face_handle face() { return f; }
Face_const_handle face() const { return f; }
void set_face( Face_handle g) { f = g; }
bool is_border() const { return f == Face_handle();}
// is true if `h' is a border halfedge.
};
template < class Refs >
class HalfedgeDS_halfedge_base< Refs,
Tag_true, // prev
Tag_true, // vertex
Tag_true> // face
: public HalfedgeDS_halfedge_base_base<
Refs, Tag_true, Tag_true, Tag_true>
{
public:
typedef typename Refs::Halfedge_handle Halfedge_handle;
typedef typename Refs::Halfedge_const_handle Halfedge_const_handle;
typedef typename Refs::Vertex_handle Vertex_handle;
typedef typename Refs::Vertex_const_handle Vertex_const_handle;
typedef typename Refs::Face_handle Face_handle;
typedef typename Refs::Face_const_handle Face_const_handle;
typedef HalfedgeDS_halfedge_base<Refs, Tag_true,Tag_true,Tag_true>
Base;
typedef HalfedgeDS_halfedge_base_base<Refs, Tag_true,Tag_true,Tag_true>
Base_base;
private:
void set_opposite( Halfedge_handle h) { Base_base::set_opposite(h);}
Halfedge_handle prv;
Vertex_handle v;
Face_handle f;
public:
// Explicit initialization of f to denote border halfedges
// is needed if Face_handle is a C style pointer.
HalfedgeDS_halfedge_base() : f( Face_handle()) {}
// the previous halfedge along the face.
Halfedge_handle prev() { return prv; }
Halfedge_const_handle prev() const { return prv; }
void set_prev( Halfedge_handle h) { prv = h; }
// the incident vertex.
Vertex_handle vertex() { return v; }
Vertex_const_handle vertex() const { return v; }
void set_vertex( Vertex_handle w) { v = w; }
// the face to the left.
Face_handle face() { return f; }
Face_const_handle face() const { return f; }
void set_face( Face_handle g) { f = g; }
bool is_border() const { return f == Face_handle();}
// is true if `h' is a border halfedge.
};
} //namespace CGAL
#endif // CGAL_HALFEDGEDS_HALFEDGE_BASE_H //
// EOF //
|