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  * $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 
64 namespace OpenMesh {
65 namespace Concepts {
66 
67 
68 //== CLASS DEFINITION =========================================================
69 
70 
76 struct MeshItems {
77 
78 
86 template <class Refs_> class VertexT
87 {
88 public:
89 
91  typedef Refs_ Refs;
92 
94  VertexT();
95 
100 };
101 
102 
103 
104 
112 template <class Refs_> class HalfedgeT
113 {
114 public:
115 
117  typedef Refs_ Refs;
118 
121  VertexHandle vertex_handle() const;
122 
125  void set_vertex_handle(VertexHandle _vh);
126 
129  FaceHandle face_handle() const;
130 
133  void set_face_handle(FaceHandle _fh);
134 
137  HalfedgeHandle next_halfedge_handle() const;
138 
141  void set_next_halfedge_handle(HalfedgeHandle _eh);
142 };
143 
144 
145 
146 
154 template <class Refs_> class EdgeT
155 {
156 public:
157 
159  typedef Refs_ Refs;
160 
163  Halfedge halfedges[2];
164 };
165 
166 
167 
168 
176 template <class Refs_> class FaceT
177 {
178 public:
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 //=============================================================================
Refs_ Refs
Re-export the template argument Refs. This must be done!
Definition: MeshItems.hh:91
Refs_ Refs
Re-export the template argument Refs. This must be done!
Definition: MeshItems.hh:181
void set_halfedge_handle(HalfedgeHandle _eh)
Set the outgoing halfedge link.
The mesh items class encapsulates the types VertexT, HalfedgeT, EdgeT, and FaceT. ...
Definition: MeshItems.hh:76
Handle for a vertex entity.
Definition: Handles.hh:125
Interface for the internal face type.
Definition: MeshItems.hh:176
GenProg::TagTrue IsTriangle
Compile-time-tag: is this face a triangle? Should be typedef&#39;ed to either GenProg::TagTrue or GenProg...
Definition: MeshItems.hh:185
HalfedgeHandle halfedge_handle() const
Get an outgoing halfedge.
Interface for the internal halfedge type.
Definition: MeshItems.hh:112
Handle for a face entity.
Definition: Handles.hh:146
Interface for the internal edge type.
Definition: MeshItems.hh:154
Refs_ Refs
Re-export the template argument Refs. This must be done!
Definition: MeshItems.hh:159
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:64
Interface for the internal vertex type.
Definition: MeshItems.hh:86
Handle for a halfedge entity.
Definition: Handles.hh:132
Refs_ Refs
Re-export the template argument Refs. This must be done!
Definition: MeshItems.hh:117

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