PolyConnectivity.hh 62.3 KB
Newer Older
Jan Möbius's avatar
Jan Möbius committed
1 2 3
/*===========================================================================*\
 *                                                                           *
 *                               OpenMesh                                    *
Jan Möbius's avatar
Jan Möbius committed
4
 *      Copyright (C) 2001-2015 by Computer Graphics Group, RWTH Aachen      *
Jan Möbius's avatar
Jan Möbius committed
5 6
 *                           www.openmesh.org                                *
 *                                                                           *
7 8
 *---------------------------------------------------------------------------* 
 *  This file is part of OpenMesh.                                           *
Jan Möbius's avatar
Jan Möbius committed
9
 *                                                                           *
10 11 12 13 14
 *  OpenMesh is free software: 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 with the              *
 *  following exceptions:                                                    *
Jan Möbius's avatar
Jan Möbius committed
15
 *                                                                           *
16 17 18 19 20 21 22
 *  If other files instantiate templates or use macros                       *
 *  or inline functions from this file, or you compile this file and         *
 *  link it with other files to produce an executable, this file does        *
 *  not by itself cause the resulting executable to be covered by the        *
 *  GNU Lesser General Public License. This exception does not however       *
 *  invalidate any other reasons why the executable file might be            *
 *  covered by the GNU Lesser General Public License.                        *
Jan Möbius's avatar
Jan Möbius committed
23
 *                                                                           *
24 25 26 27
 *  OpenMesh is distributed in the hope that it will be useful,              *
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of           *
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            *
 *  GNU Lesser General Public License for more details.                      *
Jan Möbius's avatar
Jan Möbius committed
28
 *                                                                           *
29 30 31 32 33 34 35 36 37 38
 *  You should have received a copy of the GNU LesserGeneral Public          *
 *  License along with OpenMesh.  If not,                                    *
 *  see <http://www.gnu.org/licenses/>.                                      *
 *                                                                           *
\*===========================================================================*/ 

/*===========================================================================*\
 *                                                                           *             
 *   $Revision$                                                         *
 *   $Date$                   *
Jan Möbius's avatar
Jan Möbius committed
39 40 41 42 43 44 45 46 47 48 49 50 51
 *                                                                           *
\*===========================================================================*/

#ifndef OPENMESH_POLYCONNECTIVITY_HH
#define OPENMESH_POLYCONNECTIVITY_HH

#include <OpenMesh/Core/Mesh/ArrayKernel.hh>
#include <OpenMesh/Core/Mesh/IteratorsT.hh>
#include <OpenMesh/Core/Mesh/CirculatorsT.hh>

namespace OpenMesh
{

Jan Möbius's avatar
Jan Möbius committed
52
/** \brief Connectivity Class for polygonal meshes
53
*/
54
class OPENMESHDLLEXPORT PolyConnectivity : public ArrayKernel
Jan Möbius's avatar
Jan Möbius committed
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
{
public:
  /// \name Mesh Handles
  //@{
  /// Invalid handle
  static const VertexHandle                           InvalidVertexHandle;
  /// Invalid handle
  static const HalfedgeHandle                         InvalidHalfedgeHandle;
  /// Invalid handle
  static const EdgeHandle                             InvalidEdgeHandle;
  /// Invalid handle
  static const FaceHandle                             InvalidFaceHandle;
  //@}

  typedef PolyConnectivity                            This;

  //--- iterators ---

  /** \name Mesh Iterators
      Refer to OpenMesh::Mesh::Iterators or \ref mesh_iterators for
      documentation.
  */
  //@{
  /// Linear iterator
79 80 81 82
  typedef Iterators::GenericIteratorT<This, This::VertexHandle, ArrayKernel, &This::has_vertex_status, &This::n_vertices> VertexIter;
  typedef Iterators::GenericIteratorT<This, This::HalfedgeHandle, ArrayKernel, &This::has_halfedge_status, &This::n_halfedges> HalfedgeIter;
  typedef Iterators::GenericIteratorT<This, This::EdgeHandle, ArrayKernel, &This::has_edge_status, &This::n_edges> EdgeIter;
  typedef Iterators::GenericIteratorT<This, This::FaceHandle, ArrayKernel, &This::has_face_status, &This::n_faces> FaceIter;
Jan Möbius's avatar
Jan Möbius committed
83

84 85 86 87
  typedef VertexIter ConstVertexIter;
  typedef HalfedgeIter ConstHalfedgeIter;
  typedef EdgeIter ConstEdgeIter;
  typedef FaceIter ConstFaceIter;
Jan Möbius's avatar
Jan Möbius committed
88 89 90 91 92 93 94 95 96
  //@}

  //--- circulators ---

  /** \name Mesh Circulators
      Refer to OpenMesh::Mesh::Iterators or \ref mesh_iterators
      for documentation.
  */
  //@{
97 98 99 100

  /*
   * Vertex-centered circulators
   */
101 102 103 104

  /**
   * Enumerates 1-ring vertices in a clockwise fashion.
   */
105
  typedef Iterators::GenericCirculatorT_DEPRECATED<This,  This::VertexHandle,  This::VertexHandle,
106 107
          &Iterators::GenericCirculatorBaseT<This>::toVertexHandle>
  VertexVertexIter;
108 109
  typedef Iterators::GenericCirculatorT<This,  This::VertexHandle,  This::VertexHandle,
            &Iterators::GenericCirculatorBaseT<This>::toVertexHandle> VertexVertexCWIter;
110 111 112 113 114 115 116

  /**
   * Enumerates 1-ring vertices in a counter clockwise fashion.
   */
  typedef Iterators::GenericCirculatorT<This,  This::VertexHandle,  This::VertexHandle,
          &Iterators::GenericCirculatorBaseT<This>::toVertexHandle, false>
  VertexVertexCCWIter;
117

118 119 120
  /**
   * Enumerates outgoing half edges in a clockwise fashion.
   */
121
  typedef Iterators::GenericCirculatorT_DEPRECATED<This,  This::VertexHandle,  This::HalfedgeHandle,
122 123
          &Iterators::GenericCirculatorBaseT<This>::toHalfedgeHandle>
  VertexOHalfedgeIter;
124 125
  typedef Iterators::GenericCirculatorT<This,  This::VertexHandle,  This::HalfedgeHandle,
      &Iterators::GenericCirculatorBaseT<This>::toHalfedgeHandle> VertexOHalfedgeCWIter;
126 127 128 129 130 131 132

  /**
   * Enumerates outgoing half edges in a counter clockwise fashion.
   */
  typedef Iterators::GenericCirculatorT<This,  This::VertexHandle,  This::HalfedgeHandle,
      &Iterators::GenericCirculatorBaseT<This>::toHalfedgeHandle, false>
  VertexOHalfedgeCCWIter;
133

134 135 136
  /**
   * Enumerates incoming half edges in a clockwise fashion.
   */
137
  typedef Iterators::GenericCirculatorT_DEPRECATED<This,  This::VertexHandle,  This::HalfedgeHandle,
138 139
          &Iterators::GenericCirculatorBaseT<This>::toOppositeHalfedgeHandle>
  VertexIHalfedgeIter;
140 141
  typedef Iterators::GenericCirculatorT<This,  This::VertexHandle,  This::HalfedgeHandle,
      &Iterators::GenericCirculatorBaseT<This>::toOppositeHalfedgeHandle> VertexIHalfedgeCWIter;
142 143 144 145 146 147 148

  /**
   * Enumerates incoming half edges in a counter clockwise fashion.
   */
  typedef Iterators::GenericCirculatorT<This,  This::VertexHandle,  This::HalfedgeHandle,
          &Iterators::GenericCirculatorBaseT<This>::toOppositeHalfedgeHandle, false>
  VertexIHalfedgeCCWIter;
149

150 151 152
  /**
   * Enumerates incident faces in a clockwise fashion.
   */
153
  typedef Iterators::GenericCirculatorT_DEPRECATED<This,  This::VertexHandle,  This::FaceHandle,
154 155
          &Iterators::GenericCirculatorBaseT<This>::toFaceHandle>
  VertexFaceIter;
156 157
  typedef Iterators::GenericCirculatorT<This,  This::VertexHandle,  This::FaceHandle,
      &Iterators::GenericCirculatorBaseT<This>::toFaceHandle> VertexFaceCWIter;
158 159 160 161 162 163 164

  /**
   * Enumerates incident faces in a counter clockwise fashion.
   */
  typedef Iterators::GenericCirculatorT<This,  This::VertexHandle,  This::FaceHandle,
          &Iterators::GenericCirculatorBaseT<This>::toFaceHandle, false>
  VertexFaceCCWIter;
165

166 167 168
  /**
   * Enumerates incident edges in a clockwise fashion.
   */
169
  typedef Iterators::GenericCirculatorT_DEPRECATED<This,  This::VertexHandle,  This::EdgeHandle,
170 171
          &Iterators::GenericCirculatorBaseT<This>::toEdgeHandle>
  VertexEdgeIter;
172 173
  typedef Iterators::GenericCirculatorT<This,  This::VertexHandle,  This::EdgeHandle,
      &Iterators::GenericCirculatorBaseT<This>::toEdgeHandle> VertexEdgeCWIter;
174 175 176 177 178 179
  /**
   * Enumerates incident edges in a counter clockwise fashion.
   */
  typedef Iterators::GenericCirculatorT<This,  This::VertexHandle,  This::EdgeHandle,
          &Iterators::GenericCirculatorBaseT<This>::toEdgeHandle, false>
  VertexEdgeCCWIter;
180

181 182 183
  /**
   * Identical to #FaceHalfedgeIter. God knows why this typedef exists.
   */
184
  typedef Iterators::GenericCirculatorT_DEPRECATED<This, This::FaceHandle, This::HalfedgeHandle,
185 186
      &Iterators::GenericCirculatorBaseT<This>::toHalfedgeHandle>
  HalfedgeLoopIter;
187 188
  typedef Iterators::GenericCirculatorT<This, This::FaceHandle, This::HalfedgeHandle,
      &Iterators::GenericCirculatorBaseT<This>::toHalfedgeHandle> HalfedgeLoopCWIter;
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210
  /**
   * Identical to #FaceHalfedgeIter. God knows why this typedef exists.
   */
  typedef Iterators::GenericCirculatorT<This, This::FaceHandle, This::HalfedgeHandle,
      &Iterators::GenericCirculatorBaseT<This>::toHalfedgeHandle, false>
  HalfedgeLoopCCWIter;

  typedef VertexVertexIter        ConstVertexVertexIter;
  typedef VertexVertexCWIter      ConstVertexVertexCWIter;
  typedef VertexVertexCCWIter     ConstVertexVertexCCWIter;
  typedef VertexOHalfedgeIter     ConstVertexOHalfedgeIter;
  typedef VertexOHalfedgeCWIter   ConstVertexOHalfedgeCWIter;
  typedef VertexOHalfedgeCCWIter  ConstVertexOHalfedgeCCWIter;
  typedef VertexIHalfedgeIter     ConstVertexIHalfedgeIter;
  typedef VertexIHalfedgeCWIter   ConstVertexIHalfedgeCWIter;
  typedef VertexIHalfedgeCCWIter  ConstVertexIHalfedgeCCWIter;
  typedef VertexFaceIter          ConstVertexFaceIter;
  typedef VertexFaceCWIter        ConstVertexFaceCWIter;
  typedef VertexFaceCCWIter       ConstVertexFaceCCWIter;
  typedef VertexEdgeIter          ConstVertexEdgeIter;
  typedef VertexEdgeCWIter        ConstVertexEdgeCWIter;
  typedef VertexEdgeCCWIter       ConstVertexEdgeCCWIter;
211

212 213 214
  /*
   * Face-centered circulators
   */
215 216 217 218

  /**
   * Enumerate incident vertices in a counter clockwise fashion.
   */
219
  typedef Iterators::GenericCirculatorT_DEPRECATED<This,  This::FaceHandle,  This::VertexHandle,
220 221
          &Iterators::GenericCirculatorBaseT<This>::toVertexHandle>
  FaceVertexIter;
222 223
  typedef Iterators::GenericCirculatorT<This,  This::FaceHandle,  This::VertexHandle,
      &Iterators::GenericCirculatorBaseT<This>::toVertexHandle> FaceVertexCCWIter;
224 225 226 227 228 229 230

  /**
   * Enumerate incident vertices in a clockwise fashion.
   */
  typedef Iterators::GenericCirculatorT<This,  This::FaceHandle,  This::VertexHandle,
      &Iterators::GenericCirculatorBaseT<This>::toVertexHandle, false>
  FaceVertexCWIter;
231

232 233 234
  /**
   * Enumerate incident half edges in a counter clockwise fashion.
   */
235
  typedef Iterators::GenericCirculatorT_DEPRECATED<This,  This::FaceHandle,  This::HalfedgeHandle,
236 237
          &Iterators::GenericCirculatorBaseT<This>::toHalfedgeHandle>
  FaceHalfedgeIter;
238 239
  typedef Iterators::GenericCirculatorT<This,  This::FaceHandle,  This::HalfedgeHandle,
      &Iterators::GenericCirculatorBaseT<This>::toHalfedgeHandle> FaceHalfedgeCCWIter;
240 241 242 243 244 245 246

  /**
   * Enumerate incident half edges in a clockwise fashion.
   */
  typedef Iterators::GenericCirculatorT<This,  This::FaceHandle,  This::HalfedgeHandle,
          &Iterators::GenericCirculatorBaseT<This>::toHalfedgeHandle, false>
  FaceHalfedgeCWIter;
247

248 249 250
  /**
   * Enumerate incident edges in a counter clockwise fashion.
   */
251
  typedef Iterators::GenericCirculatorT_DEPRECATED<This,  This::FaceHandle,  This::EdgeHandle,
252 253
          &Iterators::GenericCirculatorBaseT<This>::toEdgeHandle>
  FaceEdgeIter;
254 255
  typedef Iterators::GenericCirculatorT<This,  This::FaceHandle,  This::EdgeHandle,
      &Iterators::GenericCirculatorBaseT<This>::toEdgeHandle> FaceEdgeCCWIter;
256 257 258 259 260 261 262

  /**
   * Enumerate incident edges in a clockwise fashion.
   */
  typedef Iterators::GenericCirculatorT<This,  This::FaceHandle,  This::EdgeHandle,
          &Iterators::GenericCirculatorBaseT<This>::toEdgeHandle, false>
  FaceEdgeCWIter;
263

264 265 266
  /**
   * Enumerate adjacent faces in a counter clockwise fashion.
   */
267
  typedef Iterators::GenericCirculatorT_DEPRECATED<This,  This::FaceHandle,  This::FaceHandle,
268 269
          &Iterators::GenericCirculatorBaseT<This>::toOppositeFaceHandle>
  FaceFaceIter;
270 271
  typedef Iterators::GenericCirculatorT<This,  This::FaceHandle,  This::FaceHandle,
      &Iterators::GenericCirculatorBaseT<This>::toOppositeFaceHandle> FaceFaceCCWIter;
Jan Möbius's avatar
Jan Möbius committed
272

273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291
  /**
   * Enumerate adjacent faces in a clockwise fashion.
   */
  typedef Iterators::GenericCirculatorT<This,  This::FaceHandle,  This::FaceHandle,
          &Iterators::GenericCirculatorBaseT<This>::toOppositeFaceHandle, false>
  FaceFaceCWIter;

  typedef FaceVertexIter        ConstFaceVertexIter;
  typedef FaceVertexCWIter      ConstFaceVertexCWIter;
  typedef FaceVertexCCWIter     ConstFaceVertexCCWIter;
  typedef FaceHalfedgeIter      ConstFaceHalfedgeIter;
  typedef FaceHalfedgeCWIter    ConstFaceHalfedgeCWIter;
  typedef FaceHalfedgeCCWIter   ConstFaceHalfedgeCCWIter;
  typedef FaceEdgeIter          ConstFaceEdgeIter;
  typedef FaceEdgeCWIter        ConstFaceEdgeCWIter;
  typedef FaceEdgeCCWIter       ConstFaceEdgeCCWIter;
  typedef FaceFaceIter          ConstFaceFaceIter;
  typedef FaceFaceCWIter        ConstFaceFaceCWIter;
  typedef FaceFaceCCWIter       ConstFaceFaceCCWIter;
292 293 294 295

  /*
   * Halfedge circulator
   */
296 297 298
  typedef HalfedgeLoopIter      ConstHalfedgeLoopIter;
  typedef HalfedgeLoopCWIter    ConstHalfedgeLoopCWIter;
  typedef HalfedgeLoopCCWIter   ConstHalfedgeLoopCCWIter;
299

Jan Möbius's avatar
Jan Möbius committed
300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323
  //@}

  // --- shortcuts

  /** \name Typedef Shortcuts
      Provided for convenience only
  */
  //@{
  /// Alias typedef
  typedef VertexHandle    VHandle;
  typedef HalfedgeHandle  HHandle;
  typedef EdgeHandle      EHandle;
  typedef FaceHandle      FHandle;

  typedef VertexIter    VIter;
  typedef HalfedgeIter  HIter;
  typedef EdgeIter      EIter;
  typedef FaceIter      FIter;

  typedef ConstVertexIter    CVIter;
  typedef ConstHalfedgeIter  CHIter;
  typedef ConstEdgeIter      CEIter;
  typedef ConstFaceIter      CFIter;

324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376
  typedef VertexVertexIter        VVIter;
  typedef VertexVertexCWIter      VVCWIter;
  typedef VertexVertexCCWIter     VVCCWIter;
  typedef VertexOHalfedgeIter     VOHIter;
  typedef VertexOHalfedgeCWIter   VOHCWIter;
  typedef VertexOHalfedgeCCWIter  VOHCCWIter;
  typedef VertexIHalfedgeIter     VIHIter;
  typedef VertexIHalfedgeCWIter   VIHICWter;
  typedef VertexIHalfedgeCCWIter  VIHICCWter;
  typedef VertexEdgeIter          VEIter;
  typedef VertexEdgeCWIter        VECWIter;
  typedef VertexEdgeCCWIter       VECCWIter;
  typedef VertexFaceIter          VFIter;
  typedef VertexFaceCWIter        VFCWIter;
  typedef VertexFaceCCWIter       VFCCWIter;
  typedef FaceVertexIter          FVIter;
  typedef FaceVertexCWIter        FVCWIter;
  typedef FaceVertexCCWIter       FVCCWIter;
  typedef FaceHalfedgeIter        FHIter;
  typedef FaceHalfedgeCWIter      FHCWIter;
  typedef FaceHalfedgeCCWIter     FHCWWIter;
  typedef FaceEdgeIter            FEIter;
  typedef FaceEdgeCWIter          FECWIter;
  typedef FaceEdgeCCWIter         FECWWIter;
  typedef FaceFaceIter            FFIter;

  typedef ConstVertexVertexIter         CVVIter;
  typedef ConstVertexVertexCWIter       CVVCWIter;
  typedef ConstVertexVertexCCWIter      CVVCCWIter;
  typedef ConstVertexOHalfedgeIter      CVOHIter;
  typedef ConstVertexOHalfedgeCWIter    CVOHCWIter;
  typedef ConstVertexOHalfedgeCCWIter   CVOHCCWIter;
  typedef ConstVertexIHalfedgeIter      CVIHIter;
  typedef ConstVertexIHalfedgeCWIter    CVIHCWIter;
  typedef ConstVertexIHalfedgeCCWIter   CVIHCCWIter;
  typedef ConstVertexEdgeIter           CVEIter;
  typedef ConstVertexEdgeCWIter         CVECWIter;
  typedef ConstVertexEdgeCCWIter        CVECCWIter;
  typedef ConstVertexFaceIter           CVFIter;
  typedef ConstVertexFaceCWIter         CVFCWIter;
  typedef ConstVertexFaceCCWIter        CVFCCWIter;
  typedef ConstFaceVertexIter           CFVIter;
  typedef ConstFaceVertexCWIter         CFVCWIter;
  typedef ConstFaceVertexCCWIter        CFVCCWIter;
  typedef ConstFaceHalfedgeIter         CFHIter;
  typedef ConstFaceHalfedgeCWIter       CFHCWIter;
  typedef ConstFaceHalfedgeCCWIter      CFHCCWIter;
  typedef ConstFaceEdgeIter             CFEIter;
  typedef ConstFaceEdgeCWIter           CFECWIter;
  typedef ConstFaceEdgeCCWIter          CFECCWIter;
  typedef ConstFaceFaceIter             CFFIter;
  typedef ConstFaceFaceCWIter           CFFCWIter;
  typedef ConstFaceFaceCCWIter          CFFCCWIter;
Jan Möbius's avatar
Jan Möbius committed
377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394
  //@}

public:

  PolyConnectivity()  {}
  virtual ~PolyConnectivity() {}

  inline static bool is_triangles()
  { return false; }

  /** assign_connectivity() method. See ArrayKernel::assign_connectivity()
      for more details. */
  inline void assign_connectivity(const PolyConnectivity& _other)
  { ArrayKernel::assign_connectivity(_other); }
  
  /** \name Adding items to a mesh
  */
  //@{
395

Jan Möbius's avatar
Jan Möbius committed
396 397 398 399
  /// Add a new vertex 
  inline VertexHandle add_vertex()
  { return new_vertex(); }

400 401 402 403 404 405 406
  /** \brief Add and connect a new face
  *
  * Create a new face consisting of the vertices provided by the vertex handle vector.
  * (The vertices have to be already added to the mesh by add_vertex)
  *
  * @param _vhandles sorted list of vertex handles (also defines order in which the vertices are added to the face)
  */
407
  FaceHandle add_face(const std::vector<VertexHandle>& _vhandles);
408 409 410 411 412 413 414
 
   
  /** \brief Add and connect a new face
  *
  * Create a new face consisting of three vertices provided by the handles.
  * (The vertices have to be already added to the mesh by add_vertex)
  *
Jan Möbius's avatar
Jan Möbius committed
415 416 417
  * @param _vh0 First  vertex handle
  * @param _vh1 Second vertex handle
  * @param _vh2 Third  vertex handle
418
  */
419
  FaceHandle add_face(VertexHandle _vh0, VertexHandle _vh1, VertexHandle _vh2);
420 421 422 423 424 425

  /** \brief Add and connect a new face
  *
  * Create a new face consisting of four vertices provided by the handles.
  * (The vertices have to be already added to the mesh by add_vertex)
  *
Jan Möbius's avatar
Jan Möbius committed
426 427 428 429
  * @param _vh0 First  vertex handle
  * @param _vh1 Second vertex handle
  * @param _vh2 Third  vertex handle
  * @param _vh3 Fourth vertex handle
430
  */
431
  FaceHandle add_face(VertexHandle _vh0, VertexHandle _vh1, VertexHandle _vh2, VertexHandle _vh3);
432 433 434 435 436 437 438 439 440
 
  /** \brief Add and connect a new face
  *
  * Create a new face consisting of vertices provided by a handle array.
  * (The vertices have to be already added to the mesh by add_vertex)
  *
  * @param _vhandles pointer to a sorted list of vertex handles (also defines order in which the vertices are added to the face)
  * @param _vhs_size number of vertex handles in the array
  */
Jan Möbius's avatar
Jan Möbius committed
441
  FaceHandle add_face(const VertexHandle* _vhandles, size_t _vhs_size);
442

Jan Möbius's avatar
Jan Möbius committed
443 444 445 446 447
  //@}

  /// \name Deleting mesh items and other connectivity/topology modifications
  //@{

448 449 450 451 452 453 454
  /** Returns whether collapsing halfedge _heh is ok or would lead to
      topological inconsistencies.
      \attention This method need the Attributes::Status attribute and
      changes the \em tagged bit.  */
  bool is_collapse_ok(HalfedgeHandle _he);
    
    
Jan Möbius's avatar
Jan Möbius committed
455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472
  /** Mark vertex and all incident edges and faces deleted.
      Items marked deleted will be removed by garbageCollection().
      \attention Needs the Attributes::Status attribute for vertices,
      edges and faces.
  */
  void delete_vertex(VertexHandle _vh, bool _delete_isolated_vertices = true);

  /** Mark edge (two opposite halfedges) and incident faces deleted.
      Resulting isolated vertices are marked deleted if
      _delete_isolated_vertices is true. Items marked deleted will be
      removed by garbageCollection().

      \attention Needs the Attributes::Status attribute for vertices,
      edges and faces.
  */
  void delete_edge(EdgeHandle _eh, bool _delete_isolated_vertices=true);

  /** Delete face _fh and resulting degenerated empty halfedges as
473
      well.  Resulting isolated vertices will be deleted if
Jan Möbius's avatar
Jan Möbius committed
474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490
      _delete_isolated_vertices is true.

      \attention All item will only be marked to be deleted. They will
      actually be removed by calling garbage_collection().

      \attention Needs the Attributes::Status attribute for vertices,
      edges and faces.
  */
  void delete_face(FaceHandle _fh, bool _delete_isolated_vertices=true);

  //@}
  
  /** \name Begin and end iterators
  */
  //@{

  /// Begin iterator for vertices
491
  VertexIter vertices_begin();
Jan Möbius's avatar
Jan Möbius committed
492
  /// Const begin iterator for vertices
493
  ConstVertexIter vertices_begin() const;
Jan Möbius's avatar
Jan Möbius committed
494
  /// End iterator for vertices
495
  VertexIter vertices_end();
Jan Möbius's avatar
Jan Möbius committed
496
  /// Const end iterator for vertices
497
  ConstVertexIter vertices_end() const;
Jan Möbius's avatar
Jan Möbius committed
498 499

  /// Begin iterator for halfedges
500
  HalfedgeIter halfedges_begin();
Jan Möbius's avatar
Jan Möbius committed
501
  /// Const begin iterator for halfedges
502
  ConstHalfedgeIter halfedges_begin() const;
Jan Möbius's avatar
Jan Möbius committed
503
  /// End iterator for halfedges
504
  HalfedgeIter halfedges_end();
Jan Möbius's avatar
Jan Möbius committed
505
  /// Const end iterator for halfedges
506
  ConstHalfedgeIter halfedges_end() const;
Jan Möbius's avatar
Jan Möbius committed
507 508

  /// Begin iterator for edges
509
  EdgeIter edges_begin();
Jan Möbius's avatar
Jan Möbius committed
510
  /// Const begin iterator for edges
511
  ConstEdgeIter edges_begin() const;
Jan Möbius's avatar
Jan Möbius committed
512
  /// End iterator for edges
513
  EdgeIter edges_end();
Jan Möbius's avatar
Jan Möbius committed
514
  /// Const end iterator for edges
515
  ConstEdgeIter edges_end() const;
Jan Möbius's avatar
Jan Möbius committed
516 517

  /// Begin iterator for faces
518
  FaceIter faces_begin();
Jan Möbius's avatar
Jan Möbius committed
519
  /// Const begin iterator for faces
520
  ConstFaceIter faces_begin() const;
Jan Möbius's avatar
Jan Möbius committed
521
  /// End iterator for faces
522
  FaceIter faces_end();
Jan Möbius's avatar
Jan Möbius committed
523
  /// Const end iterator for faces
524
  ConstFaceIter faces_end() const;
Jan Möbius's avatar
Jan Möbius committed
525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568
  //@}


  /** \name Begin for skipping iterators
  */
  //@{

  /// Begin iterator for vertices
  VertexIter vertices_sbegin()
  { return VertexIter(*this, VertexHandle(0), true); }
  /// Const begin iterator for vertices
  ConstVertexIter vertices_sbegin() const
  { return ConstVertexIter(*this, VertexHandle(0), true); }

  /// Begin iterator for halfedges
  HalfedgeIter halfedges_sbegin()
  { return HalfedgeIter(*this, HalfedgeHandle(0), true); }
  /// Const begin iterator for halfedges
  ConstHalfedgeIter halfedges_sbegin() const
  { return ConstHalfedgeIter(*this, HalfedgeHandle(0), true); }

  /// Begin iterator for edges
  EdgeIter edges_sbegin()
  { return EdgeIter(*this, EdgeHandle(0), true); }
  /// Const begin iterator for edges
  ConstEdgeIter edges_sbegin() const
  { return ConstEdgeIter(*this, EdgeHandle(0), true); }

  /// Begin iterator for faces
  FaceIter faces_sbegin()
  { return FaceIter(*this, FaceHandle(0), true); }
  /// Const begin iterator for faces
  ConstFaceIter faces_sbegin() const
  { return ConstFaceIter(*this, FaceHandle(0), true); }

  //@}

  //--- circulators ---

  /** \name Vertex and Face circulators
  */
  //@{

  /// vertex - vertex circulator
569 570
  VertexVertexIter vv_iter(VertexHandle _vh)
  { return VertexVertexIter(*this, _vh); }
571 572 573 574 575 576
  /// vertex - vertex circulator cw
  VertexVertexCWIter vv_cwiter(VertexHandle _vh)
  { return VertexVertexCWIter(*this, _vh); }
  /// vertex - vertex circulator ccw
  VertexVertexCCWIter vv_ccwiter(VertexHandle _vh)
  { return VertexVertexCCWIter(*this, _vh); }
Jan Möbius's avatar
Jan Möbius committed
577 578 579
  /// vertex - incoming halfedge circulator
  VertexIHalfedgeIter vih_iter(VertexHandle _vh)
  { return VertexIHalfedgeIter(*this, _vh); }
580 581 582 583 584 585
  /// vertex - incoming halfedge circulator cw
  VertexIHalfedgeCWIter vih_cwiter(VertexHandle _vh)
  { return VertexIHalfedgeCWIter(*this, _vh); }
  /// vertex - incoming halfedge circulator ccw
  VertexIHalfedgeCCWIter vih_ccwiter(VertexHandle _vh)
  { return VertexIHalfedgeCCWIter(*this, _vh); }
Jan Möbius's avatar
Jan Möbius committed
586 587 588
  /// vertex - outgoing halfedge circulator
  VertexOHalfedgeIter voh_iter(VertexHandle _vh)
  { return VertexOHalfedgeIter(*this, _vh); }
589 590 591 592 593 594
  /// vertex - outgoing halfedge circulator cw
  VertexOHalfedgeCWIter voh_cwiter(VertexHandle _vh)
  { return VertexOHalfedgeCWIter(*this, _vh); }
  /// vertex - outgoing halfedge circulator ccw
  VertexOHalfedgeCCWIter voh_ccwiter(VertexHandle _vh)
  { return VertexOHalfedgeCCWIter(*this, _vh); }
Jan Möbius's avatar
Jan Möbius committed
595 596 597
  /// vertex - edge circulator
  VertexEdgeIter ve_iter(VertexHandle _vh)
  { return VertexEdgeIter(*this, _vh); }
598 599 600 601 602 603
  /// vertex - edge circulator cw
  VertexEdgeCWIter ve_cwiter(VertexHandle _vh)
  { return VertexEdgeCWIter(*this, _vh); }
  /// vertex - edge circulator ccw
  VertexEdgeCCWIter ve_ccwiter(VertexHandle _vh)
  { return VertexEdgeCCWIter(*this, _vh); }
Jan Möbius's avatar
Jan Möbius committed
604 605 606
  /// vertex - face circulator
  VertexFaceIter vf_iter(VertexHandle _vh)
  { return VertexFaceIter(*this, _vh); }
607 608 609 610 611 612
  /// vertex - face circulator cw
  VertexFaceCWIter vf_cwiter(VertexHandle _vh)
  { return VertexFaceCWIter(*this, _vh); }
  /// vertex - face circulator ccw
  VertexFaceCCWIter vf_ccwiter(VertexHandle _vh)
  { return VertexFaceCCWIter(*this, _vh); }
Jan Möbius's avatar
Jan Möbius committed
613 614 615 616

  /// const vertex circulator
  ConstVertexVertexIter cvv_iter(VertexHandle _vh) const
  { return ConstVertexVertexIter(*this, _vh); }
617 618 619 620 621 622
  /// const vertex circulator cw
  ConstVertexVertexCWIter cvv_cwiter(VertexHandle _vh) const
  { return ConstVertexVertexCWIter(*this, _vh); }
  /// const vertex circulator ccw
  ConstVertexVertexCCWIter cvv_ccwiter(VertexHandle _vh) const
  { return ConstVertexVertexCCWIter(*this, _vh); }
Jan Möbius's avatar
Jan Möbius committed
623 624 625
  /// const vertex - incoming halfedge circulator
  ConstVertexIHalfedgeIter cvih_iter(VertexHandle _vh) const
  { return ConstVertexIHalfedgeIter(*this, _vh); }
626 627 628 629 630 631
  /// const vertex - incoming halfedge circulator cw
  ConstVertexIHalfedgeCWIter cvih_cwiter(VertexHandle _vh) const
  { return ConstVertexIHalfedgeCWIter(*this, _vh); }
  /// const vertex - incoming halfedge circulator ccw
  ConstVertexIHalfedgeCCWIter cvih_ccwiter(VertexHandle _vh) const
  { return ConstVertexIHalfedgeCCWIter(*this, _vh); }
Jan Möbius's avatar
Jan Möbius committed
632 633 634
  /// const vertex - outgoing halfedge circulator
  ConstVertexOHalfedgeIter cvoh_iter(VertexHandle _vh) const
  { return ConstVertexOHalfedgeIter(*this, _vh); }
635 636 637 638 639 640
  /// const vertex - outgoing halfedge circulator cw
  ConstVertexOHalfedgeCWIter cvoh_cwiter(VertexHandle _vh) const
  { return ConstVertexOHalfedgeCWIter(*this, _vh); }
  /// const vertex - outgoing halfedge circulator ccw
  ConstVertexOHalfedgeCCWIter cvoh_ccwiter(VertexHandle _vh) const
  { return ConstVertexOHalfedgeCCWIter(*this, _vh); }
Jan Möbius's avatar
Jan Möbius committed
641 642 643
  /// const vertex - edge circulator
  ConstVertexEdgeIter cve_iter(VertexHandle _vh) const
  { return ConstVertexEdgeIter(*this, _vh); }
644 645 646 647 648 649
  /// const vertex - edge circulator cw
  ConstVertexEdgeCWIter cve_cwiter(VertexHandle _vh) const
  { return ConstVertexEdgeCWIter(*this, _vh); }
  /// const vertex - edge circulator ccw
  ConstVertexEdgeCCWIter cve_ccwiter(VertexHandle _vh) const
  { return ConstVertexEdgeCCWIter(*this, _vh); }
Jan Möbius's avatar
Jan Möbius committed
650 651 652
  /// const vertex - face circulator
  ConstVertexFaceIter cvf_iter(VertexHandle _vh) const
  { return ConstVertexFaceIter(*this, _vh); }
653 654 655 656 657 658
  /// const vertex - face circulator cw
  ConstVertexFaceCWIter cvf_cwiter(VertexHandle _vh) const
  { return ConstVertexFaceCWIter(*this, _vh); }
  /// const vertex - face circulator ccw
  ConstVertexFaceCCWIter cvf_ccwiter(VertexHandle _vh) const
  { return ConstVertexFaceCCWIter(*this, _vh); }
Jan Möbius's avatar
Jan Möbius committed
659 660 661 662

  /// face - vertex circulator
  FaceVertexIter fv_iter(FaceHandle _fh)
  { return FaceVertexIter(*this, _fh); }
663 664 665 666 667 668
  /// face - vertex circulator cw
  FaceVertexCWIter fv_cwiter(FaceHandle _fh)
  { return FaceVertexCWIter(*this, _fh); }
  /// face - vertex circulator ccw
  FaceVertexCCWIter fv_ccwiter(FaceHandle _fh)
  { return FaceVertexCCWIter(*this, _fh); }
Jan Möbius's avatar
Jan Möbius committed
669 670 671
  /// face - halfedge circulator
  FaceHalfedgeIter fh_iter(FaceHandle _fh)
  { return FaceHalfedgeIter(*this, _fh); }
672 673 674 675 676 677
  /// face - halfedge circulator cw
  FaceHalfedgeCWIter fh_cwiter(FaceHandle _fh)
  { return FaceHalfedgeCWIter(*this, _fh); }
  /// face - halfedge circulator ccw
  FaceHalfedgeCCWIter fh_ccwiter(FaceHandle _fh)
  { return FaceHalfedgeCCWIter(*this, _fh); }
Jan Möbius's avatar
Jan Möbius committed
678 679 680
  /// face - edge circulator
  FaceEdgeIter fe_iter(FaceHandle _fh)
  { return FaceEdgeIter(*this, _fh); }
681 682 683 684 685 686
  /// face - edge circulator cw
  FaceEdgeCWIter fe_cwiter(FaceHandle _fh)
  { return FaceEdgeCWIter(*this, _fh); }
  /// face - edge circulator ccw
  FaceEdgeCCWIter fe_ccwiter(FaceHandle _fh)
  { return FaceEdgeCCWIter(*this, _fh); }
Jan Möbius's avatar
Jan Möbius committed
687 688 689
  /// face - face circulator
  FaceFaceIter ff_iter(FaceHandle _fh)
  { return FaceFaceIter(*this, _fh); }
690 691 692 693 694 695
  /// face - face circulator cw
  FaceFaceCWIter ff_cwiter(FaceHandle _fh)
  { return FaceFaceCWIter(*this, _fh); }
  /// face - face circulator ccw
  FaceFaceCCWIter ff_ccwiter(FaceHandle _fh)
  { return FaceFaceCCWIter(*this, _fh); }
Jan Möbius's avatar
Jan Möbius committed
696 697 698 699

  /// const face - vertex circulator
  ConstFaceVertexIter cfv_iter(FaceHandle _fh) const
  { return ConstFaceVertexIter(*this, _fh); }
700 701 702 703 704 705
  /// const face - vertex circulator cw
  ConstFaceVertexCWIter cfv_cwiter(FaceHandle _fh) const
  { return ConstFaceVertexCWIter(*this, _fh); }
  /// const face - vertex circulator ccw
  ConstFaceVertexCCWIter cfv_ccwiter(FaceHandle _fh) const
  { return ConstFaceVertexCCWIter(*this, _fh); }
Jan Möbius's avatar
Jan Möbius committed
706 707 708
  /// const face - halfedge circulator
  ConstFaceHalfedgeIter cfh_iter(FaceHandle _fh) const
  { return ConstFaceHalfedgeIter(*this, _fh); }
709 710 711 712 713 714
  /// const face - halfedge circulator cw
  ConstFaceHalfedgeCWIter cfh_cwiter(FaceHandle _fh) const
  { return ConstFaceHalfedgeCWIter(*this, _fh); }
  /// const face - halfedge circulator ccw
  ConstFaceHalfedgeCCWIter cfh_ccwiter(FaceHandle _fh) const
  { return ConstFaceHalfedgeCCWIter(*this, _fh); }
Jan Möbius's avatar
Jan Möbius committed
715 716 717
  /// const face - edge circulator
  ConstFaceEdgeIter cfe_iter(FaceHandle _fh) const
  { return ConstFaceEdgeIter(*this, _fh); }
718 719 720 721 722 723
  /// const face - edge circulator cw
  ConstFaceEdgeCWIter cfe_cwiter(FaceHandle _fh) const
  { return ConstFaceEdgeCWIter(*this, _fh); }
  /// const face - edge circulator ccw
  ConstFaceEdgeCCWIter cfe_ccwiter(FaceHandle _fh) const
  { return ConstFaceEdgeCCWIter(*this, _fh); }
Jan Möbius's avatar
Jan Möbius committed
724 725 726
  /// const face - face circulator
  ConstFaceFaceIter cff_iter(FaceHandle _fh) const
  { return ConstFaceFaceIter(*this, _fh); }
727 728 729 730 731 732
  /// const face - face circulator cw
  ConstFaceFaceCWIter cff_cwiter(FaceHandle _fh) const
  { return ConstFaceFaceCWIter(*this, _fh); }
  /// const face - face circulator
  ConstFaceFaceCCWIter cff_ccwiter(FaceHandle _fh) const
  { return ConstFaceFaceCCWIter(*this, _fh); }
733 734 735 736 737 738
  
  // 'begin' circulators
  
  /// vertex - vertex circulator
  VertexVertexIter vv_begin(VertexHandle _vh)
  { return VertexVertexIter(*this, _vh); }
739 740 741 742 743 744
  /// vertex - vertex circulator cw
  VertexVertexCWIter vv_cwbegin(VertexHandle _vh)
  { return VertexVertexCWIter(*this, _vh); }
  /// vertex - vertex circulator ccw
  VertexVertexCCWIter vv_ccwbegin(VertexHandle _vh)
  { return VertexVertexCCWIter(*this, _vh); }
745 746 747
  /// vertex - incoming halfedge circulator
  VertexIHalfedgeIter vih_begin(VertexHandle _vh)
  { return VertexIHalfedgeIter(*this, _vh); }
748 749 750 751 752 753
  /// vertex - incoming halfedge circulator cw
  VertexIHalfedgeCWIter vih_cwbegin(VertexHandle _vh)
  { return VertexIHalfedgeCWIter(*this, _vh); }
  /// vertex - incoming halfedge circulator ccw
  VertexIHalfedgeCCWIter vih_ccwbegin(VertexHandle _vh)
  { return VertexIHalfedgeCCWIter(*this, _vh); }
754 755 756
  /// vertex - outgoing halfedge circulator
  VertexOHalfedgeIter voh_begin(VertexHandle _vh)
  { return VertexOHalfedgeIter(*this, _vh); }
757 758 759 760 761 762
  /// vertex - outgoing halfedge circulator cw
  VertexOHalfedgeCWIter voh_cwbegin(VertexHandle _vh)
  { return VertexOHalfedgeCWIter(*this, _vh); }
  /// vertex - outgoing halfedge circulator ccw
  VertexOHalfedgeCCWIter voh_ccwbegin(VertexHandle _vh)
  { return VertexOHalfedgeCCWIter(*this, _vh); }
763 764 765
  /// vertex - edge circulator
  VertexEdgeIter ve_begin(VertexHandle _vh)
  { return VertexEdgeIter(*this, _vh); }
766 767 768 769 770 771
  /// vertex - edge circulator cw
  VertexEdgeCWIter ve_cwbegin(VertexHandle _vh)
  { return VertexEdgeCWIter(*this, _vh); }
  /// vertex - edge circulator ccw
  VertexEdgeCCWIter ve_ccwbegin(VertexHandle _vh)
  { return VertexEdgeCCWIter(*this, _vh); }
772 773 774
  /// vertex - face circulator
  VertexFaceIter vf_begin(VertexHandle _vh)
  { return VertexFaceIter(*this, _vh); }
775 776 777 778 779 780 781
  /// vertex - face circulator cw
  VertexFaceCWIter vf_cwbegin(VertexHandle _vh)
  { return VertexFaceCWIter(*this, _vh); }
  /// vertex - face circulator ccw
  VertexFaceCCWIter vf_ccwbegin(VertexHandle _vh)
  { return VertexFaceCCWIter(*this, _vh); }

782 783 784 785

  /// const vertex circulator
  ConstVertexVertexIter cvv_begin(VertexHandle _vh) const
  { return ConstVertexVertexIter(*this, _vh); }
786 787 788 789 790 791
  /// const vertex circulator cw
  ConstVertexVertexCWIter cvv_cwbegin(VertexHandle _vh) const
  { return ConstVertexVertexCWIter(*this, _vh); }
  /// const vertex circulator ccw
  ConstVertexVertexCCWIter cvv_ccwbegin(VertexHandle _vh) const
  { return ConstVertexVertexCCWIter(*this, _vh); }
792 793 794
  /// const vertex - incoming halfedge circulator
  ConstVertexIHalfedgeIter cvih_begin(VertexHandle _vh) const
  { return ConstVertexIHalfedgeIter(*this, _vh); }
795 796 797 798 799 800
  /// const vertex - incoming halfedge circulator cw
  ConstVertexIHalfedgeCWIter cvih_cwbegin(VertexHandle _vh) const
  { return ConstVertexIHalfedgeCWIter(*this, _vh); }
  /// const vertex - incoming halfedge circulator ccw
  ConstVertexIHalfedgeCCWIter cvih_ccwbegin(VertexHandle _vh) const
  { return ConstVertexIHalfedgeCCWIter(*this, _vh); }
801 802 803
  /// const vertex - outgoing halfedge circulator
  ConstVertexOHalfedgeIter cvoh_begin(VertexHandle _vh) const
  { return ConstVertexOHalfedgeIter(*this, _vh); }
804 805 806 807 808 809
  /// const vertex - outgoing halfedge circulator cw
  ConstVertexOHalfedgeCWIter cvoh_cwbegin(VertexHandle _vh) const
  { return ConstVertexOHalfedgeCWIter(*this, _vh); }
  /// const vertex - outgoing halfedge circulator ccw
  ConstVertexOHalfedgeCCWIter cvoh_ccwbegin(VertexHandle _vh) const
  { return ConstVertexOHalfedgeCCWIter(*this, _vh); }
810 811 812
  /// const vertex - edge circulator
  ConstVertexEdgeIter cve_begin(VertexHandle _vh) const
  { return ConstVertexEdgeIter(*this, _vh); }
813 814 815 816 817 818
  /// const vertex - edge circulator cw
  ConstVertexEdgeCWIter cve_cwbegin(VertexHandle _vh) const
  { return ConstVertexEdgeCWIter(*this, _vh); }
  /// const vertex - edge circulator ccw
  ConstVertexEdgeCCWIter cve_ccwbegin(VertexHandle _vh) const
  { return ConstVertexEdgeCCWIter(*this, _vh); }
819 820 821
  /// const vertex - face circulator
  ConstVertexFaceIter cvf_begin(VertexHandle _vh) const
  { return ConstVertexFaceIter(*this, _vh); }
822 823 824 825 826 827
  /// const vertex - face circulator cw
  ConstVertexFaceCWIter cvf_cwbegin(VertexHandle _vh) const
  { return ConstVertexFaceCWIter(*this, _vh); }
  /// const vertex - face circulator ccw
  ConstVertexFaceCCWIter cvf_ccwbegin(VertexHandle _vh) const
  { return ConstVertexFaceCCWIter(*this, _vh); }
828 829 830 831

  /// face - vertex circulator
  FaceVertexIter fv_begin(FaceHandle _fh)
  { return FaceVertexIter(*this, _fh); }
832 833 834 835 836 837
  /// face - vertex circulator cw
  FaceVertexCWIter fv_cwbegin(FaceHandle _fh)
  { return FaceVertexCWIter(*this, _fh); }
  /// face - vertex circulator ccw
  FaceVertexCCWIter fv_ccwbegin(FaceHandle _fh)
  { return FaceVertexCCWIter(*this, _fh); }
838 839 840
  /// face - halfedge circulator
  FaceHalfedgeIter fh_begin(FaceHandle _fh)
  { return FaceHalfedgeIter(*this, _fh); }
841 842 843 844 845 846
  /// face - halfedge circulator cw
  FaceHalfedgeCWIter fh_cwbegin(FaceHandle _fh)
  { return FaceHalfedgeCWIter(*this, _fh); }
  /// face - halfedge circulator ccw
  FaceHalfedgeCCWIter fh_ccwbegin(FaceHandle _fh)
  { return FaceHalfedgeCCWIter(*this, _fh); }
847 848 849
  /// face - edge circulator
  FaceEdgeIter fe_begin(FaceHandle _fh)
  { return FaceEdgeIter(*this, _fh); }
850 851 852 853 854 855
  /// face - edge circulator cw
  FaceEdgeCWIter fe_cwbegin(FaceHandle _fh)
  { return FaceEdgeCWIter(*this, _fh); }
  /// face - edge circulator ccw
  FaceEdgeCCWIter fe_ccwbegin(FaceHandle _fh)
  { return FaceEdgeCCWIter(*this, _fh); }
856 857 858
  /// face - face circulator
  FaceFaceIter ff_begin(FaceHandle _fh)
  { return FaceFaceIter(*this, _fh); }
859 860 861 862 863 864
  /// face - face circulator cw
  FaceFaceCWIter ff_cwbegin(FaceHandle _fh)
  { return FaceFaceCWIter(*this, _fh); }
  /// face - face circulator ccw
  FaceFaceCCWIter ff_ccwbegin(FaceHandle _fh)
  { return FaceFaceCCWIter(*this, _fh); }
865 866 867
  /// halfedge circulator
  HalfedgeLoopIter hl_begin(HalfedgeHandle _heh)
  { return HalfedgeLoopIter(*this, _heh); }
868 869 870 871 872 873
  /// halfedge circulator
  HalfedgeLoopCWIter hl_cwbegin(HalfedgeHandle _heh)
  { return HalfedgeLoopCWIter(*this, _heh); }
  /// halfedge circulator ccw
  HalfedgeLoopCCWIter hl_ccwbegin(HalfedgeHandle _heh)
  { return HalfedgeLoopCCWIter(*this, _heh); }
874 875 876 877

  /// const face - vertex circulator
  ConstFaceVertexIter cfv_begin(FaceHandle _fh) const
  { return ConstFaceVertexIter(*this, _fh); }
878 879 880 881 882 883
  /// const face - vertex circulator cw
  ConstFaceVertexCWIter cfv_cwbegin(FaceHandle _fh) const
  { return ConstFaceVertexCWIter(*this, _fh); }
  /// const face - vertex circulator ccw
  ConstFaceVertexCCWIter cfv_ccwbegin(FaceHandle _fh) const
  { return ConstFaceVertexCCWIter(*this, _fh); }
884 885 886
  /// const face - halfedge circulator
  ConstFaceHalfedgeIter cfh_begin(FaceHandle _fh) const
  { return ConstFaceHalfedgeIter(*this, _fh); }
887 888 889 890 891 892
  /// const face - halfedge circulator cw
  ConstFaceHalfedgeCWIter cfh_cwbegin(FaceHandle _fh) const
  { return ConstFaceHalfedgeCWIter(*this, _fh); }
  /// const face - halfedge circulator ccw
  ConstFaceHalfedgeCCWIter cfh_ccwbegin(FaceHandle _fh) const
  { return ConstFaceHalfedgeCCWIter(*this, _fh); }
893 894 895
  /// const face - edge circulator
  ConstFaceEdgeIter cfe_begin(FaceHandle _fh) const
  { return ConstFaceEdgeIter(*this, _fh); }
896 897 898 899 900 901
  /// const face - edge circulator cw
  ConstFaceEdgeCWIter cfe_cwbegin(FaceHandle _fh) const
  { return ConstFaceEdgeCWIter(*this, _fh); }
  /// const face - edge circulator ccw
  ConstFaceEdgeCCWIter cfe_ccwbegin(FaceHandle _fh) const
  { return ConstFaceEdgeCCWIter(*this, _fh); }
902 903 904
  /// const face - face circulator
  ConstFaceFaceIter cff_begin(FaceHandle _fh) const
  { return ConstFaceFaceIter(*this, _fh); }
905 906 907 908 909 910
  /// const face - face circulator cw
  ConstFaceFaceCWIter cff_cwbegin(FaceHandle _fh) const
  { return ConstFaceFaceCWIter(*this, _fh); }
  /// const face - face circulator ccw
  ConstFaceFaceCCWIter cff_ccwbegin(FaceHandle _fh) const
  { return ConstFaceFaceCCWIter(*this, _fh); }
911 912 913
  /// const halfedge circulator
  ConstHalfedgeLoopIter chl_begin(HalfedgeHandle _heh) const
  { return ConstHalfedgeLoopIter(*this, _heh); }
914 915 916 917 918 919
  /// const halfedge circulator cw
  ConstHalfedgeLoopCWIter chl_cwbegin(HalfedgeHandle _heh) const
  { return ConstHalfedgeLoopCWIter(*this, _heh); }
  /// const halfedge circulator ccw
  ConstHalfedgeLoopCCWIter chl_ccwbegin(HalfedgeHandle _heh) const
  { return ConstHalfedgeLoopCCWIter(*this, _heh); }
920 921 922 923 924 925
  
  // 'end' circulators
  
  /// vertex - vertex circulator
  VertexVertexIter vv_end(VertexHandle _vh)
  { return VertexVertexIter(*this, _vh, true); }
926 927 928 929 930 931
  /// vertex - vertex circulator cw
  VertexVertexCWIter vv_cwend(VertexHandle _vh)
  { return VertexVertexCWIter(*this, _vh, true); }
  /// vertex - vertex circulator ccw
  VertexVertexCCWIter vv_ccwend(VertexHandle _vh)
  { return VertexVertexCCWIter(*this, _vh, true); }
932 933 934
  /// vertex - incoming halfedge circulator
  VertexIHalfedgeIter vih_end(VertexHandle _vh)
  { return VertexIHalfedgeIter(*this, _vh, true); }
935 936 937 938 939 940
  /// vertex - incoming halfedge circulator cw
  VertexIHalfedgeCWIter vih_cwend(VertexHandle _vh)
  { return VertexIHalfedgeCWIter(*this, _vh, true); }
  /// vertex - incoming halfedge circulator ccw
  VertexIHalfedgeCCWIter vih_ccwend(VertexHandle _vh)
  { return VertexIHalfedgeCCWIter(*this, _vh, true); }
941 942 943
  /// vertex - outgoing halfedge circulator
  VertexOHalfedgeIter voh_end(VertexHandle _vh)
  { return VertexOHalfedgeIter(*this, _vh, true); }
944 945 946 947 948 949
  /// vertex - outgoing halfedge circulator cw
  VertexOHalfedgeCWIter voh_cwend(VertexHandle _vh)
  { return VertexOHalfedgeCWIter(*this, _vh, true); }
  /// vertex - outgoing halfedge circulator ccw
  VertexOHalfedgeCCWIter voh_ccwend(VertexHandle _vh)
  { return VertexOHalfedgeCCWIter(*this, _vh, true); }
950 951 952
  /// vertex - edge circulator
  VertexEdgeIter ve_end(VertexHandle _vh)
  { return VertexEdgeIter(*this, _vh, true); }
953 954 955 956 957 958
  /// vertex - edge circulator cw
  VertexEdgeCWIter ve_cwend(VertexHandle _vh)
  { return VertexEdgeCWIter(*this, _vh, true); }
  /// vertex - edge circulator ccw
  VertexEdgeCCWIter ve_ccwend(VertexHandle _vh)
  { return VertexEdgeCCWIter(*this, _vh, true); }
959 960 961
  /// vertex - face circulator
  VertexFaceIter vf_end(VertexHandle _vh)
  { return VertexFaceIter(*this, _vh, true); }
962 963 964 965 966 967
  /// vertex - face circulator cw
  VertexFaceCWIter vf_cwend(VertexHandle _vh)
  { return VertexFaceCWIter(*this, _vh, true); }
  /// vertex - face circulator ccw
  VertexFaceCCWIter vf_ccwend(VertexHandle _vh)
  { return VertexFaceCCWIter(*this, _vh, true); }
968 969 970 971

  /// const vertex circulator
  ConstVertexVertexIter cvv_end(VertexHandle _vh) const
  { return ConstVertexVertexIter(*this, _vh, true); }
972 973 974 975 976 977
  /// const vertex circulator cw
  ConstVertexVertexCWIter cvv_cwend(VertexHandle _vh) const
  { return ConstVertexVertexCWIter(*this, _vh, true); }
  /// const vertex circulator ccw
  ConstVertexVertexCCWIter cvv_ccwend(VertexHandle _vh) const
  { return ConstVertexVertexCCWIter(*this, _vh, true); }
978 979 980
  /// const vertex - incoming halfedge circulator
  ConstVertexIHalfedgeIter cvih_end(VertexHandle _vh) const
  { return ConstVertexIHalfedgeIter(*this, _vh, true); }
981 982 983 984 985 986
  /// const vertex - incoming halfedge circulator cw
  ConstVertexIHalfedgeCWIter cvih_cwend(VertexHandle _vh) const
  { return ConstVertexIHalfedgeCWIter(*this, _vh, true); }
  /// const vertex - incoming halfedge circulator ccw
  ConstVertexIHalfedgeCCWIter cvih_ccwend(VertexHandle _vh) const
  { return ConstVertexIHalfedgeCCWIter(*this, _vh, true); }
987 988 989
  /// const vertex - outgoing halfedge circulator
  ConstVertexOHalfedgeIter cvoh_end(VertexHandle _vh) const
  { return ConstVertexOHalfedgeIter(*this, _vh, true); }
990 991 992 993 994 995
  /// const vertex - outgoing halfedge circulator cw
  ConstVertexOHalfedgeCWIter cvoh_cwend(VertexHandle _vh) const
  { return ConstVertexOHalfedgeCWIter(*this, _vh, true); }
  /// const vertex - outgoing halfedge circulator ccw
  ConstVertexOHalfedgeCCWIter cvoh_ccwend(VertexHandle _vh) const
  { return ConstVertexOHalfedgeCCWIter(*this, _vh, true); }
996 997 998
  /// const vertex - edge circulator
  ConstVertexEdgeIter cve_end(VertexHandle _vh) const
  { return ConstVertexEdgeIter(*this, _vh, true); }
999 1000 1001 1002 1003 1004
  /// const vertex - edge circulator cw
  ConstVertexEdgeCWIter cve_cwend(VertexHandle _vh) const
  { return ConstVertexEdgeCWIter(*this, _vh, true); }
  /// const vertex - edge circulator ccw
  ConstVertexEdgeCCWIter cve_ccwend(VertexHandle _vh) const
  { return ConstVertexEdgeCCWIter(*this, _vh, true); }
1005 1006 1007
  /// const vertex - face circulator
  ConstVertexFaceIter cvf_end(VertexHandle _vh) const
  { return ConstVertexFaceIter(*this, _vh, true); }
1008 1009 1010 1011 1012 1013
  /// const vertex - face circulator cw
  ConstVertexFaceCWIter cvf_cwend(VertexHandle _vh) const
  { return ConstVertexFaceCWIter(*this, _vh, true); }
  /// const vertex - face circulator ccw
  ConstVertexFaceCCWIter cvf_ccwend(VertexHandle _vh) const
  { return ConstVertexFaceCCWIter(*this, _vh, true); }
1014 1015 1016 1017

  /// face - vertex circulator
  FaceVertexIter fv_end(FaceHandle _fh)
  { return FaceVertexIter(*this, _fh, true); }
1018 1019 1020 1021 1022 1023
  /// face - vertex circulator cw
  FaceVertexCWIter fv_cwend(FaceHandle _fh)
  { return FaceVertexCWIter(*this, _fh, true); }
  /// face - vertex circulator ccw
  FaceVertexCCWIter fv_ccwend(FaceHandle _fh)
  { return FaceVertexCCWIter(*this, _fh, true); }
1024 1025 1026
  /// face - halfedge circulator
  FaceHalfedgeIter fh_end(FaceHandle _fh)
  { return FaceHalfedgeIter(*this, _fh, true); }
1027 1028 1029 1030 1031 1032
  /// face - halfedge circulator cw
  FaceHalfedgeCWIter fh_cwend(FaceHandle _fh)
  { return FaceHalfedgeCWIter(*this, _fh, true); }
  /// face - halfedge circulator ccw
  FaceHalfedgeCCWIter fh_ccwend(FaceHandle _fh)
  { return FaceHalfedgeCCWIter(*this, _fh, true); }
1033 1034 1035
  /// face - edge circulator
  FaceEdgeIter fe_end(FaceHandle _fh)
  { return FaceEdgeIter(*this, _fh, true); }
1036 1037 1038 1039 1040 1041
  /// face - edge circulator cw
  FaceEdgeCWIter fe_cwend(FaceHandle _fh)
  { return FaceEdgeCWIter(*this, _fh, true); }
  /// face - edge circulator ccw
  FaceEdgeCCWIter fe_ccwend(FaceHandle _fh)
  { return FaceEdgeCCWIter(*this, _fh, true); }
1042 1043 1044
  /// face - face circulator
  FaceFaceIter ff_end(FaceHandle _fh)
  { return FaceFaceIter(*this, _fh, true); }
1045 1046 1047 1048 1049 1050
  /// face - face circulator cw
  FaceFaceCWIter ff_cwend(FaceHandle _fh)
  { return FaceFaceCWIter(*this, _fh, true); }
  /// face - face circulator ccw
  FaceFaceCCWIter ff_ccwend(FaceHandle _fh)
  { return FaceFaceCCWIter(*this, _fh, true); }
1051 1052 1053
  /// face - face circulator
  HalfedgeLoopIter hl_end(HalfedgeHandle _heh)
  { return HalfedgeLoopIter(*this, _heh, true); }
1054 1055 1056 1057 1058 1059
  /// face - face circulator cw
  HalfedgeLoopCWIter hl_cwend(HalfedgeHandle _heh)
  { return HalfedgeLoopCWIter(*this, _heh, true); }
  /// face - face circulator ccw
  HalfedgeLoopCCWIter hl_ccwend(HalfedgeHandle _heh)
  { return HalfedgeLoopCCWIter(*this, _heh, true); }
1060 1061 1062 1063

  /// const face - vertex circulator
  ConstFaceVertexIter cfv_end(FaceHandle _fh) const
  { return ConstFaceVertexIter(*this, _fh, true); }
1064 1065 1066 1067 1068 1069
  /// const face - vertex circulator cw
  ConstFaceVertexCWIter cfv_cwend(FaceHandle _fh) const
  { return ConstFaceVertexCWIter(*this, _fh, true); }
  /// const face - vertex circulator ccw
  ConstFaceVertexCCWIter cfv_ccwend(FaceHandle _fh) const
  { return ConstFaceVertexCCWIter(*this, _fh, true); }
1070 1071 1072
  /// const face - halfedge circulator
  ConstFaceHalfedgeIter cfh_end(FaceHandle _fh) const
  { return ConstFaceHalfedgeIter(*this, _fh, true); }
1073 1074 1075 1076 1077 1078
  /// const face - halfedge circulator cw
  ConstFaceHalfedgeCWIter cfh_cwend(FaceHandle _fh) const
  { return ConstFaceHalfedgeCWIter(*this, _fh, true); }
  /// const face - halfedge circulator ccw
  ConstFaceHalfedgeCCWIter cfh_ccwend(FaceHandle _fh) const
  { return ConstFaceHalfedgeCCWIter(*this, _fh, true); }
1079 1080 1081
  /// const face - edge circulator
  ConstFaceEdgeIter cfe_end(FaceHandle _fh) const
  { return ConstFaceEdgeIter(*this, _fh, true); }
1082 1083 1084 1085 1086 1087
  /// const face - edge circulator cw
  ConstFaceEdgeCWIter cfe_cwend(FaceHandle _fh) const
  { return ConstFaceEdgeCWIter(*this, _fh, true); }
  /// const face - edge circulator ccw
  ConstFaceEdgeCCWIter cfe_ccwend(FaceHandle _fh) const
  { return ConstFaceEdgeCCWIter(*this, _fh, true); }
1088 1089 1090
  /// const face - face circulator
  ConstFaceFaceIter cff_end(FaceHandle _fh) const
  { return ConstFaceFaceIter(*this, _fh, true); }
1091
  /// const face - face circulator
1092 1093 1094 1095 1096 1097
  ConstFaceFaceCWIter cff_cwend(FaceHandle _fh) const
  { return ConstFaceFaceCWIter(*this, _fh, true); }
  /// const face - face circulator
  ConstFaceFaceCCWIter cff_ccwend(FaceHandle _fh) const
  { return ConstFaceFaceCCWIter(*this, _fh, true); }
  /// const face - face circulator
1098 1099
  ConstHalfedgeLoopIter chl_end(HalfedgeHandle _heh) const
  { return ConstHalfedgeLoopIter(*this, _heh, true); }
1100 1101 1102 1103 1104 1105
  /// const face - face circulator cw
  ConstHalfedgeLoopCWIter chl_cwend(HalfedgeHandle _heh) const
  { return ConstHalfedgeLoopCWIter(*this, _heh, true); }
  /// const face - face circulator ccw
  ConstHalfedgeLoopCCWIter chl_ccwend(HalfedgeHandle _heh) const
  { return ConstHalfedgeLoopCCWIter(*this, _heh, true); }
Jan Möbius's avatar
Jan Möbius committed
1106 1107
  //@}

1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119
  /** @name Range based iterators and circulators */
  //@{

  /// Generic class for vertex/halfedge/edge/face ranges.
  template<
      typename CONTAINER_TYPE,
      typename ITER_TYPE,
      ITER_TYPE (CONTAINER_TYPE::*begin_fn)() const,
      ITER_TYPE (CONTAINER_TYPE::*end_fn)() const>
  class EntityRange {
      public:
          EntityRange(CONTAINER_TYPE &container) : container_(container) {}
1120 1121
          ITER_TYPE begin() const { return (container_.*begin_fn)(); }
          ITER_TYPE end() const { return (container_.*end_fn)(); }
1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277