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 
59 namespace OpenMesh {
60 namespace Concepts {
61 
62 
63 //== CLASS DEFINITION =========================================================
64 
65 
71 struct MeshItems {
72 
73 
81 template <class Refs_> class VertexT
82 {
83 public:
84 
86  typedef Refs_ Refs;
87 
89  VertexT();
90 
95 };
96 
97 
98 
99 
107 template <class Refs_> class HalfedgeT
108 {
109 public:
110 
112  typedef Refs_ Refs;
113 
116  VertexHandle vertex_handle() const;
117 
120  void set_vertex_handle(VertexHandle _vh);
121 
124  FaceHandle face_handle() const;
125 
128  void set_face_handle(FaceHandle _fh);
129 
132  HalfedgeHandle next_halfedge_handle() const;
133 
136  void set_next_halfedge_handle(HalfedgeHandle _eh);
137 };
138 
139 
140 
141 
149 template <class Refs_> class EdgeT
150 {
151 public:
152 
154  typedef Refs_ Refs;
155 
158  Halfedge halfedges[2];
159 };
160 
161 
162 
163 
171 template <class Refs_> class FaceT
172 {
173 public:
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 //=============================================================================
Refs_ Refs
Re-export the template argument Refs. This must be done!
Definition: MeshItems.hh:154
Handle for a halfedge entity.
Definition: Handles.hh:127
Refs_ Refs
Re-export the template argument Refs. This must be done!
Definition: MeshItems.hh:176
Handle for a vertex entity.
Definition: Handles.hh:120
Refs_ Refs
Re-export the template argument Refs. This must be done!
Definition: MeshItems.hh:112
The mesh items class encapsulates the types VertexT, HalfedgeT, EdgeT, and FaceT. ...
Definition: MeshItems.hh:71
void set_halfedge_handle(HalfedgeHandle _eh)
Set the outgoing halfedge link.
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:59
Interface for the internal halfedge type.
Definition: MeshItems.hh:107
Handle for a face entity.
Definition: Handles.hh:141
Interface for the internal face type.
Definition: MeshItems.hh:171
Interface for the internal vertex type.
Definition: MeshItems.hh:81
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:180
HalfedgeHandle halfedge_handle() const
Get an outgoing halfedge.
Interface for the internal edge type.
Definition: MeshItems.hh:149
Refs_ Refs
Re-export the template argument Refs. This must be done!
Definition: MeshItems.hh:86

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