OpenMesh
PolyConnectivity.hh
1 /* ========================================================================= *
2  * *
3  * OpenMesh *
4  * Copyright (c) 2001-2015, RWTH-Aachen University *
5  * Department of Computer Graphics and Multimedia *
6  * All rights reserved. *
7  * www.openmesh.org *
8  * *
9  *---------------------------------------------------------------------------*
10  * This file is part of OpenMesh. *
11  *---------------------------------------------------------------------------*
12  * *
13  * Redistribution and use in source and binary forms, with or without *
14  * modification, are permitted provided that the following conditions *
15  * are met: *
16  * *
17  * 1. Redistributions of source code must retain the above copyright notice, *
18  * this list of conditions and the following disclaimer. *
19  * *
20  * 2. Redistributions in binary form must reproduce the above copyright *
21  * notice, this list of conditions and the following disclaimer in the *
22  * documentation and/or other materials provided with the distribution. *
23  * *
24  * 3. Neither the name of the copyright holder nor the names of its *
25  * contributors may be used to endorse or promote products derived from *
26  * this software without specific prior written permission. *
27  * *
28  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS *
29  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED *
30  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A *
31  * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER *
32  * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, *
33  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, *
34  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR *
35  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
36  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING *
37  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
38  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
39  * *
40  * ========================================================================= */
41 
42 
43 
44 #ifndef OPENMESH_POLYCONNECTIVITY_HH
45 #define OPENMESH_POLYCONNECTIVITY_HH
46 
47 #include <OpenMesh/Core/Mesh/ArrayKernel.hh>
48 #include <OpenMesh/Core/Mesh/SmartRange.hh>
49 
50 namespace OpenMesh
51 {
52 
53 namespace Iterators
54 {
55  template <class Mesh, class ValueHandle, class MemberOwner, bool (MemberOwner::*PrimitiveStatusMember)() const, size_t (MemberOwner::*PrimitiveCountMember)() const>
56  class GenericIteratorT;
57 
58  template<class Mesh>
59  class GenericCirculatorBaseT;
60 
61  template<typename Traits>
62  class GenericCirculatorT_DEPRECATED;
63 
64  template<typename Traits, bool CW>
65  class GenericCirculatorT;
66 }
67 
68 template <typename RangeTraitT>
70 
71 template<
72  typename CONTAINER_T,
73  typename ITER_T,
74  ITER_T (CONTAINER_T::*begin_fn)() const,
75  ITER_T (CONTAINER_T::*end_fn)() const>
77 {
78  using CONTAINER_TYPE = CONTAINER_T;
79  using ITER_TYPE = ITER_T;
80  static ITER_TYPE begin(const CONTAINER_TYPE& _container) { return (_container.*begin_fn)(); }
81  static ITER_TYPE end(const CONTAINER_TYPE& _container) { return (_container.*end_fn)(); }
82 };
83 
84 
85 template <typename CirculatorRangeTraitT>
87 
88 template<
89  typename CONTAINER_T,
90  typename ITER_T,
91  typename CENTER_ENTITY_T,
92  typename TO_ENTITY_T,
93  ITER_T (CONTAINER_T::*begin_fn)(CENTER_ENTITY_T) const,
94  ITER_T (CONTAINER_T::*end_fn)(CENTER_ENTITY_T) const>
96 {
97  using CONTAINER_TYPE = CONTAINER_T;
98  using ITER_TYPE = ITER_T;
99  using CENTER_ENTITY_TYPE = CENTER_ENTITY_T;
100  using TO_ENTITYE_TYPE = TO_ENTITY_T;
101  static ITER_TYPE begin(const CONTAINER_TYPE& _container, CENTER_ENTITY_TYPE _ce) { return (_container.*begin_fn)(_ce); }
102  static ITER_TYPE end(const CONTAINER_TYPE& _container, CENTER_ENTITY_TYPE _ce) { return (_container.*end_fn)(_ce); }
103 };
104 
105 struct SmartVertexHandle;
106 struct SmartHalfedgeHandle;
107 struct SmartEdgeHandle;
108 struct SmartFaceHandle;
109 
112 class OPENMESHDLLEXPORT PolyConnectivity : public ArrayKernel
113 {
114 public:
116 
117  static const VertexHandle InvalidVertexHandle;
126 
127  typedef PolyConnectivity This;
128 
129  //--- iterators ---
130 
141 
142  typedef VertexIter ConstVertexIter;
143  typedef HalfedgeIter ConstHalfedgeIter;
144  typedef EdgeIter ConstEdgeIter;
145  typedef FaceIter ConstFaceIter;
147 
148  //--- circulators ---
149 
155 
156  /*
157  * Vertex-centered circulators
158  */
159 
161  {
162  using Mesh = This;
165  static ValueHandle toHandle(const Mesh* const _mesh, This::HalfedgeHandle _heh) { return _mesh->to_vertex_handle(_heh);}
166  };
167 
168 
174 
179 
180 
182  {
183  using Mesh = This;
186  static ValueHandle toHandle(const Mesh* const /*_mesh*/, This::HalfedgeHandle _heh) { return _heh;}
187  };
188 
194 
199 
201  {
202  using Mesh = This;
205  static ValueHandle toHandle(const Mesh* const _mesh, This::HalfedgeHandle _heh) { return _mesh->opposite_halfedge_handle(_heh); }
206  };
207 
213 
218 
219 
221  {
222  using Mesh = This;
225  static ValueHandle toHandle(const Mesh* const _mesh, This::HalfedgeHandle _heh) { return static_cast<const ArrayKernel*>(_mesh)->face_handle(_heh); }
226  };
227 
233 
238 
239 
241  {
242  using Mesh = This;
245  static ValueHandle toHandle(const Mesh* const _mesh, This::HalfedgeHandle _heh) { return static_cast<const ArrayKernel*>(_mesh)->edge_handle(_heh); }
246  };
247 
257 
258 
260  {
261  using Mesh = This;
264  static ValueHandle toHandle(const Mesh* const /*_mesh*/, This::HalfedgeHandle _heh) { return _heh; }
265  };
266 
276 
277  typedef VertexVertexIter ConstVertexVertexIter;
278  typedef VertexVertexCWIter ConstVertexVertexCWIter;
279  typedef VertexVertexCCWIter ConstVertexVertexCCWIter;
280  typedef VertexOHalfedgeIter ConstVertexOHalfedgeIter;
281  typedef VertexOHalfedgeCWIter ConstVertexOHalfedgeCWIter;
282  typedef VertexOHalfedgeCCWIter ConstVertexOHalfedgeCCWIter;
283  typedef VertexIHalfedgeIter ConstVertexIHalfedgeIter;
284  typedef VertexIHalfedgeCWIter ConstVertexIHalfedgeCWIter;
285  typedef VertexIHalfedgeCCWIter ConstVertexIHalfedgeCCWIter;
286  typedef VertexFaceIter ConstVertexFaceIter;
287  typedef VertexFaceCWIter ConstVertexFaceCWIter;
288  typedef VertexFaceCCWIter ConstVertexFaceCCWIter;
289  typedef VertexEdgeIter ConstVertexEdgeIter;
290  typedef VertexEdgeCWIter ConstVertexEdgeCWIter;
291  typedef VertexEdgeCCWIter ConstVertexEdgeCCWIter;
292 
293  /*
294  * Face-centered circulators
295  */
296 
298  {
299  using Mesh = This;
302  static ValueHandle toHandle(const Mesh* const _mesh, This::HalfedgeHandle _heh) { return static_cast<const ArrayKernel*>(_mesh)->to_vertex_handle(_heh); }
303  };
304 
310 
315 
321 
326 
327 
329  {
330  using Mesh = This;
333  static ValueHandle toHandle(const Mesh* const _mesh, This::HalfedgeHandle _heh) { return static_cast<const ArrayKernel*>(_mesh)->edge_handle(_heh); }
334  };
335 
341 
346 
347 
349  {
350  using Mesh = This;
353  static ValueHandle toHandle(const Mesh* const _mesh, This::HalfedgeHandle _heh) { return static_cast<const ArrayKernel*>(_mesh)->face_handle(_mesh->opposite_halfedge_handle(_heh)); }
354  };
355 
361 
366 
367  typedef FaceVertexIter ConstFaceVertexIter;
368  typedef FaceVertexCWIter ConstFaceVertexCWIter;
369  typedef FaceVertexCCWIter ConstFaceVertexCCWIter;
370  typedef FaceHalfedgeIter ConstFaceHalfedgeIter;
371  typedef FaceHalfedgeCWIter ConstFaceHalfedgeCWIter;
372  typedef FaceHalfedgeCCWIter ConstFaceHalfedgeCCWIter;
373  typedef FaceEdgeIter ConstFaceEdgeIter;
374  typedef FaceEdgeCWIter ConstFaceEdgeCWIter;
375  typedef FaceEdgeCCWIter ConstFaceEdgeCCWIter;
376  typedef FaceFaceIter ConstFaceFaceIter;
377  typedef FaceFaceCWIter ConstFaceFaceCWIter;
378  typedef FaceFaceCCWIter ConstFaceFaceCCWIter;
379 
380  /*
381  * Halfedge circulator
382  */
383  typedef HalfedgeLoopIter ConstHalfedgeLoopIter;
384  typedef HalfedgeLoopCWIter ConstHalfedgeLoopCWIter;
385  typedef HalfedgeLoopCCWIter ConstHalfedgeLoopCCWIter;
386 
388 
389  // --- shortcuts
390 
395  typedef VertexHandle VHandle;
400 
401  typedef VertexIter VIter;
402  typedef HalfedgeIter HIter;
403  typedef EdgeIter EIter;
404  typedef FaceIter FIter;
405 
406  typedef ConstVertexIter CVIter;
407  typedef ConstHalfedgeIter CHIter;
408  typedef ConstEdgeIter CEIter;
409  typedef ConstFaceIter CFIter;
410 
411  typedef VertexVertexIter VVIter;
412  typedef VertexVertexCWIter VVCWIter;
413  typedef VertexVertexCCWIter VVCCWIter;
414  typedef VertexOHalfedgeIter VOHIter;
415  typedef VertexOHalfedgeCWIter VOHCWIter;
416  typedef VertexOHalfedgeCCWIter VOHCCWIter;
417  typedef VertexIHalfedgeIter VIHIter;
418  typedef VertexIHalfedgeCWIter VIHICWter;
419  typedef VertexIHalfedgeCCWIter VIHICCWter;
420  typedef VertexEdgeIter VEIter;
421  typedef VertexEdgeCWIter VECWIter;
422  typedef VertexEdgeCCWIter VECCWIter;
423  typedef VertexFaceIter VFIter;
424  typedef VertexFaceCWIter VFCWIter;
425  typedef VertexFaceCCWIter VFCCWIter;
426  typedef FaceVertexIter FVIter;
427  typedef FaceVertexCWIter FVCWIter;
428  typedef FaceVertexCCWIter FVCCWIter;
429  typedef FaceHalfedgeIter FHIter;
430  typedef FaceHalfedgeCWIter FHCWIter;
431  typedef FaceHalfedgeCCWIter FHCWWIter;
432  typedef FaceEdgeIter FEIter;
433  typedef FaceEdgeCWIter FECWIter;
434  typedef FaceEdgeCCWIter FECWWIter;
435  typedef FaceFaceIter FFIter;
436 
437  typedef ConstVertexVertexIter CVVIter;
438  typedef ConstVertexVertexCWIter CVVCWIter;
439  typedef ConstVertexVertexCCWIter CVVCCWIter;
440  typedef ConstVertexOHalfedgeIter CVOHIter;
441  typedef ConstVertexOHalfedgeCWIter CVOHCWIter;
442  typedef ConstVertexOHalfedgeCCWIter CVOHCCWIter;
443  typedef ConstVertexIHalfedgeIter CVIHIter;
444  typedef ConstVertexIHalfedgeCWIter CVIHCWIter;
445  typedef ConstVertexIHalfedgeCCWIter CVIHCCWIter;
446  typedef ConstVertexEdgeIter CVEIter;
447  typedef ConstVertexEdgeCWIter CVECWIter;
448  typedef ConstVertexEdgeCCWIter CVECCWIter;
449  typedef ConstVertexFaceIter CVFIter;
450  typedef ConstVertexFaceCWIter CVFCWIter;
451  typedef ConstVertexFaceCCWIter CVFCCWIter;
452  typedef ConstFaceVertexIter CFVIter;
453  typedef ConstFaceVertexCWIter CFVCWIter;
454  typedef ConstFaceVertexCCWIter CFVCCWIter;
455  typedef ConstFaceHalfedgeIter CFHIter;
456  typedef ConstFaceHalfedgeCWIter CFHCWIter;
457  typedef ConstFaceHalfedgeCCWIter CFHCCWIter;
458  typedef ConstFaceEdgeIter CFEIter;
459  typedef ConstFaceEdgeCWIter CFECWIter;
460  typedef ConstFaceEdgeCCWIter CFECCWIter;
461  typedef ConstFaceFaceIter CFFIter;
462  typedef ConstFaceFaceCWIter CFFCWIter;
463  typedef ConstFaceFaceCCWIter CFFCCWIter;
465 
466 public:
467 
468  PolyConnectivity() {}
469  virtual ~PolyConnectivity() {}
470 
471  inline static bool is_triangles()
472  { return false; }
473 
476  inline void assign_connectivity(const PolyConnectivity& _other)
478 
482 
484  inline SmartVertexHandle add_vertex();
485 
493  SmartFaceHandle add_face(const std::vector<VertexHandle>& _vhandles);
494 
502  SmartFaceHandle add_face(const std::vector<SmartVertexHandle>& _vhandles);
503 
504 
514  SmartFaceHandle add_face(VertexHandle _vh0, VertexHandle _vh1, VertexHandle _vh2);
515 
526  SmartFaceHandle add_face(VertexHandle _vh0, VertexHandle _vh1, VertexHandle _vh2, VertexHandle _vh3);
527 
536  SmartFaceHandle add_face(const VertexHandle* _vhandles, size_t _vhs_size);
537 
539 
541 
542 
547  bool is_collapse_ok(HalfedgeHandle _he);
548 
549 
555  void delete_vertex(VertexHandle _vh, bool _delete_isolated_vertices = true);
556 
565  void delete_edge(EdgeHandle _eh, bool _delete_isolated_vertices=true);
566 
577  void delete_face(FaceHandle _fh, bool _delete_isolated_vertices=true);
578 
579 
581 
585 
586  using ArrayKernel::next_halfedge_handle;
587  using ArrayKernel::prev_halfedge_handle;
588  using ArrayKernel::opposite_halfedge_handle;
589  using ArrayKernel::ccw_rotated_halfedge_handle;
590  using ArrayKernel::cw_rotated_halfedge_handle;
591 
592  inline SmartHalfedgeHandle next_halfedge_handle (SmartHalfedgeHandle _heh) const;
593  inline SmartHalfedgeHandle prev_halfedge_handle (SmartHalfedgeHandle _heh) const;
594  inline SmartHalfedgeHandle opposite_halfedge_handle (SmartHalfedgeHandle _heh) const;
595  inline SmartHalfedgeHandle ccw_rotated_halfedge_handle(SmartHalfedgeHandle _heh) const;
596  inline SmartHalfedgeHandle cw_rotated_halfedge_handle (SmartHalfedgeHandle _heh) const;
597 
598  using ArrayKernel::s_halfedge_handle;
599  using ArrayKernel::s_edge_handle;
600 
601  static SmartHalfedgeHandle s_halfedge_handle(SmartEdgeHandle _eh, unsigned int _i);
602  static SmartEdgeHandle s_edge_handle(SmartHalfedgeHandle _heh);
603 
604  using ArrayKernel::halfedge_handle;
605  using ArrayKernel::edge_handle;
606  using ArrayKernel::face_handle;
607 
608  inline SmartHalfedgeHandle halfedge_handle(SmartEdgeHandle _eh, unsigned int _i) const;
609  inline SmartHalfedgeHandle halfedge_handle(SmartFaceHandle _fh) const;
610  inline SmartHalfedgeHandle halfedge_handle(SmartVertexHandle _vh) const;
611  inline SmartEdgeHandle edge_handle(SmartHalfedgeHandle _heh) const;
612  inline SmartFaceHandle face_handle(SmartHalfedgeHandle _heh) const;
613 
615  inline SmartFaceHandle opposite_face_handle(HalfedgeHandle _heh) const;
616 
618 
622 
624  VertexIter vertices_begin();
626  ConstVertexIter vertices_begin() const;
628  VertexIter vertices_end();
630  ConstVertexIter vertices_end() const;
631 
633  HalfedgeIter halfedges_begin();
635  ConstHalfedgeIter halfedges_begin() const;
637  HalfedgeIter halfedges_end();
639  ConstHalfedgeIter halfedges_end() const;
640 
642  EdgeIter edges_begin();
644  ConstEdgeIter edges_begin() const;
646  EdgeIter edges_end();
648  ConstEdgeIter edges_end() const;
649 
651  FaceIter faces_begin();
653  ConstFaceIter faces_begin() const;
655  FaceIter faces_end();
657  ConstFaceIter faces_end() const;
659 
660 
664 
666  VertexIter vertices_sbegin();
668  ConstVertexIter vertices_sbegin() const;
669 
671  HalfedgeIter halfedges_sbegin();
673  ConstHalfedgeIter halfedges_sbegin() const;
674 
676  EdgeIter edges_sbegin();
678  ConstEdgeIter edges_sbegin() const;
679 
681  FaceIter faces_sbegin();
683  ConstFaceIter faces_sbegin() const;
684 
686 
687  //--- circulators ---
688 
692 
694  VertexVertexIter vv_iter(VertexHandle _vh);
696  VertexVertexCWIter vv_cwiter(VertexHandle _vh);
698  VertexVertexCCWIter vv_ccwiter(VertexHandle _vh);
700  VertexIHalfedgeIter vih_iter(VertexHandle _vh);
702  VertexIHalfedgeCWIter vih_cwiter(VertexHandle _vh);
704  VertexIHalfedgeCCWIter vih_ccwiter(VertexHandle _vh);
706  VertexOHalfedgeIter voh_iter(VertexHandle _vh);
708  VertexOHalfedgeCWIter voh_cwiter(VertexHandle _vh);
710  VertexOHalfedgeCCWIter voh_ccwiter(VertexHandle _vh);
712  VertexEdgeIter ve_iter(VertexHandle _vh);
714  VertexEdgeCWIter ve_cwiter(VertexHandle _vh);
716  VertexEdgeCCWIter ve_ccwiter(VertexHandle _vh);
718  VertexFaceIter vf_iter(VertexHandle _vh);
720  VertexFaceCWIter vf_cwiter(VertexHandle _vh);
722  VertexFaceCCWIter vf_ccwiter(VertexHandle _vh);
723 
725  ConstVertexVertexIter cvv_iter(VertexHandle _vh) const;
727  ConstVertexVertexCWIter cvv_cwiter(VertexHandle _vh) const;
729  ConstVertexVertexCCWIter cvv_ccwiter(VertexHandle _vh) const;
731  ConstVertexIHalfedgeIter cvih_iter(VertexHandle _vh) const;
733  ConstVertexIHalfedgeCWIter cvih_cwiter(VertexHandle _vh) const;
735  ConstVertexIHalfedgeCCWIter cvih_ccwiter(VertexHandle _vh) const;
737  ConstVertexOHalfedgeIter cvoh_iter(VertexHandle _vh) const;
739  ConstVertexOHalfedgeCWIter cvoh_cwiter(VertexHandle _vh) const;
741  ConstVertexOHalfedgeCCWIter cvoh_ccwiter(VertexHandle _vh) const;
743  ConstVertexEdgeIter cve_iter(VertexHandle _vh) const;
745  ConstVertexEdgeCWIter cve_cwiter(VertexHandle _vh) const;
747  ConstVertexEdgeCCWIter cve_ccwiter(VertexHandle _vh) const;
749  ConstVertexFaceIter cvf_iter(VertexHandle _vh) const;
751  ConstVertexFaceCWIter cvf_cwiter(VertexHandle _vh) const;
753  ConstVertexFaceCCWIter cvf_ccwiter(VertexHandle _vh) const;
754 
756  FaceVertexIter fv_iter(FaceHandle _fh);
758  FaceVertexCWIter fv_cwiter(FaceHandle _fh);
760  FaceVertexCCWIter fv_ccwiter(FaceHandle _fh);
762  FaceHalfedgeIter fh_iter(FaceHandle _fh);
764  FaceHalfedgeCWIter fh_cwiter(FaceHandle _fh);
766  FaceHalfedgeCCWIter fh_ccwiter(FaceHandle _fh);
768  FaceEdgeIter fe_iter(FaceHandle _fh);
770  FaceEdgeCWIter fe_cwiter(FaceHandle _fh);
772  FaceEdgeCCWIter fe_ccwiter(FaceHandle _fh);
774  FaceFaceIter ff_iter(FaceHandle _fh);
776  FaceFaceCWIter ff_cwiter(FaceHandle _fh);
778  FaceFaceCCWIter ff_ccwiter(FaceHandle _fh);
779 
781  ConstFaceVertexIter cfv_iter(FaceHandle _fh) const;
783  ConstFaceVertexCWIter cfv_cwiter(FaceHandle _fh) const;
785  ConstFaceVertexCCWIter cfv_ccwiter(FaceHandle _fh) const;
787  ConstFaceHalfedgeIter cfh_iter(FaceHandle _fh) const;
789  ConstFaceHalfedgeCWIter cfh_cwiter(FaceHandle _fh) const;
791  ConstFaceHalfedgeCCWIter cfh_ccwiter(FaceHandle _fh) const;
793  ConstFaceEdgeIter cfe_iter(FaceHandle _fh) const;
795  ConstFaceEdgeCWIter cfe_cwiter(FaceHandle _fh) const;
797  ConstFaceEdgeCCWIter cfe_ccwiter(FaceHandle _fh) const;
799  ConstFaceFaceIter cff_iter(FaceHandle _fh) const;
801  ConstFaceFaceCWIter cff_cwiter(FaceHandle _fh) const;
803  ConstFaceFaceCCWIter cff_ccwiter(FaceHandle _fh) const;
804 
805  // 'begin' circulators
806 
808  VertexVertexIter vv_begin(VertexHandle _vh);
810  VertexVertexCWIter vv_cwbegin(VertexHandle _vh);
812  VertexVertexCCWIter vv_ccwbegin(VertexHandle _vh);
814  VertexIHalfedgeIter vih_begin(VertexHandle _vh);
816  VertexIHalfedgeCWIter vih_cwbegin(VertexHandle _vh);
818  VertexIHalfedgeCCWIter vih_ccwbegin(VertexHandle _vh);
820  VertexOHalfedgeIter voh_begin(VertexHandle _vh);
822  VertexOHalfedgeCWIter voh_cwbegin(VertexHandle _vh);
824  VertexOHalfedgeCCWIter voh_ccwbegin(VertexHandle _vh);
826  VertexEdgeIter ve_begin(VertexHandle _vh);
828  VertexEdgeCWIter ve_cwbegin(VertexHandle _vh);
830  VertexEdgeCCWIter ve_ccwbegin(VertexHandle _vh);
832  VertexFaceIter vf_begin(VertexHandle _vh);
834  VertexFaceCWIter vf_cwbegin(VertexHandle _vh);
836  VertexFaceCCWIter vf_ccwbegin(VertexHandle _vh);
837 
838 
840  ConstVertexVertexIter cvv_begin(VertexHandle _vh) const;
842  ConstVertexVertexCWIter cvv_cwbegin(VertexHandle _vh) const;
844  ConstVertexVertexCCWIter cvv_ccwbegin(VertexHandle _vh) const;
846  ConstVertexIHalfedgeIter cvih_begin(VertexHandle _vh) const;
848  ConstVertexIHalfedgeCWIter cvih_cwbegin(VertexHandle _vh) const;
850  ConstVertexIHalfedgeCCWIter cvih_ccwbegin(VertexHandle _vh) const;
852  ConstVertexOHalfedgeIter cvoh_begin(VertexHandle _vh) const;
854  ConstVertexOHalfedgeCWIter cvoh_cwbegin(VertexHandle _vh) const;
856  ConstVertexOHalfedgeCCWIter cvoh_ccwbegin(VertexHandle _vh) const;
858  ConstVertexEdgeIter cve_begin(VertexHandle _vh) const;
860  ConstVertexEdgeCWIter cve_cwbegin(VertexHandle _vh) const;
862  ConstVertexEdgeCCWIter cve_ccwbegin(VertexHandle _vh) const;
864  ConstVertexFaceIter cvf_begin(VertexHandle _vh) const;
866  ConstVertexFaceCWIter cvf_cwbegin(VertexHandle _vh) const;
868  ConstVertexFaceCCWIter cvf_ccwbegin(VertexHandle _vh) const;
869 
871  FaceVertexIter fv_begin(FaceHandle _fh);
873  FaceVertexCWIter fv_cwbegin(FaceHandle _fh);
875  FaceVertexCCWIter fv_ccwbegin(FaceHandle _fh);
877  FaceHalfedgeIter fh_begin(FaceHandle _fh);
879  FaceHalfedgeCWIter fh_cwbegin(FaceHandle _fh);
881  FaceHalfedgeCCWIter fh_ccwbegin(FaceHandle _fh);
883  FaceEdgeIter fe_begin(FaceHandle _fh);
885  FaceEdgeCWIter fe_cwbegin(FaceHandle _fh);
887  FaceEdgeCCWIter fe_ccwbegin(FaceHandle _fh);
889  FaceFaceIter ff_begin(FaceHandle _fh);
891  FaceFaceCWIter ff_cwbegin(FaceHandle _fh);
893  FaceFaceCCWIter ff_ccwbegin(FaceHandle _fh);
895  HalfedgeLoopIter hl_begin(HalfedgeHandle _heh);
897  HalfedgeLoopCWIter hl_cwbegin(HalfedgeHandle _heh);
899  HalfedgeLoopCCWIter hl_ccwbegin(HalfedgeHandle _heh);
900 
902  ConstFaceVertexIter cfv_begin(FaceHandle _fh) const;
904  ConstFaceVertexCWIter cfv_cwbegin(FaceHandle _fh) const;
906  ConstFaceVertexCCWIter cfv_ccwbegin(FaceHandle _fh) const;
908  ConstFaceHalfedgeIter cfh_begin(FaceHandle _fh) const;
910  ConstFaceHalfedgeCWIter cfh_cwbegin(FaceHandle _fh) const;
912  ConstFaceHalfedgeCCWIter cfh_ccwbegin(FaceHandle _fh) const;
914  ConstFaceEdgeIter cfe_begin(FaceHandle _fh) const;
916  ConstFaceEdgeCWIter cfe_cwbegin(FaceHandle _fh) const;
918  ConstFaceEdgeCCWIter cfe_ccwbegin(FaceHandle _fh) const;
920  ConstFaceFaceIter cff_begin(FaceHandle _fh) const;
922  ConstFaceFaceCWIter cff_cwbegin(FaceHandle _fh) const;
924  ConstFaceFaceCCWIter cff_ccwbegin(FaceHandle _fh) const;
926  ConstHalfedgeLoopIter chl_begin(HalfedgeHandle _heh) const;
928  ConstHalfedgeLoopCWIter chl_cwbegin(HalfedgeHandle _heh) const;
930  ConstHalfedgeLoopCCWIter chl_ccwbegin(HalfedgeHandle _heh) const;
931 
932  // 'end' circulators
933 
935  VertexVertexIter vv_end(VertexHandle _vh);
937  VertexVertexCWIter vv_cwend(VertexHandle _vh);
939  VertexVertexCCWIter vv_ccwend(VertexHandle _vh);
941  VertexIHalfedgeIter vih_end(VertexHandle _vh);
943  VertexIHalfedgeCWIter vih_cwend(VertexHandle _vh);
945  VertexIHalfedgeCCWIter vih_ccwend(VertexHandle _vh);
947  VertexOHalfedgeIter voh_end(VertexHandle _vh);
949  VertexOHalfedgeCWIter voh_cwend(VertexHandle _vh);
951  VertexOHalfedgeCCWIter voh_ccwend(VertexHandle _vh);
953  VertexEdgeIter ve_end(VertexHandle _vh);
955  VertexEdgeCWIter ve_cwend(VertexHandle _vh);
957  VertexEdgeCCWIter ve_ccwend(VertexHandle _vh);
959  VertexFaceIter vf_end(VertexHandle _vh);
961  VertexFaceCWIter vf_cwend(VertexHandle _vh);
963  VertexFaceCCWIter vf_ccwend(VertexHandle _vh);
964 
966  ConstVertexVertexIter cvv_end(VertexHandle _vh) const;
968  ConstVertexVertexCWIter cvv_cwend(VertexHandle _vh) const;
970  ConstVertexVertexCCWIter cvv_ccwend(VertexHandle _vh) const;
972  ConstVertexIHalfedgeIter cvih_end(VertexHandle _vh) const;
974  ConstVertexIHalfedgeCWIter cvih_cwend(VertexHandle _vh) const;
976  ConstVertexIHalfedgeCCWIter cvih_ccwend(VertexHandle _vh) const;
978  ConstVertexOHalfedgeIter cvoh_end(VertexHandle _vh) const;
980  ConstVertexOHalfedgeCWIter cvoh_cwend(VertexHandle _vh) const;
982  ConstVertexOHalfedgeCCWIter cvoh_ccwend(VertexHandle _vh) const;
984  ConstVertexEdgeIter cve_end(VertexHandle _vh) const;
986  ConstVertexEdgeCWIter cve_cwend(VertexHandle _vh) const;
988  ConstVertexEdgeCCWIter cve_ccwend(VertexHandle _vh) const;
990  ConstVertexFaceIter cvf_end(VertexHandle _vh) const;
992  ConstVertexFaceCWIter cvf_cwend(VertexHandle _vh) const;
994  ConstVertexFaceCCWIter cvf_ccwend(VertexHandle _vh) const;
995 
997  FaceVertexIter fv_end(FaceHandle _fh);
999  FaceVertexCWIter fv_cwend(FaceHandle _fh);
1001  FaceVertexCCWIter fv_ccwend(FaceHandle _fh);
1003  FaceHalfedgeIter fh_end(FaceHandle _fh);
1005  FaceHalfedgeCWIter fh_cwend(FaceHandle _fh);
1007  FaceHalfedgeCCWIter fh_ccwend(FaceHandle _fh);
1009  FaceEdgeIter fe_end(FaceHandle _fh);
1011  FaceEdgeCWIter fe_cwend(FaceHandle _fh);
1013  FaceEdgeCCWIter fe_ccwend(FaceHandle _fh);
1015  FaceFaceIter ff_end(FaceHandle _fh);
1017  FaceFaceCWIter ff_cwend(FaceHandle _fh);
1019  FaceFaceCCWIter ff_ccwend(FaceHandle _fh);
1021  HalfedgeLoopIter hl_end(HalfedgeHandle _heh);
1023  HalfedgeLoopCWIter hl_cwend(HalfedgeHandle _heh);
1025  HalfedgeLoopCCWIter hl_ccwend(HalfedgeHandle _heh);
1026 
1028  ConstFaceVertexIter cfv_end(FaceHandle _fh) const;
1030  ConstFaceVertexCWIter cfv_cwend(FaceHandle _fh) const;
1032  ConstFaceVertexCCWIter cfv_ccwend(FaceHandle _fh) const;
1034  ConstFaceHalfedgeIter cfh_end(FaceHandle _fh) const;
1036  ConstFaceHalfedgeCWIter cfh_cwend(FaceHandle _fh) const;
1038  ConstFaceHalfedgeCCWIter cfh_ccwend(FaceHandle _fh) const;
1040  ConstFaceEdgeIter cfe_end(FaceHandle _fh) const;
1042  ConstFaceEdgeCWIter cfe_cwend(FaceHandle _fh) const;
1044  ConstFaceEdgeCCWIter cfe_ccwend(FaceHandle _fh) const;
1046  ConstFaceFaceIter cff_end(FaceHandle _fh) const;
1048  ConstFaceFaceCWIter cff_cwend(FaceHandle _fh) const;
1050  ConstFaceFaceCCWIter cff_ccwend(FaceHandle _fh) const;
1052  ConstHalfedgeLoopIter chl_end(HalfedgeHandle _heh) const;
1054  ConstHalfedgeLoopCWIter chl_cwend(HalfedgeHandle _heh) const;
1056  ConstHalfedgeLoopCCWIter chl_ccwend(HalfedgeHandle _heh) const;
1058 
1061 
1062  typedef EntityRange<RangeTraitT<
1063  const PolyConnectivity,
1067  typedef EntityRange<RangeTraitT<
1068  const PolyConnectivity,
1072  typedef EntityRange<RangeTraitT<
1073  const PolyConnectivity,
1077  typedef EntityRange<RangeTraitT<
1078  const PolyConnectivity,
1082  typedef EntityRange<RangeTraitT<
1083  const PolyConnectivity,
1087  typedef EntityRange<RangeTraitT<
1088  const PolyConnectivity,
1092  typedef EntityRange<RangeTraitT<
1093  const PolyConnectivity,
1097  typedef EntityRange<RangeTraitT<
1098  const PolyConnectivity,
1102 
1103 
1104  template <typename HandleType>
1106 
1111  ConstVertexRangeSkipping vertices() const;
1112 
1117  ConstVertexRange all_vertices() const;
1118 
1123  ConstHalfedgeRangeSkipping halfedges() const;
1124 
1129  ConstHalfedgeRange all_halfedges() const;
1130 
1135  ConstEdgeRangeSkipping edges() const;
1136 
1141  ConstEdgeRange all_edges() const;
1142 
1147  ConstFaceRangeSkipping faces() const;
1148 
1153  ConstFaceRange all_faces() const;
1154 
1159  template <typename HandleType>
1160  typename ElementRange<HandleType>::RangeSkipping elements() const;
1161 
1166  template <typename HandleType>
1167  typename ElementRange<HandleType>::Range all_elements() const;
1168 
1169 
1171  PolyConnectivity,
1172  ConstVertexVertexCWIter,
1173  VertexHandle,
1174  VertexHandle,
1178  PolyConnectivity,
1179  ConstVertexIHalfedgeIter,
1180  VertexHandle,
1185  PolyConnectivity,
1186  ConstVertexOHalfedgeIter,
1187  VertexHandle,
1188  HalfedgeHandle,
1192  PolyConnectivity,
1193  ConstVertexEdgeIter,
1194  VertexHandle,
1195  EdgeHandle,
1199  PolyConnectivity,
1200  ConstVertexFaceIter,
1201  VertexHandle,
1202  FaceHandle,
1206  PolyConnectivity,
1207  ConstFaceVertexIter,
1208  FaceHandle,
1209  VertexHandle,
1213  PolyConnectivity,
1214  ConstFaceHalfedgeIter,
1215  FaceHandle,
1216  HalfedgeHandle,
1220  PolyConnectivity,
1221  ConstFaceEdgeIter,
1222  FaceHandle,
1223  EdgeHandle,
1227  PolyConnectivity,
1228  ConstFaceFaceIter,
1229  FaceHandle,
1230  FaceHandle,
1233 
1238  ConstVertexVertexRange vv_range(VertexHandle _vh) const;
1239 
1244  ConstVertexIHalfedgeRange vih_range(VertexHandle _vh) const;
1245 
1250  ConstVertexOHalfedgeRange voh_range(VertexHandle _vh) const;
1251 
1256  ConstVertexEdgeRange ve_range(VertexHandle _vh) const ;
1257 
1262  ConstVertexFaceRange vf_range(VertexHandle _vh) const;
1263 
1268  ConstFaceVertexRange fv_range(FaceHandle _fh) const;
1269 
1274  ConstFaceHalfedgeRange fh_range(FaceHandle _fh) const;
1275 
1280  ConstFaceEdgeRange fe_range(FaceHandle _fh) const;
1281 
1286  ConstFaceFaceRange ff_range(FaceHandle _fh) const;
1287 
1289 
1290  //===========================================================================
1293  //===========================================================================
1294 
1302  bool is_boundary(HalfedgeHandle _heh) const
1303  { return ArrayKernel::is_boundary(_heh); }
1304 
1313  bool is_boundary(EdgeHandle _eh) const
1314  {
1315  return (is_boundary(halfedge_handle(_eh, 0)) ||
1316  is_boundary(halfedge_handle(_eh, 1)));
1317  }
1318 
1330  bool is_boundary(VertexHandle _vh) const
1331  {
1332  HalfedgeHandle heh(halfedge_handle(_vh));
1333  return (!(heh.is_valid() && face_handle(heh).is_valid()));
1334  }
1335 
1345  bool is_boundary(FaceHandle _fh, bool _check_vertex=false) const;
1346 
1357  bool is_manifold(VertexHandle _vh) const;
1358 
1361  // --- misc ---
1362 
1366  void adjust_outgoing_halfedge(VertexHandle _vh);
1367 
1369  SmartHalfedgeHandle find_halfedge(VertexHandle _start_vh, VertexHandle _end_vh) const;
1371  uint valence(VertexHandle _vh) const;
1373  uint valence(FaceHandle _fh) const;
1374 
1375  // --- connectivity operattions
1376 
1391  void collapse(HalfedgeHandle _heh);
1396  bool is_simple_link(EdgeHandle _eh) const;
1401  bool is_simply_connected(FaceHandle _fh) const;
1414  FaceHandle remove_edge(EdgeHandle _eh);
1418  void reinsert_edge(EdgeHandle _eh);
1428  HalfedgeHandle insert_edge(HalfedgeHandle _prev_heh, HalfedgeHandle _next_heh);
1429 
1442  void split(FaceHandle _fh, VertexHandle _vh);
1443 
1457  void split_copy(FaceHandle _fh, VertexHandle _vh);
1458 
1472  void triangulate(FaceHandle _fh);
1473 
1476  void triangulate();
1477 
1488  void split_edge(EdgeHandle _eh, VertexHandle _vh);
1489 
1501  void split_edge_copy(EdgeHandle _eh, VertexHandle _vh);
1502 
1503 
1509  const Vertex& deref(VertexHandle _h) const { return vertex(_h); }
1511  Vertex& deref(VertexHandle _h) { return vertex(_h); }
1512  const Halfedge& deref(HalfedgeHandle _h) const { return halfedge(_h); }
1513  Halfedge& deref(HalfedgeHandle _h) { return halfedge(_h); }
1514  const Edge& deref(EdgeHandle _h) const { return edge(_h); }
1515  Edge& deref(EdgeHandle _h) { return edge(_h); }
1516  const Face& deref(FaceHandle _h) const { return face(_h); }
1517  Face& deref(FaceHandle _h) { return face(_h); }
1519 
1520 protected:
1522  void collapse_edge(HalfedgeHandle _hh);
1524  void collapse_loop(HalfedgeHandle _hh);
1525 
1526 
1527 
1528 private: // Working storage for add_face()
1529  struct AddFaceEdgeInfo
1530  {
1531  HalfedgeHandle halfedge_handle;
1532  bool is_new;
1533  bool needs_adjust;
1534  };
1535  std::vector<AddFaceEdgeInfo> edgeData_; //
1536  std::vector<std::pair<HalfedgeHandle, HalfedgeHandle> > next_cache_; // cache for set_next_halfedge and vertex' set_halfedge
1537 
1538 };
1539 
1540 template <>
1542 {
1543  using Range = ConstVertexRange;
1545 };
1546 
1547 template <>
1549 {
1550  using Range = ConstHalfedgeRange;
1552 };
1553 
1554 template <>
1556 {
1557  using Range = ConstEdgeRange;
1559 };
1560 
1561 template <>
1563 {
1564  using Range = ConstFaceRange;
1566 };
1567 
1568 }//namespace OpenMesh
1569 
1570 #include <OpenMesh/Core/Mesh/PolyConnectivity_inline_impl.hh>
1571 
1572 #endif//OPENMESH_POLYCONNECTIVITY_HH
ConstVertexIHalfedgeIter cvih_end(VertexHandle _vh) const
const vertex - incoming halfedge circulator
Definition: PolyConnectivity_inline_impl.hh:646
ConstVertexOHalfedgeCCWIter CVOHCCWIter
Alias typedef.
Definition: PolyConnectivity.hh:442
ConstVertexVertexCCWIter CVVCCWIter
Alias typedef.
Definition: PolyConnectivity.hh:439
VertexVertexCWIter VVCWIter
Alias typedef.
Definition: PolyConnectivity.hh:412
VertexFaceIter ConstVertexFaceIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:286
HalfedgeIter halfedges_begin()
Begin iterator for halfedges.
Definition: PolyConnectivity_inline_impl.hh:182
void assign_connectivity(const PolyConnectivity &_other)
assign_connectivity() method.
Definition: PolyConnectivity.hh:476
ConstVertexVertexCWIter cvv_cwbegin(VertexHandle _vh) const
const vertex circulator cw
Definition: PolyConnectivity_inline_impl.hh:455
ConstVertexVertexCWIter CVVCWIter
Alias typedef.
Definition: PolyConnectivity.hh:438
Definition: PolyConnectivity.hh:1105
FaceHalfedgeIter FHIter
Alias typedef.
Definition: PolyConnectivity.hh:429
Handle for a face entity.
Definition: Handles.hh:141
VertexOHalfedgeCCWIter VOHCCWIter
Alias typedef.
Definition: PolyConnectivity.hh:416
HalfedgeIter halfedges_sbegin()
Begin iterator for halfedges.
Definition: PolyConnectivity_inline_impl.hh:225
FaceHandle FHandle
Alias typedef.
Definition: PolyConnectivity.hh:399
VertexVertexCWIter ConstVertexVertexCWIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:278
CirculatorRange< CirculatorRangeTraitT< PolyConnectivity, ConstFaceVertexIter, FaceHandle, VertexHandle, &PolyConnectivity::cfv_begin, &PolyConnectivity::cfv_end > > ConstFaceVertexRange
Definition: PolyConnectivity.hh:1211
ConstFaceHalfedgeCCWIter CFHCCWIter
Alias typedef.
Definition: PolyConnectivity.hh:457
Iterators::GenericCirculatorT_DEPRECATED< FaceHalfedgeTraits > HalfedgeLoopIter
Identical to FaceHalfedgeIter.
Definition: PolyConnectivity.hh:270
ConstVertexIHalfedgeCCWIter CVIHCCWIter
Alias typedef.
Definition: PolyConnectivity.hh:445
FaceEdgeCCWIter FECWWIter
Alias typedef.
Definition: PolyConnectivity.hh:434
Generic class for vertex/halfedge/edge/face ranges.
Definition: PolyConnectivity.hh:69
VertexEdgeCCWIter ConstVertexEdgeCCWIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:291
Iterators::GenericCirculatorT< VertexHalfedgeTraits, true > VertexOHalfedgeCWIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:193
HalfedgeIter halfedges_end()
End iterator for halfedges.
Definition: PolyConnectivity_inline_impl.hh:188
EdgeIter ConstEdgeIter
Linear iterator.
Definition: PolyConnectivity.hh:144
Definition: CirculatorsT.hh:254
VertexEdgeIter ConstVertexEdgeIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:289
static const FaceHandle InvalidFaceHandle
Invalid handle.
Definition: PolyConnectivity.hh:124
static const EdgeHandle InvalidEdgeHandle
Invalid handle.
Definition: PolyConnectivity.hh:122
ConstVertexIHalfedgeCWIter CVIHCWIter
Alias typedef.
Definition: PolyConnectivity.hh:444
VertexIter VIter
Alias typedef.
Definition: PolyConnectivity.hh:401
VertexVertexIter VVIter
Alias typedef.
Definition: PolyConnectivity.hh:411
ConstFaceVertexCWIter CFVCWIter
Alias typedef.
Definition: PolyConnectivity.hh:453
VertexFaceCWIter ConstVertexFaceCWIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:287
FaceVertexIter ConstFaceVertexIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:367
VertexFaceCWIter VFCWIter
Alias typedef.
Definition: PolyConnectivity.hh:424
Iterators::GenericCirculatorT< VertexEdgeTraits, false > VertexEdgeCCWIter
Enumerates incident edges in a counter clockwise fashion.
Definition: PolyConnectivity.hh:256
ConstVertexOHalfedgeCWIter CVOHCWIter
Alias typedef.
Definition: PolyConnectivity.hh:441
Iterators::GenericCirculatorT< VertexOppositeHalfedgeTraits, true > VertexIHalfedgeCWIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:212
FaceEdgeIter FEIter
Alias typedef.
Definition: PolyConnectivity.hh:432
Iterators::GenericCirculatorT< FaceHalfedgeTraits, false > FaceHalfedgeCWIter
Enumerate incident half edges in a clockwise fashion.
Definition: PolyConnectivity.hh:325
FaceHalfedgeCWIter ConstFaceHalfedgeCWIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:371
Definition: IteratorsT.hh:83
EdgeIter EIter
Alias typedef.
Definition: PolyConnectivity.hh:403
ConstVertexIHalfedgeIter cvih_begin(VertexHandle _vh) const
const vertex - incoming halfedge circulator
Definition: PolyConnectivity_inline_impl.hh:461
Iterators::GenericCirculatorT< FaceHalfedgeTraits, false > HalfedgeLoopCWIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:271
ConstVertexFaceIter cvf_begin(VertexHandle _vh) const
const vertex - face circulator
Definition: PolyConnectivity_inline_impl.hh:488
Iterators::GenericIteratorT< This, This::FaceHandle, ArrayKernel, &ArrayKernel::has_face_status, &ArrayKernel::n_faces > FaceIter
Linear iterator.
Definition: PolyConnectivity.hh:140
VertexVertexCCWIter ConstVertexVertexCCWIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:279
EntityRange< RangeTraitT< const PolyConnectivity, PolyConnectivity::ConstHalfedgeIter, &PolyConnectivity::halfedges_sbegin, &PolyConnectivity::halfedges_end > > ConstHalfedgeRangeSkipping
Definition: PolyConnectivity.hh:1081
ConstVertexFaceIter cvf_end(VertexHandle _vh) const
const vertex - face circulator
Definition: PolyConnectivity_inline_impl.hh:673
VertexIter vertices_sbegin()
Begin iterator for vertices.
Definition: PolyConnectivity_inline_impl.hh:219
EntityRange< RangeTraitT< const PolyConnectivity, PolyConnectivity::ConstVertexIter, &PolyConnectivity::vertices_begin, &PolyConnectivity::vertices_end > > ConstVertexRange
Definition: PolyConnectivity.hh:1066
FaceHalfedgeCWIter FHCWIter
Alias typedef.
Definition: PolyConnectivity.hh:430
FaceVertexCCWIter FVCCWIter
Alias typedef.
Definition: PolyConnectivity.hh:428
ConstHalfedgeIter CHIter
Alias typedef.
Definition: PolyConnectivity.hh:407
FaceVertexCCWIter ConstFaceVertexCCWIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:369
CirculatorRange< CirculatorRangeTraitT< PolyConnectivity, ConstVertexIHalfedgeIter, VertexHandle, HalfedgeHandle, &PolyConnectivity::cvih_begin, &PolyConnectivity::cvih_end > > ConstVertexIHalfedgeRange
Definition: PolyConnectivity.hh:1183
Definition: PolyConnectivity.hh:76
Vertex & deref(VertexHandle _h)
Get item from handle.
Definition: PolyConnectivity.hh:1511
ConstFaceEdgeCCWIter CFECCWIter
Alias typedef.
Definition: PolyConnectivity.hh:460
ConstVertexFaceCWIter CVFCWIter
Alias typedef.
Definition: PolyConnectivity.hh:450
ConstVertexEdgeIter cve_end(VertexHandle _vh) const
const vertex - edge circulator
Definition: PolyConnectivity_inline_impl.hh:664
Iterators::GenericCirculatorT< FaceFaceTraits, true > FaceFaceCCWIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:360
VertexIter ConstVertexIter
Linear iterator.
Definition: PolyConnectivity.hh:142
VertexOHalfedgeIter VOHIter
Alias typedef.
Definition: PolyConnectivity.hh:414
VertexVertexCCWIter VVCCWIter
Alias typedef.
Definition: PolyConnectivity.hh:413
ConstFaceFaceCWIter CFFCWIter
Alias typedef.
Definition: PolyConnectivity.hh:462
const Edge & deref(EdgeHandle _h) const
Get item from handle.
Definition: PolyConnectivity.hh:1514
ConstVertexFaceCCWIter CVFCCWIter
Alias typedef.
Definition: PolyConnectivity.hh:451
FaceHalfedgeCCWIter FHCWWIter
Alias typedef.
Definition: PolyConnectivity.hh:431
ConstFaceFaceIter cff_end(FaceHandle _fh) const
const face - face circulator
Definition: PolyConnectivity_inline_impl.hh:756
ConstVertexVertexCWIter cvv_cwend(VertexHandle _vh) const
const vertex circulator cw
Definition: PolyConnectivity_inline_impl.hh:640
CirculatorRange< CirculatorRangeTraitT< PolyConnectivity, ConstVertexFaceIter, VertexHandle, FaceHandle, &PolyConnectivity::cvf_begin, &PolyConnectivity::cvf_end > > ConstVertexFaceRange
Definition: PolyConnectivity.hh:1204
Iterators::GenericCirculatorT< VertexEdgeTraits, true > VertexEdgeCWIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:252
ConstFaceFaceIter cff_begin(FaceHandle _fh) const
const face - face circulator
Definition: PolyConnectivity_inline_impl.hh:571
ConstFaceVertexIter cfv_begin(FaceHandle _fh) const
const face - vertex circulator
Definition: PolyConnectivity_inline_impl.hh:544
ConstFaceFaceIter CFFIter
Alias typedef.
Definition: PolyConnectivity.hh:461
ConstVertexFaceIter CVFIter
Alias typedef.
Definition: PolyConnectivity.hh:449
Iterators::GenericCirculatorT< VertexVertexTraits, false > VertexVertexCCWIter
Enumerates 1-ring vertices in a counter clockwise fashion.
Definition: PolyConnectivity.hh:178
Definition: PolyConnectivity.hh:181
ConstFaceEdgeIter cfe_end(FaceHandle _fh) const
const face - edge circulator
Definition: PolyConnectivity_inline_impl.hh:747
Halfedge & deref(HalfedgeHandle _h)
Get item from handle.
Definition: PolyConnectivity.hh:1513
ConstVertexIter CVIter
Alias typedef.
Definition: PolyConnectivity.hh:406
VertexOHalfedgeIter ConstVertexOHalfedgeIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:280
bool is_valid() const
The handle is valid iff the index is not negative.
Definition: Handles.hh:72
ConstFaceIter CFIter
Alias typedef.
Definition: PolyConnectivity.hh:409
FaceVertexIter FVIter
Alias typedef.
Definition: PolyConnectivity.hh:426
ConstVertexEdgeIter CVEIter
Alias typedef.
Definition: PolyConnectivity.hh:446
FaceEdgeCWIter ConstFaceEdgeCWIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:374
VertexOHalfedgeCWIter VOHCWIter
Alias typedef.
Definition: PolyConnectivity.hh:415
ConstFaceEdgeIter cfe_begin(FaceHandle _fh) const
const face - edge circulator
Definition: PolyConnectivity_inline_impl.hh:562
ConstFaceHalfedgeCWIter CFHCWIter
Alias typedef.
Definition: PolyConnectivity.hh:456
VertexIHalfedgeIter ConstVertexIHalfedgeIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:283
Definition: PolyConnectivity.hh:297
ConstVertexOHalfedgeIter CVOHIter
Alias typedef.
Definition: PolyConnectivity.hh:440
Handle for a vertex entity.
Definition: Handles.hh:120
VertexFaceIter VFIter
Alias typedef.
Definition: PolyConnectivity.hh:423
bool is_boundary(VertexHandle _vh) const
Is vertex _vh a boundary vertex ?
Definition: PolyConnectivity.hh:1330
FaceIter FIter
Alias typedef.
Definition: PolyConnectivity.hh:404
Iterators::GenericCirculatorT_DEPRECATED< VertexHalfedgeTraits > VertexOHalfedgeIter
Enumerates outgoing half edges in a clockwise fashion.
Definition: PolyConnectivity.hh:192
Iterators::GenericCirculatorT< FaceEdgeTraits, false > FaceEdgeCWIter
Enumerate incident edges in a clockwise fashion.
Definition: PolyConnectivity.hh:345
bool is_boundary(EdgeHandle _eh) const
Is the edge a boundary edge?
Definition: PolyConnectivity.hh:1313
HalfedgeIter ConstHalfedgeIter
Linear iterator.
Definition: PolyConnectivity.hh:143
CirculatorRange< CirculatorRangeTraitT< PolyConnectivity, ConstVertexVertexCWIter, VertexHandle, VertexHandle, &PolyConnectivity::cvv_cwbegin, &PolyConnectivity::cvv_cwend > > ConstVertexVertexRange
Definition: PolyConnectivity.hh:1176
Iterators::GenericIteratorT< This, This::EdgeHandle, ArrayKernel, &ArrayKernel::has_edge_status, &ArrayKernel::n_edges > EdgeIter
Linear iterator.
Definition: PolyConnectivity.hh:139
EntityRange< RangeTraitT< const PolyConnectivity, PolyConnectivity::ConstFaceIter, &PolyConnectivity::faces_sbegin, &PolyConnectivity::faces_end > > ConstFaceRangeSkipping
Definition: PolyConnectivity.hh:1101
Iterators::GenericCirculatorT_DEPRECATED< FaceVertexTraits > FaceVertexIter
Enumerate incident vertices in a counter clockwise fashion.
Definition: PolyConnectivity.hh:308
ConstVertexVertexIter CVVIter
Alias typedef.
Definition: PolyConnectivity.hh:437
ConstVertexEdgeCCWIter CVECCWIter
Alias typedef.
Definition: PolyConnectivity.hh:448
EntityRange< RangeTraitT< const PolyConnectivity, PolyConnectivity::ConstVertexIter, &PolyConnectivity::vertices_sbegin, &PolyConnectivity::vertices_end > > ConstVertexRangeSkipping
Definition: PolyConnectivity.hh:1071
Iterators::GenericCirculatorT< VertexHalfedgeTraits, false > VertexOHalfedgeCCWIter
Enumerates outgoing half edges in a counter clockwise fashion.
Definition: PolyConnectivity.hh:198
EdgeIter edges_end()
End iterator for edges.
Definition: PolyConnectivity_inline_impl.hh:200
FaceFaceCCWIter ConstFaceFaceCCWIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:378
Iterators::GenericIteratorT< This, This::HalfedgeHandle, ArrayKernel, &ArrayKernel::has_halfedge_status, &ArrayKernel::n_halfedges > HalfedgeIter
Linear iterator.
Definition: PolyConnectivity.hh:138
Iterators::GenericCirculatorT_DEPRECATED< VertexEdgeTraits > VertexEdgeIter
Enumerates incident edges in a clockwise fashion.
Definition: PolyConnectivity.hh:251
FaceIter ConstFaceIter
Linear iterator.
Definition: PolyConnectivity.hh:145
void assign_connectivity(const ArrayKernel &_other)
ArrayKernel uses the default copy constructor and assignment operator, which means that the connectiv...
Definition: ArrayKernel.cc:71
bool is_boundary(HalfedgeHandle _heh) const
Is halfedge _heh a boundary halfedge (is its face handle invalid) ?
Definition: ArrayKernel.hh:398
Definition: SmartHandles.hh:114
Definition: PolyConnectivity.hh:95
ConstEdgeIter CEIter
Alias typedef.
Definition: PolyConnectivity.hh:408
ConstVertexIHalfedgeIter CVIHIter
Alias typedef.
Definition: PolyConnectivity.hh:443
FaceHalfedgeIter ConstFaceHalfedgeIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:370
VertexIter vertices_begin()
Begin iterator for vertices.
Definition: PolyConnectivity_inline_impl.hh:170
Iterators::GenericCirculatorT< FaceHalfedgeTraits, true > HalfedgeLoopCCWIter
Identical to FaceHalfedgeIter.
Definition: PolyConnectivity.hh:275
FaceHalfedgeCCWIter ConstFaceHalfedgeCCWIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:372
VertexEdgeIter VEIter
Alias typedef.
Definition: PolyConnectivity.hh:420
Iterators::GenericCirculatorT< FaceVertexTraits, false > FaceVertexCWIter
Enumerate incident vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:314
VertexIHalfedgeCWIter VIHICWter
Alias typedef.
Definition: PolyConnectivity.hh:418
VertexFaceCCWIter VFCCWIter
Alias typedef.
Definition: PolyConnectivity.hh:425
EntityRange< RangeTraitT< const PolyConnectivity, PolyConnectivity::ConstFaceIter, &PolyConnectivity::faces_begin, &PolyConnectivity::faces_end > > ConstFaceRange
Definition: PolyConnectivity.hh:1096
VertexOHalfedgeCCWIter ConstVertexOHalfedgeCCWIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:282
ConstFaceEdgeIter CFEIter
Alias typedef.
Definition: PolyConnectivity.hh:458
Iterators::GenericCirculatorT_DEPRECATED< FaceFaceTraits > FaceFaceIter
Enumerate adjacent faces in a counter clockwise fashion.
Definition: PolyConnectivity.hh:359
EdgeIter edges_begin()
Begin iterator for edges.
Definition: PolyConnectivity_inline_impl.hh:194
ConstVertexEdgeCWIter CVECWIter
Alias typedef.
Definition: PolyConnectivity.hh:447
ConstFaceVertexIter cfv_end(FaceHandle _fh) const
const face - vertex circulator
Definition: PolyConnectivity_inline_impl.hh:729
Iterators::GenericCirculatorT< VertexFaceTraits, true > VertexFaceCWIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:232
VertexFaceCCWIter ConstVertexFaceCCWIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:288
EntityRange< RangeTraitT< const PolyConnectivity, PolyConnectivity::ConstEdgeIter, &PolyConnectivity::edges_sbegin, &PolyConnectivity::edges_end > > ConstEdgeRangeSkipping
Definition: PolyConnectivity.hh:1091
Iterators::GenericCirculatorT< VertexVertexTraits, true > VertexVertexCWIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:173
EntityRange< RangeTraitT< const PolyConnectivity, PolyConnectivity::ConstEdgeIter, &PolyConnectivity::edges_begin, &PolyConnectivity::edges_end > > ConstEdgeRange
Definition: PolyConnectivity.hh:1086
Definition: PolyConnectivity.hh:220
EdgeHandle EHandle
Alias typedef.
Definition: PolyConnectivity.hh:398
HalfedgeLoopIter ConstHalfedgeLoopIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:383
Definition: SmartHandles.hh:162
Definition: PolyConnectivity.hh:160
FaceIter faces_end()
End iterator for faces.
Definition: PolyConnectivity_inline_impl.hh:212
Smart version of VertexHandle contains a pointer to the corresponding mesh and allows easier access t...
Definition: SmartHandles.hh:84
Generic class for iterator ranges.
Definition: PolyConnectivity.hh:86
ConstFaceHalfedgeIter cfh_end(FaceHandle _fh) const
const face - halfedge circulator
Definition: PolyConnectivity_inline_impl.hh:738
bool is_boundary(HalfedgeHandle _heh) const
Check if the halfedge is at the boundary.
Definition: PolyConnectivity.hh:1302
HalfedgeHandle HHandle
Alias typedef.
Definition: PolyConnectivity.hh:397
Iterators::GenericCirculatorT< VertexFaceTraits, false > VertexFaceCCWIter
Enumerates incident faces in a counter clockwise fashion.
Definition: PolyConnectivity.hh:237
Iterators::GenericCirculatorT< FaceFaceTraits, false > FaceFaceCWIter
Enumerate adjacent faces in a clockwise fashion.
Definition: PolyConnectivity.hh:365
VertexIHalfedgeIter VIHIter
Alias typedef.
Definition: PolyConnectivity.hh:417
FaceFaceCWIter ConstFaceFaceCWIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:377
ConstVertexEdgeIter cve_begin(VertexHandle _vh) const
const vertex - edge circulator
Definition: PolyConnectivity_inline_impl.hh:479
FaceIter faces_sbegin()
Begin iterator for faces.
Definition: PolyConnectivity_inline_impl.hh:237
ConstFaceHalfedgeIter cfh_begin(FaceHandle _fh) const
const face - halfedge circulator
Definition: PolyConnectivity_inline_impl.hh:553
FaceEdgeCWIter FECWIter
Alias typedef.
Definition: PolyConnectivity.hh:433
Face & deref(FaceHandle _h)
Get item from handle.
Definition: PolyConnectivity.hh:1517
Iterators::GenericCirculatorT_DEPRECATED< VertexOppositeHalfedgeTraits > VertexIHalfedgeIter
Enumerates incoming half edges in a clockwise fashion.
Definition: PolyConnectivity.hh:211
HalfedgeLoopCCWIter ConstHalfedgeLoopCCWIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:385
Definition: PolyConnectivity.hh:348
Handle for a edge entity.
Definition: Handles.hh:134
Iterators::GenericCirculatorT< FaceVertexTraits, true > FaceVertexCCWIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:309
Definition: PolyConnectivity.hh:259
ConstFaceEdgeCWIter CFECWIter
Alias typedef.
Definition: PolyConnectivity.hh:459
VertexEdgeCWIter VECWIter
Alias typedef.
Definition: PolyConnectivity.hh:421
ConstFaceFaceCCWIter CFFCCWIter
Alias typedef.
Definition: PolyConnectivity.hh:463
Iterators::GenericCirculatorT< VertexOppositeHalfedgeTraits, false > VertexIHalfedgeCCWIter
Enumerates incoming half edges in a counter clockwise fashion.
Definition: PolyConnectivity.hh:217
FaceIter faces_begin()
Begin iterator for faces.
Definition: PolyConnectivity_inline_impl.hh:206
ConstFaceVertexIter CFVIter
Alias typedef.
Definition: PolyConnectivity.hh:452
Iterators::GenericCirculatorT< FaceHalfedgeTraits, true > FaceHalfedgeCCWIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:320
const Face & deref(FaceHandle _h) const
Get item from handle.
Definition: PolyConnectivity.hh:1516
CirculatorRange< CirculatorRangeTraitT< PolyConnectivity, ConstFaceEdgeIter, FaceHandle, EdgeHandle, &PolyConnectivity::cfe_begin, &PolyConnectivity::cfe_end > > ConstFaceEdgeRange
Definition: PolyConnectivity.hh:1225
Iterators::GenericCirculatorT_DEPRECATED< VertexVertexTraits > VertexVertexIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:172
Definition: SmartHandles.hh:137
Connectivity Class for polygonal meshes.
Definition: PolyConnectivity.hh:112
static const HalfedgeHandle InvalidHalfedgeHandle
Invalid handle.
Definition: PolyConnectivity.hh:120
Mesh kernel using arrays for mesh item storage.
Definition: ArrayKernel.hh:87
ConstFaceVertexCCWIter CFVCCWIter
Alias typedef.
Definition: PolyConnectivity.hh:454
VertexVertexIter ConstVertexVertexIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:277
FaceFaceIter ConstFaceFaceIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:376
VertexIter vertices_end()
End iterator for vertices.
Definition: PolyConnectivity_inline_impl.hh:176
EntityRange< RangeTraitT< const PolyConnectivity, PolyConnectivity::ConstHalfedgeIter, &PolyConnectivity::halfedges_begin, &PolyConnectivity::halfedges_end > > ConstHalfedgeRange
Definition: PolyConnectivity.hh:1076
FaceFaceIter FFIter
Alias typedef.
Definition: PolyConnectivity.hh:435
VertexEdgeCWIter ConstVertexEdgeCWIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:290
Iterators::GenericCirculatorT_DEPRECATED< VertexFaceTraits > VertexFaceIter
Enumerates incident faces in a clockwise fashion.
Definition: PolyConnectivity.hh:231
ConstVertexOHalfedgeIter cvoh_begin(VertexHandle _vh) const
const vertex - outgoing halfedge circulator
Definition: PolyConnectivity_inline_impl.hh:470
ConstFaceHalfedgeIter CFHIter
Alias typedef.
Definition: PolyConnectivity.hh:455
Iterators::GenericCirculatorT_DEPRECATED< FaceHalfedgeTraits > FaceHalfedgeIter
Enumerate incident half edges in a counter clockwise fashion.
Definition: PolyConnectivity.hh:319
CirculatorRange< CirculatorRangeTraitT< PolyConnectivity, ConstFaceHalfedgeIter, FaceHandle, HalfedgeHandle, &PolyConnectivity::cfh_begin, &PolyConnectivity::cfh_end > > ConstFaceHalfedgeRange
Definition: PolyConnectivity.hh:1218
HalfedgeIter HIter
Alias typedef.
Definition: PolyConnectivity.hh:402
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:59
Definition: PolyConnectivity.hh:328
Handle for a halfedge entity.
Definition: Handles.hh:127
EdgeIter edges_sbegin()
Begin iterator for edges.
Definition: PolyConnectivity_inline_impl.hh:231
const Halfedge & deref(HalfedgeHandle _h) const
Get item from handle.
Definition: PolyConnectivity.hh:1512
ConstVertexOHalfedgeIter cvoh_end(VertexHandle _vh) const
const vertex - outgoing halfedge circulator
Definition: PolyConnectivity_inline_impl.hh:655
CirculatorRange< CirculatorRangeTraitT< PolyConnectivity, ConstVertexOHalfedgeIter, VertexHandle, HalfedgeHandle, &PolyConnectivity::cvoh_begin, &PolyConnectivity::cvoh_end > > ConstVertexOHalfedgeRange
Definition: PolyConnectivity.hh:1190
CirculatorRange< CirculatorRangeTraitT< PolyConnectivity, ConstFaceFaceIter, FaceHandle, FaceHandle, &PolyConnectivity::cff_begin, &PolyConnectivity::cff_end > > ConstFaceFaceRange
Definition: PolyConnectivity.hh:1232
Definition: PolyConnectivity.hh:240
FaceVertexCWIter FVCWIter
Alias typedef.
Definition: PolyConnectivity.hh:427
Iterators::GenericCirculatorT_DEPRECATED< FaceEdgeTraits > FaceEdgeIter
Enumerate incident edges in a counter clockwise fashion.
Definition: PolyConnectivity.hh:339
FaceEdgeCCWIter ConstFaceEdgeCCWIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:375
VertexEdgeCCWIter VECCWIter
Alias typedef.
Definition: PolyConnectivity.hh:422
Iterators::GenericCirculatorT< FaceEdgeTraits, true > FaceEdgeCCWIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:340
VertexIHalfedgeCCWIter ConstVertexIHalfedgeCCWIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:285
VertexIHalfedgeCWIter ConstVertexIHalfedgeCWIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:284
SmartHalfedgeHandle opposite_halfedge_handle(SmartHalfedgeHandle _heh) const
returns the face handle of the opposite halfedge
Definition: PolyConnectivity_inline_impl.hh:57
VertexOHalfedgeCWIter ConstVertexOHalfedgeCWIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:281
FaceEdgeIter ConstFaceEdgeIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:373
HalfedgeLoopCWIter ConstHalfedgeLoopCWIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:384
CirculatorRange< CirculatorRangeTraitT< PolyConnectivity, ConstVertexEdgeIter, VertexHandle, EdgeHandle, &PolyConnectivity::cve_begin, &PolyConnectivity::cve_end > > ConstVertexEdgeRange
Definition: PolyConnectivity.hh:1197
VertexIHalfedgeCCWIter VIHICCWter
Alias typedef.
Definition: PolyConnectivity.hh:419
Edge & deref(EdgeHandle _h)
Get item from handle.
Definition: PolyConnectivity.hh:1515
FaceVertexCWIter ConstFaceVertexCWIter
Enumerates 1-ring vertices in a clockwise fashion.
Definition: PolyConnectivity.hh:368

Project OpenMesh, ©  Computer Graphics Group, RWTH Aachen. Documentation generated using doxygen .