OpenMesh: Doc/Concepts/MeshKernel.hh Source File

| OpenMesh

MeshKernel.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 // Kernel Concept
46 //
47 //=============================================================================
48
49
50 #error this file is for documentation purposes only
51
52
53 //== NAMESPACES ===============================================================
54
55
56 namespace OpenMesh {
57 namespace Concepts {
58
59
60 //== CLASS DEFINITION =========================================================
61
62
75 template <class FinalMeshItems> class KernelT
76 {
77 public:
78
80
81
83 typedef typename FinalMeshItems::Vertex Vertex;
84 typedef typename FinalMeshItems::Halfedge Halfedge;
85 typedef typename FinalMeshItems::Edge Edge;
86 typedef typename FinalMeshItems::Face Face;
87 typedef typename FinalMeshItems::Point Point;
88 typedef typename FinalMeshItems::Scalar Scalar;
89 typedef typename FinalMeshItems::Normal Normal;
90 typedef typename FinalMeshItems::Color Color;
91 typedef typename FinalMeshItems::TexCoord TexCoord;
92 typedef typename FinalMeshItems::VertexHandle VertexHandle;
93 typedef typename FinalMeshItems::HalfedgeHandle HalfedgeHandle;
94 typedef typename FinalMeshItems::EdgeHandle EdgeHandle;
95 typedef typename FinalMeshItems::FaceHandle FaceHandle;
96
98
99
101
102 typedef SomeIterator KernelVertexIter;
104 typedef SomeIterator KernelConstVertexIter;
105 typedef SomeIterator KernelEdgeIter;
106 typedef SomeIterator KernelConstEdgeIter;
107 typedef SomeIterator KernelFaceIter;
108 typedef SomeIterator KernelConstFaceIter;
110
112
113 KernelT() {}
115
117 ~KernelT();
119
121 KernelT& operator=(const KernelT& _rhs);
122
123
136 void reserve( size_t _n_vertices,
137 size_t _n_edges,
138 size_t _n_faces );
139
140
142
143 const Vertex& vertex(VertexHandle _h) const { return deref(_h); }
145 Vertex& vertex(VertexHandle _h) { return deref(_h); }
146 const Halfedge& halfedge(HalfedgeHandle _h) const { return deref(_h); }
147 Halfedge& halfedge(HalfedgeHandle _h) { return deref(_h); }
148 const Edge& edge(EdgeHandle _h) const { return deref(_h); }
149 Edge& edge(EdgeHandle _h) { return deref(_h); }
150 const Face& face(FaceHandle _h) const { return deref(_h); }
151 Face& face(FaceHandle _h) { return deref(_h); }
153
154
156
157 VertexHandle handle(const Vertex& _v) const;
159 HalfedgeHandle handle(const Halfedge& _he) const;
160 EdgeHandle handle(const Edge& _e) const;
161 FaceHandle handle(const Face& _f) const;
163
164
166
167 VertexHandle vertex_handle(unsigned int _i) const;
169 HalfedgeHandle halfedge_handle(unsigned int _i) const;
170 EdgeHandle edge_handle(unsigned int _i) const;
171 FaceHandle face_handle(unsigned int _i) const;
173
174
176
177
180 void clear();
181
185 void clean();
186
196 void garbage_collection();
197
201 void remove_last_vertex() { vertices_.pop_back(); }
205 void remove_last_edge() { edges_.pop_back(); }
209 void remove_last_face() { faces_.pop_back(); }
210
212
213
214
215
217
218 size_t n_vertices() const;
221 size_t n_halfedges() const;
223 size_t n_edges() const;
225 size_t n_faces() const;
227 bool vertices_empty() const;
229 bool halfedges_empty() const;
231 bool edges_empty() const;
233 bool faces_empty() const;
235
236
237
239
240 HalfedgeHandle halfedge_handle(VertexHandle _vh) const;
243 void set_halfedge_handle(VertexHandle _vh, HalfedgeHandle _heh);
245 const Point& point(VertexHandle _vh) const;
247 const Point& point(const Vertex& _v) const;
249 void set_point(VertexHandle _vh, const Point& _p);
251 void set_point(Vertex& _v, const Point& _p);
253
254
255
256
258
259 VertexHandle to_vertex_handle(HalfedgeHandle _heh) const;
263 VertexHandle from_vertex_handle(HalfedgeHandle _heh) const;
265 void set_vertex_handle(HalfedgeHandle _heh, VertexHandle _vh);
268 FaceHandle face_handle(HalfedgeHandle _heh) const;
270 void set_face_handle(HalfedgeHandle _heh, FaceHandle _fh);
272 HalfedgeHandle next_halfedge_handle(HalfedgeHandle _heh) const;
276 void set_next_halfedge_handle(HalfedgeHandle _heh, HalfedgeHandle _nheh);
280 HalfedgeHandle prev_halfedge_handle(HalfedgeHandle _heh) const;
282 HalfedgeHandle opposite_halfedge_handle(HalfedgeHandle _heh) const;
284 HalfedgeHandle ccw_rotated_halfedge_handle(HalfedgeHandle _heh) const;
286 HalfedgeHandle cw_rotated_halfedge_handle(HalfedgeHandle _heh) const;
288 EdgeHandle edge_handle(HalfedgeHandle _heh) const;
290
291
292
294
295 HalfedgeHandle halfedge_handle(EdgeHandle _eh, unsigned int _i) const;
298
299
300
302
303 HalfedgeHandle halfedge_handle(FaceHandle _fh) const;
306 void set_halfedge_handle(FaceHandle _fh, HalfedgeHandle _heh);
308
309
310 public: // Standard Property Management
311
313
314
315 // vertex
316 const Point& point(VertexHandle _vh) const;
317 void set_point(VertexHandle _vh, const Point& _p);
318 Point& point(VertexHandle _vh);
319
320 const Normal& normal(VertexHandle _vh) const;
321 void set_normal(VertexHandle _vh, const Normal& _n);
322
323 const Normal& normal(HalfedgeHandle _heh) const;
324 void set_normal(HalfedgeHandle _heh, const Normal& _n);
325
326 const Color& color(VertexHandle _vh) const;
327 void set_color(VertexHandle _vh, const Color& _c);
328
329 const TexCoord1D& texcoord1D(VertexHandle _vh) const;
330 void set_texcoord1D(VertexHandle _vh, const TexCoord1D& _t);
331
332 const TexCoord2D& texcoord2D(VertexHandle _vh) const;
333 void set_texcoord2D(VertexHandle _vh, const TexCoord2D& _t);
334
335 const TexCoord3D& texcoord3D(VertexHandle _vh) const;
336 void set_texcoord3D(VertexHandle _vh, const TexCoord3D& _t);
337
338 const TexCoord1D& texcoord1D(HalfedgeHandle _hh) const;
339 void set_texcoord1D(HalfedgeHandle _hh, const TexCoord1D& _t);
340
341 const TexCoord2D& texcoord2D(HalfedgeHandle _hh) const;
342 void set_texcoord2D(HalfedgeHandle _hh, const TexCoord2D& _t);
343
344 const TexCoord3D& texcoord3D(HalfedgeHandle _hh) const;
345 void set_texcoord3D(HalfedgeHandle _hh, const TexCoord3D& _t);
346
347 const StatusInfo& status(VertexHandle _vh) const;
348 StatusInfo& status(VertexHandle _vh);
349
350 // halfedge
351 const StatusInfo& status(HalfedgeHandle _vh) const;
352 StatusInfo& status(HalfedgeHandle _vh);
353
354 const Color& color(HalfedgeHandle _heh) const;
355 void set_color(HalfedgeHandle _heh, const Color& _c);
356
357 // edge
358 const Color& color(EdgeHandle _eh) const;
359 void set_color(EdgeHandle _eh, const Color& _c);
360
361
362 const StatusInfo& status(EdgeHandle _vh) const;
363 StatusInfo& status(EdgeHandle _vh);
364
365 // face
366 const Normal& normal(FaceHandle _fh) const;
367 void set_normal(FaceHandle _fh, const Normal& _n);
368
369 const Color& color(FaceHandle _fh) const;
370 void set_color(FaceHandle _fh, const Color& _c);
371
372 const StatusInfo& status(FaceHandle _vh) const;
373 StatusInfo& status(FaceHandle _vh);
374
376
378
379 void request_vertex_normals();
381 void request_vertex_colors();
382 void request_vertex_texcoords1D();
383 void request_vertex_texcoords2D();
384 void request_vertex_texcoords3D();
385 void request_vertex_status();
386
387 void request_halfedge_status();
388 void request_halfedge_normals();
389 void request_halfedge_colors();
390 void request_halfedge_texcoords1D();
391 void request_halfedge_texcoords2D();
392 void request_halfedge_texcoords3D();
393
394 void request_edge_status();
395 void request_edge_colors();
396
397 void request_face_normals();
398 void request_face_colors();
399 void request_face_status();
400 void request_face_texture_index();
402
404
405 void release_vertex_normals();
407 void release_vertex_colors();
408 void release_vertex_texcoords1D();
409 void release_vertex_texcoords2D();
410 void release_vertex_texcoords3D();
411 void release_vertex_status();
412
413 void release_halfedge_status();
414 void release_halfedge_normals();
415 void release_halfedge_colors();
416 void release_halfedge_texcoords1D();
417 void release_halfedge_texcoords2D();
418 void release_halfedge_texcoords3D();
419
420 void release_edge_status();
421 void release_edge_colors();
422
423 void release_face_normals();
424 void release_face_colors();
425 void release_face_status();
426 void release_face_texture_index();
428
430
431 bool has_vertex_normals() const;
433 bool has_vertex_colors() const;
434 bool has_vertex_texcoords1D() const;
435 bool has_vertex_texcoords2D() const;
436 bool has_vertex_texcoords3D() const;
437 bool has_vertex_status() const;
438
439 bool has_halfedge_status() const;
440 bool has_halfedge_normals() const;
441 bool has_halfedge_colors() const;
442 bool has_halfedge_texcoords1D() const;
443 bool has_halfedge_texcoords2D() const;
444 bool has_halfedge_texcoords3D() const;
445
446 bool has_edge_status() const;
447 bool has_edge_colors() const;
448
449 bool has_face_normals() const;
450 bool has_face_colors() const;
451 bool has_face_status() const;
452 bool has_face_texture_index() const;
454
455 public: // Property Management
456
458
460
461 template <typename T> void add_property( [VEHFM]PropHandleT<T>& _ph,
464 const std::string& _name = "" );
466
468
469 template <typename T> void remove_property( [VEHFM]PropHandleT<T>& );
472
474
475 template <typename T>
477 bool get_property_handle( [VEHFM]PropHandleT<T>& ph, const std::string& _n ) const;
479
481
482 template <typename T> PropertyT<T>& property( [VEHF]PropHandleT<T> _ph );
484 template <typename T> const PropertyT<T>& property( [VEHF]PropHandleT<T> _ph ) const;
485 template <typename T> PropertyT<T>& mproperty( MPropHandleT<T> _ph );
486 template <typename T> const PropertyT<T>& mproperty( MPropHandleT<T> _ph ) const;
488
490
491
493 template <typename T>
494 T& property( VPropHandleT<T> _ph, VertexHandle _vh );
495 template <typename T>
496 const T& property( VPropHandleT<T> _ph, VertexHandle _vh ) const;
497
498 template <typename T>
499 T& property( EPropHandleT<T> _ph, EdgeHandle _vh );
500 template <typename T>
501 const T& property( EPropHandleT<T> _ph, EdgeHandle _vh ) const;
502
503 template <typename T>
504 T& property( HPropHandleT<T> _ph, HalfedgeHandle _vh );
505 template <typename T>
506 const T& property( HPropHandleT<T> _ph, HalfedgeHandle _vh ) const;
507
508 template <typename T>
509 T& property( FPropHandleT<T> _ph, FaceHandle _vh );
510 template <typename T>
511 const T& property( FPropHandleT<T> _ph, FaceHandle _vh ) const;
512
513 template <typename T>
514 T& property( MPropHandleT<T> _ph );
515 template <typename T>
516 const T& property( MPropHandleT<T> _ph ) const;
517
519
520 public:
521
522
524
525
527 VertexHandle new_vertex();
530 VertexHandle new_vertex(const Point& _p);
533 VertexHandle new_vertex(const Vertex& _v);
539 HalfedgeHandle new_edge(VertexHandle _start_vertex_handle,
540 VertexHandle _end_vertex_handle);
541
545 FaceHandle new_face();
548 FaceHandle new_face(const Face& _f);
550
551
552 // --- iterators ---
553
555
556
558 KernelVertexIter vertices_begin();
559 KernelConstVertexIter vertices_begin() const;
560 KernelVertexIter vertices_end();
561 KernelConstVertexIter vertices_end() const;
562 KernelEdgeIter edges_begin();
563 KernelConstEdgeIter edges_begin() const;
564 KernelEdgeIter edges_end();
565 KernelConstEdgeIter edges_end() const;
566 KernelFaceIter faces_begin();
567 KernelConstFaceIter faces_begin() const;
568 KernelFaceIter faces_end();
569 KernelConstFaceIter faces_end() const;
571
572
573
574 private:
575
576
577 // --- private functions ---
578
580 KernelT(const KernelT& _rhs);
581 };
582 };
583
584
585 //=============================================================================
586 } // namespace Concepts
587 } // namespace OpenMesh
588 //=============================================================================
OpenMesh
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:59
OpenMesh::Attributes::Normal
@ Normal
Add normals to mesh item (vertices/faces)
Definition: Attributes.hh:82
OpenMesh::Attributes::TexCoord2D
@ TexCoord2D
Add 2D texture coordinates (vertices, halfedges)
Definition: Attributes.hh:87
OpenMesh::Attributes::TexCoord1D
@ TexCoord1D
Add 1D texture coordinates (vertices, halfedges)
Definition: Attributes.hh:86
OpenMesh::Attributes::TexCoord3D
@ TexCoord3D
Add 3D texture coordinates (vertices, halfedges)
Definition: Attributes.hh:88
OpenMesh::Attributes::Color
@ Color
Add colors to mesh item (vertices/faces/edges)
Definition: Attributes.hh:83
OpenMesh::Concepts::KernelT
This class describes the minimum interface a mesh kernel has to implement (because the resulting mesh...
Definition: MeshKernel.hh:76
OpenMesh::Concepts::KernelT::prev_halfedge_handle
HalfedgeHandle prev_halfedge_handle(HalfedgeHandle _heh) const
Get the previous halfedge of the given halfedge.
OpenMesh::Concepts::KernelT::texcoord2D
const TexCoord2D & texcoord2D(HalfedgeHandle _hh) const
Get texture coordinate of the to vertex for the current face (per face per vertex texcoords)
OpenMesh::Concepts::KernelT::vertex
const Vertex & vertex(VertexHandle _h) const
Translate handle to item (see also OpenMesh::PolyMeshT::deref())
Definition: MeshKernel.hh:144
OpenMesh::Concepts::KernelT::has_halfedge_colors
bool has_halfedge_colors() const
Is property available?
OpenMesh::Concepts::KernelT::set_color
void set_color(FaceHandle _fh, const Color &_c)
Set color.
OpenMesh::Concepts::KernelT::request_vertex_texcoords2D
void request_vertex_texcoords2D()
Request property.
OpenMesh::Concepts::KernelT::set_halfedge_handle
void set_halfedge_handle(FaceHandle _fh, HalfedgeHandle _heh)
Set one halfedge of the face.
OpenMesh::Concepts::KernelT::request_halfedge_texcoords3D
void request_halfedge_texcoords3D()
Request property.
OpenMesh::Concepts::KernelT::has_face_normals
bool has_face_normals() const
Is property available?
OpenMesh::Concepts::KernelT::normal
const Normal & normal(HalfedgeHandle _heh) const
Get normal of the to vertex of the given Halfedge (per face per vertex normals)
OpenMesh::Concepts::KernelT::request_halfedge_colors
void request_halfedge_colors()
Request property.
OpenMesh::Concepts::KernelT::remove_last_face
void remove_last_face()
Remove the last face imidiately, i.e.
Definition: MeshKernel.hh:209
OpenMesh::Concepts::KernelT::request_vertex_normals
void request_vertex_normals()
Request property.
OpenMesh::Concepts::KernelT::vertex
Vertex & vertex(VertexHandle _h)
Translate handle to item (see also OpenMesh::PolyMeshT::deref())
Definition: MeshKernel.hh:145
OpenMesh::Concepts::KernelT::set_normal
void set_normal(HalfedgeHandle _heh, const Normal &_n)
Set normal of the to vertex of the given Halfedge (per face per vertex normals)
OpenMesh::Concepts::KernelT::release_halfedge_colors
void release_halfedge_colors()
Remove property.
OpenMesh::Concepts::KernelT::texcoord1D
const TexCoord1D & texcoord1D(VertexHandle _vh) const
Get texture coordinate.
OpenMesh::Concepts::KernelT::set_point
void set_point(Vertex &_v, const Point &_p)
Set the coordinate of a vertex.
OpenMesh::Concepts::KernelT::n_edges
size_t n_edges() const
Returns number of edges.
OpenMesh::Concepts::KernelT::Scalar
FinalMeshItems::Scalar Scalar
Derive this type from the FinalMeshItems.
Definition: MeshKernel.hh:88
OpenMesh::Concepts::KernelT::request_halfedge_status
void request_halfedge_status()
Request property.
OpenMesh::Concepts::KernelT::KernelFaceIter
SomeIterator KernelFaceIter
This type depends on the container type in use.
Definition: MeshKernel.hh:107
OpenMesh::Concepts::KernelT::status
const StatusInfo & status(FaceHandle _vh) const
Get status.
OpenMesh::Concepts::KernelT::set_texcoord3D
void set_texcoord3D(HalfedgeHandle _hh, const TexCoord3D &_t)
Set texture coordinate of the to vertex of the given Halfedge (per face per vertex texcoords)
OpenMesh::Concepts::KernelT::vertex_handle
VertexHandle vertex_handle(unsigned int _i) const
Get the i'th item.
OpenMesh::Concepts::KernelT::Color
FinalMeshItems::Color Color
Derive this type from the FinalMeshItems.
Definition: MeshKernel.hh:90
OpenMesh::Concepts::KernelT::property
const T & property(FPropHandleT< T > _ph, FaceHandle _vh) const
Get value for item represented by the handle.
OpenMesh::Concepts::KernelT::texcoord2D
const TexCoord2D & texcoord2D(VertexHandle _vh) const
Get texture coordinate.
OpenMesh::Concepts::KernelT::ccw_rotated_halfedge_handle
HalfedgeHandle ccw_rotated_halfedge_handle(HalfedgeHandle _heh) const
Counter-clockwise rotate the given halfedge around its from vertex.
OpenMesh::Concepts::KernelT::faces_begin
KernelFaceIter faces_begin()
Kernel item iterator.
OpenMesh::Concepts::KernelT::release_halfedge_texcoords3D
void release_halfedge_texcoords3D()
Remove property.
OpenMesh::Concepts::KernelT::has_edge_colors
bool has_edge_colors() const
Is property available?
OpenMesh::Concepts::KernelT::normal
const Normal & normal(VertexHandle _vh) const
Get normal.
OpenMesh::Concepts::KernelT::KernelConstVertexIter
SomeIterator KernelConstVertexIter
This type depends on the container type in use.
Definition: MeshKernel.hh:104
OpenMesh::Concepts::KernelT::request_edge_status
void request_edge_status()
Request property.
OpenMesh::Concepts::KernelT::clear
void clear()
Delete all items, i.e.
OpenMesh::Concepts::KernelT::faces_end
KernelConstFaceIter faces_end() const
Kernel item iterator.
OpenMesh::Concepts::KernelT::point
const Point & point(const Vertex &_v) const
Get the coordinate of a vertex.
OpenMesh::Concepts::KernelT::point
const Point & point(VertexHandle _vh) const
Get the coordinate of a vertex.
OpenMesh::Concepts::KernelT::release_vertex_colors
void release_vertex_colors()
Remove property.
OpenMesh::Concepts::KernelT::KernelEdgeIter
SomeIterator KernelEdgeIter
This type depends on the container type in use.
Definition: MeshKernel.hh:105
OpenMesh::Concepts::KernelT::remove_last_vertex
void remove_last_vertex()
Remove the last vertex imidiately, i.e.
Definition: MeshKernel.hh:201
OpenMesh::Concepts::KernelT::new_face
FaceHandle new_face()
Adding a new face.
OpenMesh::Concepts::KernelT::normal
const Normal & normal(FaceHandle _fh) const
Get normal.
OpenMesh::Concepts::KernelT::set_texcoord2D
void set_texcoord2D(HalfedgeHandle _hh, const TexCoord2D &_t)
Set texture coordinate of the to vertex of the given Halfedge (per face per vertex texcoords)
OpenMesh::Concepts::KernelT::status
StatusInfo & status(FaceHandle _vh)
Get status.
OpenMesh::Concepts::KernelT::KernelConstEdgeIter
SomeIterator KernelConstEdgeIter
This type depends on the container type in use.
Definition: MeshKernel.hh:106
OpenMesh::Concepts::KernelT::release_face_texture_index
void release_face_texture_index()
Remove property.
OpenMesh::Concepts::KernelT::release_face_normals
void release_face_normals()
Remove property.
OpenMesh::Concepts::KernelT::halfedge
const Halfedge & halfedge(HalfedgeHandle _h) const
Translate handle to item (see also OpenMesh::PolyMeshT::deref())
Definition: MeshKernel.hh:146
OpenMesh::Concepts::KernelT::status
const StatusInfo & status(EdgeHandle _vh) const
Get status.
OpenMesh::Concepts::KernelT::vertices_empty
bool vertices_empty() const
Is the vertex container empty?
OpenMesh::Concepts::KernelT::EdgeHandle
FinalMeshItems::EdgeHandle EdgeHandle
Derive this type from the FinalMeshItems.
Definition: MeshKernel.hh:94
OpenMesh::Concepts::KernelT::release_vertex_normals
void release_vertex_normals()
Remove property.
OpenMesh::Concepts::KernelT::set_color
void set_color(VertexHandle _vh, const Color &_c)
Set color.
OpenMesh::Concepts::KernelT::face_handle
FaceHandle face_handle(unsigned int _i) const
Get the i'th item.
OpenMesh::Concepts::KernelT::request_face_colors
void request_face_colors()
Request property.
OpenMesh::Concepts::KernelT::property
PropertyT< T > & property([VEHF]PropHandleT< T > _ph)
Get property.
OpenMesh::Concepts::KernelT::release_halfedge_texcoords2D
void release_halfedge_texcoords2D()
Remove property.
OpenMesh::Concepts::KernelT::request_face_texture_index
void request_face_texture_index()
Request property.
OpenMesh::Concepts::KernelT::mproperty
PropertyT< T > & mproperty(MPropHandleT< T > _ph)
Get property.
OpenMesh::Concepts::KernelT::faces_begin
KernelConstFaceIter faces_begin() const
Kernel item iterator.
OpenMesh::Concepts::KernelT::new_edge
HalfedgeHandle new_edge(VertexHandle _start_vertex_handle, VertexHandle _end_vertex_handle)
Add a new edge from _start_vertex_handle to _end_vertex_handle.
OpenMesh::Concepts::KernelT::set_texcoord1D
void set_texcoord1D(VertexHandle _vh, const TexCoord1D &_t)
Set texture coordinate.
OpenMesh::Concepts::KernelT::texcoord1D
const TexCoord1D & texcoord1D(HalfedgeHandle _hh) const
Get texture coordinate of the to vertex for the current face (per face per vertex texcoords)
OpenMesh::Concepts::KernelT::vertices_end
KernelVertexIter vertices_end()
Kernel item iterator.
OpenMesh::Concepts::KernelT::request_halfedge_texcoords2D
void request_halfedge_texcoords2D()
Request property.
OpenMesh::Concepts::KernelT::property
const T & property(EPropHandleT< T > _ph, EdgeHandle _vh) const
Get value for item represented by the handle.
OpenMesh::Concepts::KernelT::request_vertex_status
void request_vertex_status()
Request property.
OpenMesh::Concepts::KernelT::TexCoord
FinalMeshItems::TexCoord TexCoord
Derive this type from the FinalMeshItems.
Definition: MeshKernel.hh:91
OpenMesh::Concepts::KernelT::add_property
void add_property([VEHFM]PropHandleT< T > &_ph, const std::string &_name="")
Add property.
OpenMesh::Concepts::KernelT::request_vertex_colors
void request_vertex_colors()
Request property.
OpenMesh::Concepts::KernelT::new_vertex
VertexHandle new_vertex(const Vertex &_v)
Add a new vertex (copied from the given one).
OpenMesh::Concepts::KernelT::~KernelT
~KernelT()
Destructor.
OpenMesh::Concepts::KernelT::color
const Color & color(EdgeHandle _eh) const
Get color.
OpenMesh::Concepts::KernelT::edge_handle
EdgeHandle edge_handle(HalfedgeHandle _heh) const
Get the edge the current halfedge it contained in.
OpenMesh::Concepts::KernelT::texcoord3D
const TexCoord3D & texcoord3D(HalfedgeHandle _hh) const
Get texture coordinate of the to vertex for the current face (per face per vertex texcoords)
OpenMesh::Concepts::KernelT::edge
Edge & edge(EdgeHandle _h)
Translate handle to item (see also OpenMesh::PolyMeshT::deref())
Definition: MeshKernel.hh:149
OpenMesh::Concepts::KernelT::get_property_handle
bool get_property_handle([VEHFM]PropHandleT< T > &ph, const std::string &_n) const
Get property handle by name.
OpenMesh::Concepts::KernelT::new_vertex
VertexHandle new_vertex(const Point &_p)
Add a new vertex with a given point coordinate.
OpenMesh::Concepts::KernelT::release_vertex_texcoords1D
void release_vertex_texcoords1D()
Remove property.
OpenMesh::Concepts::KernelT::KernelConstFaceIter
SomeIterator KernelConstFaceIter
This type depends on the container type in use.
Definition: MeshKernel.hh:108
OpenMesh::Concepts::KernelT::property
T & property(EPropHandleT< T > _ph, EdgeHandle _vh)
Get value for item represented by the handle.
OpenMesh::Concepts::KernelT::face_handle
FaceHandle face_handle(HalfedgeHandle _heh) const
Get the face the halfedge belongs to.
OpenMesh::Concepts::KernelT::release_vertex_status
void release_vertex_status()
Remove property.
OpenMesh::Concepts::KernelT::halfedge_handle
HalfedgeHandle halfedge_handle(unsigned int _i) const
Get the i'th item.
OpenMesh::Concepts::KernelT::opposite_halfedge_handle
HalfedgeHandle opposite_halfedge_handle(HalfedgeHandle _heh) const
Get the opposite halfedge.
OpenMesh::Concepts::KernelT::handle
HalfedgeHandle handle(const Halfedge &_he) const
Translate item to handle.
OpenMesh::Concepts::KernelT::vertices_begin
KernelConstVertexIter vertices_begin() const
Kernel item iterator.
OpenMesh::Concepts::KernelT::Halfedge
FinalMeshItems::Halfedge Halfedge
Derive this type from the FinalMeshItems.
Definition: MeshKernel.hh:84
OpenMesh::Concepts::KernelT::garbage_collection
void garbage_collection()
Remove all items that are marked as deleted from the corresponding containers.
OpenMesh::Concepts::KernelT::set_halfedge_handle
void set_halfedge_handle(VertexHandle _vh, HalfedgeHandle _heh)
Set the outgoing halfedge handle of a given vertex.
OpenMesh::Concepts::KernelT::release_edge_colors
void release_edge_colors()
Remove property.
OpenMesh::Concepts::KernelT::property
const PropertyT< T > & property([VEHF]PropHandleT< T > _ph) const
Get property.
OpenMesh::Concepts::KernelT::has_face_texture_index
bool has_face_texture_index() const
Is property available?
OpenMesh::Concepts::KernelT::handle
FaceHandle handle(const Face &_f) const
Translate item to handle.
OpenMesh::Concepts::KernelT::n_vertices
size_t n_vertices() const
Returns number of vertices.
OpenMesh::Concepts::KernelT::KernelT
KernelT()
Default constructor.
Definition: MeshKernel.hh:114
OpenMesh::Concepts::KernelT::KernelVertexIter
SomeIterator KernelVertexIter
This type depends on the container type in use.
Definition: MeshKernel.hh:103
OpenMesh::Concepts::KernelT::new_face
FaceHandle new_face(const Face &_f)
Adding a new face (copied from a _f).
OpenMesh::Concepts::KernelT::faces_end
KernelFaceIter faces_end()
Kernel item iterator.
OpenMesh::Concepts::KernelT::property
T & property(MPropHandleT< T > _ph)
Get value for item represented by the handle.
OpenMesh::Concepts::KernelT::status
const StatusInfo & status(HalfedgeHandle _vh) const
Get status.
OpenMesh::Concepts::KernelT::property
const T & property(VPropHandleT< T > _ph, VertexHandle _vh) const
Get value for item represented by the handle.
OpenMesh::Concepts::KernelT::has_vertex_colors
bool has_vertex_colors() const
Is property available?
OpenMesh::Concepts::KernelT::has_halfedge_status
bool has_halfedge_status() const
Is property available?
OpenMesh::Concepts::KernelT::edges_begin
KernelConstEdgeIter edges_begin() const
Kernel item iterator.
OpenMesh::Concepts::KernelT::cw_rotated_halfedge_handle
HalfedgeHandle cw_rotated_halfedge_handle(HalfedgeHandle _heh) const
Clockwise rotate the given halfedge around its from vertex.
OpenMesh::Concepts::KernelT::release_face_status
void release_face_status()
Remove property.
OpenMesh::Concepts::KernelT::status
const StatusInfo & status(VertexHandle _vh) const
Get status.
OpenMesh::Concepts::KernelT::vertices_end
KernelConstVertexIter vertices_end() const
Kernel item iterator.
OpenMesh::Concepts::KernelT::new_vertex
VertexHandle new_vertex()
Add a new (default) vertex.
OpenMesh::Concepts::KernelT::edges_begin
KernelEdgeIter edges_begin()
Kernel item iterator.
OpenMesh::Concepts::KernelT::request_vertex_texcoords1D
void request_vertex_texcoords1D()
Request property.
OpenMesh::Concepts::KernelT::color
const Color & color(VertexHandle _vh) const
Get color.
OpenMesh::Concepts::KernelT::set_texcoord1D
void set_texcoord1D(HalfedgeHandle _hh, const TexCoord1D &_t)
Set texture coordinate of the to vertex of the given Halfedge (per face per vertex texcoords)
OpenMesh::Concepts::KernelT::release_halfedge_normals
void release_halfedge_normals()
Remove property.
OpenMesh::Concepts::KernelT::request_vertex_texcoords3D
void request_vertex_texcoords3D()
Request property.
OpenMesh::Concepts::KernelT::property
const T & property(MPropHandleT< T > _ph) const
Get value for item represented by the handle.
OpenMesh::Concepts::KernelT::edges_end
KernelConstEdgeIter edges_end() const
Kernel item iterator.
OpenMesh::Concepts::KernelT::has_vertex_normals
bool has_vertex_normals() const
Is property available?
OpenMesh::Concepts::KernelT::edge_handle
EdgeHandle edge_handle(unsigned int _i) const
Get the i'th item.
OpenMesh::Concepts::KernelT::has_face_status
bool has_face_status() const
Is property available?
OpenMesh::Concepts::KernelT::release_face_colors
void release_face_colors()
Remove property.
OpenMesh::Concepts::KernelT::property
T & property(FPropHandleT< T > _ph, FaceHandle _vh)
Get value for item represented by the handle.
OpenMesh::Concepts::KernelT::has_halfedge_normals
bool has_halfedge_normals() const
Is property available?
OpenMesh::Concepts::KernelT::release_edge_status
void release_edge_status()
Remove property.
OpenMesh::Concepts::KernelT::set_vertex_handle
void set_vertex_handle(HalfedgeHandle _heh, VertexHandle _vh)
Set the to-vertex-handle of the halfedge.
OpenMesh::Concepts::KernelT::set_face_handle
void set_face_handle(HalfedgeHandle _heh, FaceHandle _fh)
Set the face the halfedge belongs to.
OpenMesh::Concepts::KernelT::point
Point & point(VertexHandle _vh)
Convenience function.
OpenMesh::Concepts::KernelT::has_halfedge_texcoords1D
bool has_halfedge_texcoords1D() const
Is property available?
OpenMesh::Concepts::KernelT::FaceHandle
FinalMeshItems::FaceHandle FaceHandle
Derive this type from the FinalMeshItems.
Definition: MeshKernel.hh:95
OpenMesh::Concepts::KernelT::set_next_halfedge_handle
void set_next_halfedge_handle(HalfedgeHandle _heh, HalfedgeHandle _nheh)
Set the next halfedge handle.
OpenMesh::Concepts::KernelT::has_edge_status
bool has_edge_status() const
Is property available?
OpenMesh::Concepts::KernelT::set_normal
void set_normal(FaceHandle _fh, const Normal &_n)
Set normal.
OpenMesh::Concepts::KernelT::HalfedgeHandle
FinalMeshItems::HalfedgeHandle HalfedgeHandle
Derive this type from the FinalMeshItems.
Definition: MeshKernel.hh:93
OpenMesh::Concepts::KernelT::edge
const Edge & edge(EdgeHandle _h) const
Translate handle to item (see also OpenMesh::PolyMeshT::deref())
Definition: MeshKernel.hh:148
OpenMesh::Concepts::KernelT::set_point
void set_point(VertexHandle _vh, const Point &_p)
Set the coordinate of a vertex.
OpenMesh::Concepts::KernelT::edges_empty
bool edges_empty() const
Is the edge container empty?
OpenMesh::Concepts::KernelT::release_halfedge_status
void release_halfedge_status()
Remove property.
OpenMesh::Concepts::KernelT::request_face_status
void request_face_status()
Request property.
OpenMesh::Concepts::KernelT::set_normal
void set_normal(VertexHandle _vh, const Normal &_n)
Set normal.
OpenMesh::Concepts::KernelT::status
StatusInfo & status(VertexHandle _vh)
Get status.
OpenMesh::Concepts::KernelT::release_halfedge_texcoords1D
void release_halfedge_texcoords1D()
Remove property.
OpenMesh::Concepts::KernelT::reserve
void reserve(size_t _n_vertices, size_t _n_edges, size_t _n_faces)
Reserve memory for vertices, edges, faces.
OpenMesh::Concepts::KernelT::color
const Color & color(FaceHandle _fh) const
Get color.
OpenMesh::Concepts::KernelT::clean
void clean()
Delete all items, i.e.
OpenMesh::Concepts::KernelT::vertices_begin
KernelVertexIter vertices_begin()
Kernel item iterator.
OpenMesh::Concepts::KernelT::handle
VertexHandle handle(const Vertex &_v) const
Translate item to handle.
OpenMesh::Concepts::KernelT::has_face_colors
bool has_face_colors() const
Is property available?
OpenMesh::Concepts::KernelT::has_halfedge_texcoords3D
bool has_halfedge_texcoords3D() const
Is property available?
OpenMesh::Concepts::KernelT::mproperty
const PropertyT< T > & mproperty(MPropHandleT< T > _ph) const
Get property.
OpenMesh::Concepts::KernelT::release_vertex_texcoords3D
void release_vertex_texcoords3D()
Remove property.
OpenMesh::Concepts::KernelT::set_color
void set_color(EdgeHandle _eh, const Color &_c)
Set color.
OpenMesh::Concepts::KernelT::next_halfedge_handle
HalfedgeHandle next_halfedge_handle(HalfedgeHandle _heh) const
Get the next halfedge handle.
OpenMesh::Concepts::KernelT::handle
EdgeHandle handle(const Edge &_e) const
Translate item to handle.
OpenMesh::Concepts::KernelT::has_vertex_texcoords1D
bool has_vertex_texcoords1D() const
Is property available?
OpenMesh::Concepts::KernelT::has_vertex_status
bool has_vertex_status() const
Is property available?
OpenMesh::Concepts::KernelT::VertexHandle
FinalMeshItems::VertexHandle VertexHandle
Derive this type from the FinalMeshItems.
Definition: MeshKernel.hh:92
OpenMesh::Concepts::KernelT::status
StatusInfo & status(HalfedgeHandle _vh)
Get status.
OpenMesh::Concepts::KernelT::halfedges_empty
bool halfedges_empty() const
Is the halfedge container empty (should be the same as edges_empty()).
OpenMesh::Concepts::KernelT::from_vertex_handle
VertexHandle from_vertex_handle(HalfedgeHandle _heh) const
Get the vertex the halfedge starts from (implemented as to-handle of the opposite halfedge,...
OpenMesh::Concepts::KernelT::remove_last_edge
void remove_last_edge()
Remove the last edge imidiately, i.e.
Definition: MeshKernel.hh:205
OpenMesh::Concepts::KernelT::has_vertex_texcoords2D
bool has_vertex_texcoords2D() const
Is property available?
OpenMesh::Concepts::KernelT::remove_property
void remove_property([VEHFM]PropHandleT< T > &)
Remove property.
OpenMesh::Concepts::KernelT::set_texcoord2D
void set_texcoord2D(VertexHandle _vh, const TexCoord2D &_t)
Set texture coordinate.
OpenMesh::Concepts::KernelT::set_color
void set_color(HalfedgeHandle _heh, const Color &_c)
Set color.
OpenMesh::Concepts::KernelT::status
StatusInfo & status(EdgeHandle _vh)
Get status.
OpenMesh::Concepts::KernelT::Point
FinalMeshItems::Point Point
Derive this type from the FinalMeshItems.
Definition: MeshKernel.hh:87
OpenMesh::Concepts::KernelT::operator=
KernelT & operator=(const KernelT &_rhs)
Assignment operator.
OpenMesh::Concepts::KernelT::Normal
FinalMeshItems::Normal Normal
Derive this type from the FinalMeshItems.
Definition: MeshKernel.hh:89
OpenMesh::Concepts::KernelT::property
T & property(HPropHandleT< T > _ph, HalfedgeHandle _vh)
Get value for item represented by the handle.
OpenMesh::Concepts::KernelT::release_vertex_texcoords2D
void release_vertex_texcoords2D()
Remove property.
OpenMesh::Concepts::KernelT::property
T & property(VPropHandleT< T > _ph, VertexHandle _vh)
Get value for item represented by the handle.
OpenMesh::Concepts::KernelT::texcoord3D
const TexCoord3D & texcoord3D(VertexHandle _vh) const
Get texture coordinate.
OpenMesh::Concepts::KernelT::faces_empty
bool faces_empty() const
Is the face container empty?
OpenMesh::Concepts::KernelT::request_halfedge_normals
void request_halfedge_normals()
Request property.
OpenMesh::Concepts::KernelT::halfedge
Halfedge & halfedge(HalfedgeHandle _h)
Translate handle to item (see also OpenMesh::PolyMeshT::deref())
Definition: MeshKernel.hh:147
OpenMesh::Concepts::KernelT::has_halfedge_texcoords2D
bool has_halfedge_texcoords2D() const
Is property available?
OpenMesh::Concepts::KernelT::Edge
FinalMeshItems::Edge Edge
Derive this type from the FinalMeshItems.
Definition: MeshKernel.hh:85
OpenMesh::Concepts::KernelT::n_faces
size_t n_faces() const
Returns number of faces.
OpenMesh::Concepts::KernelT::face
const Face & face(FaceHandle _h) const
Translate handle to item (see also OpenMesh::PolyMeshT::deref())
Definition: MeshKernel.hh:150
OpenMesh::Concepts::KernelT::color
const Color & color(HalfedgeHandle _heh) const
Get color.
OpenMesh::Concepts::KernelT::Vertex
FinalMeshItems::Vertex Vertex
Derive this type from the FinalMeshItems.
Definition: MeshKernel.hh:83
OpenMesh::Concepts::KernelT::face
Face & face(FaceHandle _h)
Translate handle to item (see also OpenMesh::PolyMeshT::deref())
Definition: MeshKernel.hh:151
OpenMesh::Concepts::KernelT::edges_end
KernelEdgeIter edges_end()
Kernel item iterator.
OpenMesh::Concepts::KernelT::request_edge_colors
void request_edge_colors()
Request property.
OpenMesh::Concepts::KernelT::request_halfedge_texcoords1D
void request_halfedge_texcoords1D()
Request property.
OpenMesh::Concepts::KernelT::n_halfedges
size_t n_halfedges() const
Returns number of halfedges (should be 2*n_edges())
OpenMesh::Concepts::KernelT::property
const T & property(HPropHandleT< T > _ph, HalfedgeHandle _vh) const
Get value for item represented by the handle.
OpenMesh::Concepts::KernelT::Face
FinalMeshItems::Face Face
Derive this type from the FinalMeshItems.
Definition: MeshKernel.hh:86
OpenMesh::Concepts::KernelT::request_face_normals
void request_face_normals()
Request property.
OpenMesh::Concepts::KernelT::has_vertex_texcoords3D
bool has_vertex_texcoords3D() const
Is property available?
OpenMesh::Concepts::KernelT::to_vertex_handle
VertexHandle to_vertex_handle(HalfedgeHandle _heh) const
Get the vertex the halfedge points to.
OpenMesh::Concepts::KernelT::set_texcoord3D
void set_texcoord3D(VertexHandle _vh, const TexCoord3D &_t)
Set texture coordinate.
OpenMesh::VertexHandle
Handle for a vertex entity.
Definition: Handles.hh:121
OpenMesh::PropertyT
Default property class for any type T.
Definition: Property.hh:93
OpenMesh::VPropHandleT
Handle representing a vertex property.
Definition: Property.hh:417
OpenMesh::HPropHandleT
Handle representing a halfedge property.
Definition: Property.hh:432
OpenMesh::EPropHandleT
Handle representing an edge property.
Definition: Property.hh:447
OpenMesh::FPropHandleT
Handle representing a face property.
Definition: Property.hh:462
OpenMesh::MPropHandleT
Handle representing a mesh property.
Definition: Property.hh:477