OpenMesh
MeshItems.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
45
46//=============================================================================
47//
48// Mesh Items Concept
49//
50//=============================================================================
51
52
53#error this file is for documentation purposes only
54
55
56//== NAMESPACES ===============================================================
57
58
59namespace OpenMesh {
60namespace Concepts {
61
62
63//== CLASS DEFINITION =========================================================
64
65
71struct MeshItems {
72
73
81template <class Refs_> class VertexT
82{
83public:
84
86 typedef Refs_ Refs;
87
90
95};
96
97
98
99
107template <class Refs_> class HalfedgeT
108{
109public:
110
112 typedef Refs_ Refs;
113
117
121
125
129
133
137};
138
139
140
141
149template <class Refs_> class EdgeT
150{
151public:
152
154 typedef Refs_ Refs;
155
158 Halfedge halfedges[2];
159};
160
161
162
163
171template <class Refs_> class FaceT
172{
173public:
174
176 typedef Refs_ Refs;
177
180 typedef GenProg::TagTrue IsTriangle;
182 static bool is_triangle();
183
185 unsigned char n_vertices() const;
188 void set_n_vertices(unsigned char _n);
189
195};
196
197};
198
199//=============================================================================
200} // namespace Concepts
201} // namespace OpenMesh
202//=============================================================================
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:59
The mesh items class encapsulates the types VertexT, HalfedgeT, EdgeT, and FaceT.
Definition: MeshItems.hh:71
Interface for the internal vertex type.
Definition: MeshItems.hh:82
Refs_ Refs
Re-export the template argument Refs. This must be done!
Definition: MeshItems.hh:86
void set_halfedge_handle(HalfedgeHandle _eh)
Set the outgoing halfedge link.
HalfedgeHandle halfedge_handle() const
Get an outgoing halfedge.
Interface for the internal halfedge type.
Definition: MeshItems.hh:108
void set_face_handle(FaceHandle _fh)
Set the face this halfedge belongs to.
VertexHandle vertex_handle() const
Get the vertex the halfedge point to.
void set_next_halfedge_handle(HalfedgeHandle _eh)
Set the next halfedge inside this face.
FaceHandle face_handle() const
Get the face this halfedge belongs to.
HalfedgeHandle next_halfedge_handle() const
Get the next halfedge inside this face.
Refs_ Refs
Re-export the template argument Refs. This must be done!
Definition: MeshItems.hh:112
void set_vertex_handle(VertexHandle _vh)
Set the vertex the halfedge point to.
Interface for the internal edge type.
Definition: MeshItems.hh:150
Refs_ Refs
Re-export the template argument Refs. This must be done!
Definition: MeshItems.hh:154
Halfedge halfedges[2]
Store two halfedges.
Definition: MeshItems.hh:158
Interface for the internal face type.
Definition: MeshItems.hh:172
unsigned char n_vertices() const
Get the number of vertices of this face.
HalfedgeHandle halfedge_handle() const
Get a halfedge that belongs to this face.
GenProg::TagTrue IsTriangle
Compile-time-tag: is this face a triangle? Should be typedef'ed to either GenProg::TagTrue or GenProg...
Definition: MeshItems.hh:180
void set_n_vertices(unsigned char _n)
Set the number of vertices of this face.
Refs_ Refs
Re-export the template argument Refs. This must be done!
Definition: MeshItems.hh:176
void set_halfedge_handle(HalfedgeHandle _eh)
Set a halfedge that belongs this face.
static bool is_triangle()
Run-time test: is this face a triangle?
Handle for a vertex entity.
Definition: Handles.hh:121
Handle for a halfedge entity.
Definition: Handles.hh:128
Handle for a face entity.
Definition: Handles.hh:142

Project OpenMesh, ©  Visual Computing Institute, RWTH Aachen. Documentation generated using doxygen .