58 #error this file is for documentation purposes only 83 template <
class FinalMeshItems>
class KernelT 91 typedef typename FinalMeshItems::Vertex
Vertex;
92 typedef typename FinalMeshItems::Halfedge
Halfedge;
93 typedef typename FinalMeshItems::Edge
Edge;
94 typedef typename FinalMeshItems::Face
Face;
95 typedef typename FinalMeshItems::Point
Point;
96 typedef typename FinalMeshItems::Scalar
Scalar;
99 typedef typename FinalMeshItems::TexCoord
TexCoord;
144 void reserve(
size_t _n_vertices,
151 const Vertex&
vertex(VertexHandle _h)
const {
return deref(_h); }
153 Vertex&
vertex(VertexHandle _h) {
return deref(_h); }
154 const Halfedge&
halfedge(HalfedgeHandle _h)
const {
return deref(_h); }
155 Halfedge&
halfedge(HalfedgeHandle _h) {
return deref(_h); }
156 const Edge&
edge(EdgeHandle _h)
const {
return deref(_h); }
157 Edge&
edge(EdgeHandle _h) {
return deref(_h); }
158 const Face&
face(FaceHandle _h)
const {
return deref(_h); }
159 Face&
face(FaceHandle _h) {
return deref(_h); }
165 VertexHandle
handle(
const Vertex& _v)
const;
167 HalfedgeHandle
handle(
const Halfedge& _he)
const;
168 EdgeHandle
handle(
const Edge& _e)
const;
169 FaceHandle
handle(
const Face& _f)
const;
253 const Point&
point(VertexHandle _vh)
const;
255 const Point&
point(
const Vertex& _v)
const;
257 void set_point(VertexHandle _vh,
const Point& _p);
259 void set_point(Vertex& _v,
const Point& _p);
324 const Point&
point(VertexHandle _vh)
const;
325 void set_point(VertexHandle _vh,
const Point& _p);
326 Point&
point(VertexHandle _vh);
328 const Normal&
normal(VertexHandle _vh)
const;
329 void set_normal(VertexHandle _vh,
const Normal& _n);
331 const Normal&
normal(HalfedgeHandle _heh)
const;
332 void set_normal(HalfedgeHandle _heh,
const Normal& _n);
334 const Color&
color(VertexHandle _vh)
const;
335 void set_color(VertexHandle _vh,
const Color& _c);
355 const StatusInfo&
status(VertexHandle _vh)
const;
356 StatusInfo&
status(VertexHandle _vh);
359 const StatusInfo&
status(HalfedgeHandle _vh)
const;
360 StatusInfo&
status(HalfedgeHandle _vh);
362 const Color&
color(HalfedgeHandle _heh)
const;
363 void set_color(HalfedgeHandle _heh,
const Color& _c);
366 const Color&
color(EdgeHandle _eh)
const;
367 void set_color(EdgeHandle _eh,
const Color& _c);
370 const StatusInfo&
status(EdgeHandle _vh)
const;
371 StatusInfo&
status(EdgeHandle _vh);
374 const Normal&
normal(FaceHandle _fh)
const;
375 void set_normal(FaceHandle _fh,
const Normal& _n);
377 const Color&
color(FaceHandle _fh)
const;
378 void set_color(FaceHandle _fh,
const Color& _c);
380 const StatusInfo&
status(FaceHandle _vh)
const;
381 StatusInfo&
status(FaceHandle _vh);
469 template <
typename T>
void add_property( [VEHFM]PropHandleT<T>& _ph,
472 const std::string& _name =
"" );
483 template <
typename T>
501 template <
typename T>
503 template <
typename T>
506 template <
typename T>
508 template <
typename T>
511 template <
typename T>
513 template <
typename T>
516 template <
typename T>
518 template <
typename T>
521 template <
typename T>
523 template <
typename T>
547 HalfedgeHandle
new_edge(VertexHandle _start_vertex_handle,
548 VertexHandle _end_vertex_handle);
556 FaceHandle
new_face(
const Face& _f);
bool has_halfedge_status() const
Is property available?
void request_face_colors()
Request property.
void release_halfedge_status()
Remove property.
const Color & color(VertexHandle _vh) const
Get color.
bool has_face_status() const
Is property available?
KernelVertexIter vertices_begin()
Kernel item iterator.
Handle representing an edge property.
Definition: Property.hh:515
bool has_vertex_texcoords3D() const
Is property available?
size_t n_vertices() const
Returns number of vertices.
void release_vertex_colors()
Remove property.
bool vertices_empty() const
Is the vertex container empty?
const Point & point(VertexHandle _vh) const
Get the coordinate of a vertex.
bool edges_empty() const
Is the edge container empty?
void release_edge_status()
Remove property.
void release_edge_colors()
Remove property.
const TexCoord2D & texcoord2D(VertexHandle _vh) const
Get texture coordinate.
void release_face_texture_index()
Remove property.
void set_face_handle(HalfedgeHandle _heh, FaceHandle _fh)
Set the face the halfedge belongs to.
bool has_face_normals() const
Is property available?
bool has_vertex_normals() const
Is property available?
FinalMeshItems::Vertex Vertex
Derive this type from the FinalMeshItems.
Definition: MeshKernel.hh:91
KernelEdgeIter edges_end()
Kernel item iterator.
bool has_face_texture_index() const
Is property available?
void request_halfedge_normals()
Request property.
void release_vertex_status()
Remove property.
void request_halfedge_colors()
Request property.
bool get_property_handle([VEHFM]PropHandleT< T > &ph, const std::string &_n) const
Get property handle by name.
size_t n_edges() const
Returns number of edges.
void request_halfedge_texcoords1D()
Request property.
void set_texcoord2D(VertexHandle _vh, const TexCoord2D &_t)
Set texture coordinate.
Default property class for any type T.
Definition: Property.hh:94
void release_face_normals()
Remove property.
Add 1D texture coordinates (vertices, halfedges)
Definition: Attributes.hh:91
const TexCoord3D & texcoord3D(VertexHandle _vh) const
Get texture coordinate.
Vertex & vertex(VertexHandle _h)
Translate handle to item (see also OpenMesh::PolyMeshT::deref())
Definition: MeshKernel.hh:153
void request_vertex_normals()
Request property.
void request_vertex_colors()
Request property.
void request_vertex_texcoords1D()
Request property.
VertexHandle from_vertex_handle(HalfedgeHandle _heh) const
Get the vertex the halfedge starts from (implemented as to-handle of the opposite halfedge...
void release_face_status()
Remove property.
void set_texcoord1D(VertexHandle _vh, const TexCoord1D &_t)
Set texture coordinate.
FaceHandle face_handle(unsigned int _i) const
Get the i'th item.
bool has_halfedge_texcoords1D() const
Is property available?
const Normal & normal(VertexHandle _vh) const
Get normal.
void request_face_normals()
Request property.
void request_face_texture_index()
Request property.
VertexHandle vertex_handle(unsigned int _i) const
Get the i'th item.
void clean()
Delete all items, i.e.
void remove_property([VEHFM]PropHandleT< T > &)
Remove property.
SomeIterator KernelConstVertexIter
This type depends on the container type in use.
Definition: MeshKernel.hh:112
HalfedgeHandle halfedge_handle(unsigned int _i) const
Get the i'th item.
KernelT()
Default constructor.
Definition: MeshKernel.hh:122
VertexHandle handle(const Vertex &_v) const
Translate item to handle.
void set_color(VertexHandle _vh, const Color &_c)
Set color.
bool has_vertex_texcoords2D() const
Is property available?
void release_vertex_normals()
Remove property.
bool has_halfedge_texcoords3D() const
Is property available?
HalfedgeHandle next_halfedge_handle(HalfedgeHandle _heh) const
Get the next halfedge handle.
bool has_vertex_status() const
Is property available?
void request_halfedge_texcoords3D()
Request property.
SomeIterator KernelConstFaceIter
This type depends on the container type in use.
Definition: MeshKernel.hh:116
void release_vertex_texcoords2D()
Remove property.
void request_edge_colors()
Request property.
void remove_last_edge()
Remove the last edge imidiately, i.e.
Definition: MeshKernel.hh:213
bool has_face_colors() const
Is property available?
FinalMeshItems::EdgeHandle EdgeHandle
Derive this type from the FinalMeshItems.
Definition: MeshKernel.hh:102
SomeIterator KernelVertexIter
This type depends on the container type in use.
Definition: MeshKernel.hh:111
bool has_edge_colors() const
Is property available?
void set_point(VertexHandle _vh, const Point &_p)
Set the coordinate of a vertex.
size_t n_faces() const
Returns number of faces.
FinalMeshItems::VertexHandle VertexHandle
Derive this type from the FinalMeshItems.
Definition: MeshKernel.hh:100
KernelVertexIter vertices_end()
Kernel item iterator.
void release_halfedge_texcoords2D()
Remove property.
KernelT & operator=(const KernelT &_rhs)
Assignment operator.
FinalMeshItems::Normal Normal
Derive this type from the FinalMeshItems.
Definition: MeshKernel.hh:97
Halfedge & halfedge(HalfedgeHandle _h)
Translate handle to item (see also OpenMesh::PolyMeshT::deref())
Definition: MeshKernel.hh:155
Add 2D texture coordinates (vertices, halfedges)
Definition: Attributes.hh:92
void request_face_status()
Request property.
Handle representing a halfedge property.
Definition: Property.hh:501
bool has_halfedge_texcoords2D() const
Is property available?
void request_halfedge_texcoords2D()
Request property.
bool has_vertex_texcoords1D() const
Is property available?
void release_halfedge_colors()
Remove property.
const Halfedge & halfedge(HalfedgeHandle _h) const
Translate handle to item (see also OpenMesh::PolyMeshT::deref())
Definition: MeshKernel.hh:154
size_t n_halfedges() const
Returns number of halfedges (should be 2*n_edges())
VertexHandle to_vertex_handle(HalfedgeHandle _heh) const
Get the vertex the halfedge points to.
SomeIterator KernelEdgeIter
This type depends on the container type in use.
Definition: MeshKernel.hh:113
FinalMeshItems::Point Point
Derive this type from the FinalMeshItems.
Definition: MeshKernel.hh:95
const StatusInfo & status(VertexHandle _vh) const
Get status.
void remove_last_face()
Remove the last face imidiately, i.e.
Definition: MeshKernel.hh:217
void set_normal(VertexHandle _vh, const Normal &_n)
Set normal.
void remove_last_vertex()
Remove the last vertex imidiately, i.e.
Definition: MeshKernel.hh:209
This class describes the minimum interface a mesh kernel has to implement (because the resulting mesh...
Definition: MeshKernel.hh:83
bool has_halfedge_normals() const
Is property available?
const Face & face(FaceHandle _h) const
Translate handle to item (see also OpenMesh::PolyMeshT::deref())
Definition: MeshKernel.hh:158
FinalMeshItems::Color Color
Derive this type from the FinalMeshItems.
Definition: MeshKernel.hh:98
void set_halfedge_handle(VertexHandle _vh, HalfedgeHandle _heh)
Set the outgoing halfedge handle of a given vertex.
KernelFaceIter faces_end()
Kernel item iterator.
FinalMeshItems::FaceHandle FaceHandle
Derive this type from the FinalMeshItems.
Definition: MeshKernel.hh:103
Handle representing a face property.
Definition: Property.hh:529
Add 3D texture coordinates (vertices, halfedges)
Definition: Attributes.hh:93
const Vertex & vertex(VertexHandle _h) const
Translate handle to item (see also OpenMesh::PolyMeshT::deref())
Definition: MeshKernel.hh:152
FinalMeshItems::HalfedgeHandle HalfedgeHandle
Derive this type from the FinalMeshItems.
Definition: MeshKernel.hh:101
bool has_halfedge_colors() const
Is property available?
HalfedgeHandle opposite_halfedge_handle(HalfedgeHandle _heh) const
Get the opposite halfedge.
void request_halfedge_status()
Request property.
void clear()
Delete all items, i.e.
SomeIterator KernelFaceIter
This type depends on the container type in use.
Definition: MeshKernel.hh:115
void set_texcoord3D(VertexHandle _vh, const TexCoord3D &_t)
Set texture coordinate.
HalfedgeHandle new_edge(VertexHandle _start_vertex_handle, VertexHandle _end_vertex_handle)
Add a new edge from _start_vertex_handle to _end_vertex_handle.
Handle representing a vertex property.
Definition: Property.hh:487
Handle representing a mesh property.
Definition: Property.hh:543
HalfedgeHandle cw_rotated_halfedge_handle(HalfedgeHandle _heh) const
Clockwise rotate the given halfedge around its from vertex.
FaceHandle new_face()
Adding a new face.
void release_halfedge_texcoords1D()
Remove property.
FinalMeshItems::Scalar Scalar
Derive this type from the FinalMeshItems.
Definition: MeshKernel.hh:96
void release_vertex_texcoords3D()
Remove property.
void set_vertex_handle(HalfedgeHandle _heh, VertexHandle _vh)
Set the to-vertex-handle of the halfedge.
void add_property([VEHFM]PropHandleT< T > &_ph, const std::string &_name="")
Add property.
void release_halfedge_texcoords3D()
Remove property.
bool faces_empty() const
Is the face container empty?
KernelEdgeIter edges_begin()
Kernel item iterator.
VertexHandle new_vertex()
Add a new (default) vertex.
PropertyT< T > & property([VEHF]PropHandleT< T > _ph)
Get property.
void request_vertex_texcoords2D()
Request property.
FinalMeshItems::Edge Edge
Derive this type from the FinalMeshItems.
Definition: MeshKernel.hh:93
void release_face_colors()
Remove property.
void release_vertex_texcoords1D()
Remove property.
const TexCoord1D & texcoord1D(VertexHandle _vh) const
Get texture coordinate.
HalfedgeHandle ccw_rotated_halfedge_handle(HalfedgeHandle _heh) const
Counter-clockwise rotate the given halfedge around its from vertex.
void garbage_collection()
Remove all items that are marked as deleted from the corresponding containers.
HalfedgeHandle prev_halfedge_handle(HalfedgeHandle _heh) const
Get the previous halfedge of the given halfedge.
void request_vertex_status()
Request property.
FinalMeshItems::TexCoord TexCoord
Derive this type from the FinalMeshItems.
Definition: MeshKernel.hh:99
PropertyT< T > & mproperty(MPropHandleT< T > _ph)
Get property.
void request_edge_status()
Request property.
bool halfedges_empty() const
Is the halfedge container empty (should be the same as edges_empty()).
Add normals to mesh item (vertices/faces)
Definition: Attributes.hh:87
bool has_edge_status() const
Is property available?
EdgeHandle edge_handle(unsigned int _i) const
Get the i'th item.
KernelFaceIter faces_begin()
Kernel item iterator.
void set_next_halfedge_handle(HalfedgeHandle _heh, HalfedgeHandle _nheh)
Set the next halfedge handle.
const Edge & edge(EdgeHandle _h) const
Translate handle to item (see also OpenMesh::PolyMeshT::deref())
Definition: MeshKernel.hh:156
FinalMeshItems::Face Face
Derive this type from the FinalMeshItems.
Definition: MeshKernel.hh:94
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:64
Edge & edge(EdgeHandle _h)
Translate handle to item (see also OpenMesh::PolyMeshT::deref())
Definition: MeshKernel.hh:157
FinalMeshItems::Halfedge Halfedge
Derive this type from the FinalMeshItems.
Definition: MeshKernel.hh:92
bool has_vertex_colors() const
Is property available?
void request_vertex_texcoords3D()
Request property.
Add colors to mesh item (vertices/faces/edges)
Definition: Attributes.hh:88
void reserve(size_t _n_vertices, size_t _n_edges, size_t _n_faces)
Reserve memory for vertices, edges, faces.
SomeIterator KernelConstEdgeIter
This type depends on the container type in use.
Definition: MeshKernel.hh:114
void release_halfedge_normals()
Remove property.
Face & face(FaceHandle _h)
Translate handle to item (see also OpenMesh::PolyMeshT::deref())
Definition: MeshKernel.hh:159