OpenMesh
Loading...
Searching...
No Matches
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 * $Revision$ *
46 * $Date$ *
47 * *
48\*===========================================================================*/
49
50
51//=============================================================================
52//
53// Mesh Items Concept
54//
55//=============================================================================
56
57
58#error this file is for documentation purposes only
59
60
61//== NAMESPACES ===============================================================
62
63
64namespace OpenMesh {
65namespace Concepts {
66
67
68//== CLASS DEFINITION =========================================================
69
70
76struct MeshItems {
77
78
86template <class Refs_> class VertexT
87{
88public:
89
91 typedef Refs_ Refs;
92
95
100};
101
102
103
104
112template <class Refs_> class HalfedgeT
113{
114public:
115
117 typedef Refs_ Refs;
118
122
126
130
134
138
142};
143
144
145
146
154template <class Refs_> class EdgeT
155{
156public:
157
159 typedef Refs_ Refs;
160
163 Halfedge halfedges[2];
164};
165
166
167
168
176template <class Refs_> class FaceT
177{
178public:
179
181 typedef Refs_ Refs;
182
185 typedef GenProg::TagTrue IsTriangle;
187 static bool is_triangle();
188
190 unsigned char n_vertices() const;
193 void set_n_vertices(unsigned char _n);
194
200};
201
202};
203
204//=============================================================================
205} // namespace Concepts
206} // namespace OpenMesh
207//=============================================================================
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition MeshItems.hh:64
The mesh items class encapsulates the types VertexT, HalfedgeT, EdgeT, and FaceT.
Definition MeshItems.hh:76
Interface for the internal vertex type.
Definition MeshItems.hh:87
void set_halfedge_handle(HalfedgeHandle _eh)
Set the outgoing halfedge link.
Refs_ Refs
Re-export the template argument Refs. This must be done!
Definition MeshItems.hh:91
HalfedgeHandle halfedge_handle() const
Get an outgoing halfedge.
Interface for the internal halfedge type.
Definition MeshItems.hh:113
void set_face_handle(FaceHandle _fh)
Set the face this halfedge belongs to.
VertexHandle vertex_handle() const
Get the vertex the halfedge point to.
Refs_ Refs
Re-export the template argument Refs. This must be done!
Definition MeshItems.hh:117
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.
void set_vertex_handle(VertexHandle _vh)
Set the vertex the halfedge point to.
Interface for the internal edge type.
Definition MeshItems.hh:155
Refs_ Refs
Re-export the template argument Refs. This must be done!
Definition MeshItems.hh:159
Halfedge halfedges[2]
Store two halfedges.
Definition MeshItems.hh:163
Interface for the internal face type.
Definition MeshItems.hh:177
Refs_ Refs
Re-export the template argument Refs. This must be done!
Definition MeshItems.hh:181
GenProg::TagTrue IsTriangle
Compile-time-tag: is this face a triangle? Should be typedef'ed to either GenProg::TagTrue or GenProg...
Definition MeshItems.hh:185
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.
void set_n_vertices(unsigned char _n)
Set the number of vertices of this face.
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:126
Handle for a halfedge entity.
Definition Handles.hh:133
Handle for a face entity.
Definition Handles.hh:147

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