Developer Documentation
SmartHandles.cc
1 /* ========================================================================= *
2  * *
3  * OpenMesh *
4  * Copyright (c) 2001-2019, 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 //== INCLUDES =================================================================
44 
45 #include <OpenMesh/Core/Mesh/PolyConnectivity.hh>
46 #include "SmartHandles.hh"
47 
48 
49 //== NAMESPACES ===============================================================
50 
51 namespace OpenMesh {
52 
53 //TODO: I was not able to leave those in the header. If you find a way to do that, please do.
54 
56 {
57  assert(mesh() != nullptr);
58  return mesh()->vf_range(*this);
59 }
60 
62 {
63  assert(mesh() != nullptr);
64  return mesh()->ve_range(*this);
65 }
66 
68 {
69  assert(mesh() != nullptr);
70  return mesh()->vv_range(*this);
71 }
72 
74 {
75  assert(mesh() != nullptr);
76  return mesh()->vih_range(*this);
77 }
78 
80 {
81  assert(mesh() != nullptr);
82  return mesh()->voh_range(*this);
83 }
84 
85 
87 {
88  assert(mesh() != nullptr);
89  return mesh()->fv_range(*this);
90 }
91 
93 {
94  assert(mesh() != nullptr);
95  return mesh()->fh_range(*this);
96 }
97 
99 {
100  assert(mesh() != nullptr);
101  return mesh()->fe_range(*this);
102 }
103 
105 {
106  assert(mesh() != nullptr);
107  return mesh()->ff_range(*this);
108 }
109 
110 
111 //=============================================================================
112 } // namespace OpenMesh
113 //=============================================================================
114 
115 //=============================================================================
ConstVertexOHalfedgeRange voh_range(VertexHandle _vh) const
ConstVertexEdgeRange ve_range(VertexHandle _vh) const
const PolyConnectivity * mesh() const
Get the underlying mesh of this handle.
Definition: SmartHandles.hh:74
PolyConnectivity::ConstVertexFaceRange faces() const
Returns a range of faces incident to the vertex (PolyConnectivity::vf_range())
Definition: SmartHandles.cc:55
PolyConnectivity::ConstFaceVertexRange vertices() const
Returns a range of vertices incident to the face (PolyConnectivity::fv_range())
Definition: SmartHandles.cc:86
ConstVertexFaceRange vf_range(VertexHandle _vh) const
PolyConnectivity::ConstFaceFaceRange faces() const
Returns a range adjacent faces of the face (PolyConnectivity::ff_range())
PolyConnectivity::ConstVertexVertexRange vertices() const
Returns a range of vertices adjacent to the vertex (PolyConnectivity::vv_range()) ...
Definition: SmartHandles.cc:67
ConstVertexIHalfedgeRange vih_range(VertexHandle _vh) const
Generic class for iterator ranges.
PolyConnectivity::ConstVertexOHalfedgeRange outgoing_halfedges() const
Returns a range of incoming halfedges incident to the vertex (PolyConnectivity::vih_range()) ...
Definition: SmartHandles.cc:79
PolyConnectivity::ConstVertexEdgeRange edges() const
Returns a range of edges incident to the vertex (PolyConnectivity::ve_range())
Definition: SmartHandles.cc:61
ConstVertexVertexRange vv_range(VertexHandle _vh) const
PolyConnectivity::ConstVertexIHalfedgeRange incoming_halfedges() const
Returns a range of outgoing halfedges incident to the vertex (PolyConnectivity::voh_range()) ...
Definition: SmartHandles.cc:73
PolyConnectivity::ConstFaceEdgeRange edges() const
Returns a range of edges of the face (PolyConnectivity::fv_range())
Definition: SmartHandles.cc:98
PolyConnectivity::ConstFaceHalfedgeRange halfedges() const
Returns a range of halfedges of the face (PolyConnectivity::fh_range())
Definition: SmartHandles.cc:92
ConstFaceEdgeRange fe_range(FaceHandle _fh) const
ConstFaceFaceRange ff_range(FaceHandle _fh) const
ConstFaceHalfedgeRange fh_range(FaceHandle _fh) const
ConstFaceVertexRange fv_range(FaceHandle _fh) const