OpenMesh
OpenMesh::Concepts::KernelT< FinalMeshItems > Class Template Reference

This class describes the minimum interface a mesh kernel has to implement (because the resulting mesh will rely on this interface). More...

#include <Doc/Concepts/MeshKernel.hh>

Public Types

Mesh Items
typedef FinalMeshItems::Vertex Vertex
 Derive this type from the FinalMeshItems.
 
typedef FinalMeshItems::Halfedge Halfedge
 Derive this type from the FinalMeshItems.
 
typedef FinalMeshItems::Edge Edge
 Derive this type from the FinalMeshItems.
 
typedef FinalMeshItems::Face Face
 Derive this type from the FinalMeshItems.
 
typedef FinalMeshItems::Point Point
 Derive this type from the FinalMeshItems.
 
typedef FinalMeshItems::Scalar Scalar
 Derive this type from the FinalMeshItems.
 
typedef FinalMeshItems::Normal Normal
 Derive this type from the FinalMeshItems.
 
typedef FinalMeshItems::Color Color
 Derive this type from the FinalMeshItems.
 
typedef FinalMeshItems::TexCoord TexCoord
 Derive this type from the FinalMeshItems.
 
typedef FinalMeshItems::VertexHandle VertexHandle
 Derive this type from the FinalMeshItems.
 
typedef FinalMeshItems::HalfedgeHandle HalfedgeHandle
 Derive this type from the FinalMeshItems.
 
typedef FinalMeshItems::EdgeHandle EdgeHandle
 Derive this type from the FinalMeshItems.
 
typedef FinalMeshItems::FaceHandle FaceHandle
 Derive this type from the FinalMeshItems.
 
Kernel Iterators
typedef SomeIterator KernelVertexIter
 This type depends on the container type in use.
 
typedef SomeIterator KernelConstVertexIter
 This type depends on the container type in use.
 
typedef SomeIterator KernelEdgeIter
 This type depends on the container type in use.
 
typedef SomeIterator KernelConstEdgeIter
 This type depends on the container type in use.
 
typedef SomeIterator KernelFaceIter
 This type depends on the container type in use.
 
typedef SomeIterator KernelConstFaceIter
 This type depends on the container type in use.
 

Public Member Functions

Constructor/Destructor
 KernelT ()
 Default constructor.
 
 ~KernelT ()
 Destructor.
 
KernelToperator= (const KernelT &_rhs)
 Assignment operator.
 
void reserve (size_t _n_vertices, size_t _n_edges, size_t _n_faces)
 Reserve memory for vertices, edges, faces. More...
 
Handle -> Item.
const Vertexvertex (VertexHandle _h) const
 Translate handle to item (see also OpenMesh::PolyMeshT::deref())
 
Vertexvertex (VertexHandle _h)
 Translate handle to item (see also OpenMesh::PolyMeshT::deref())
 
const Halfedgehalfedge (HalfedgeHandle _h) const
 Translate handle to item (see also OpenMesh::PolyMeshT::deref())
 
Halfedgehalfedge (HalfedgeHandle _h)
 Translate handle to item (see also OpenMesh::PolyMeshT::deref())
 
const Edgeedge (EdgeHandle _h) const
 Translate handle to item (see also OpenMesh::PolyMeshT::deref())
 
Edgeedge (EdgeHandle _h)
 Translate handle to item (see also OpenMesh::PolyMeshT::deref())
 
const Faceface (FaceHandle _h) const
 Translate handle to item (see also OpenMesh::PolyMeshT::deref())
 
Faceface (FaceHandle _h)
 Translate handle to item (see also OpenMesh::PolyMeshT::deref())
 
Item -> Handle
VertexHandle handle (const Vertex &_v) const
 Translate item to handle.
 
HalfedgeHandle handle (const Halfedge &_he) const
 Translate item to handle.
 
EdgeHandle handle (const Edge &_e) const
 Translate item to handle.
 
FaceHandle handle (const Face &_f) const
 Translate item to handle.
 
Get the i'th item
VertexHandle vertex_handle (unsigned int _i) const
 Get the i'th item.
 
HalfedgeHandle halfedge_handle (unsigned int _i) const
 Get the i'th item.
 
EdgeHandle edge_handle (unsigned int _i) const
 Get the i'th item.
 
FaceHandle face_handle (unsigned int _i) const
 Get the i'th item.
 
Delete items
void clear ()
 Delete all items, i.e. More...
 
void clean ()
 Delete all items, i.e. More...
 
void garbage_collection ()
 Remove all items that are marked as deleted from the corresponding containers. More...
 
void remove_last_vertex ()
 Remove the last vertex imidiately, i.e. More...
 
void remove_last_edge ()
 Remove the last edge imidiately, i.e. More...
 
void remove_last_face ()
 Remove the last face imidiately, i.e. More...
 
Number of elements
size_t n_vertices () const
 Returns number of vertices.
 
size_t n_halfedges () const
 Returns number of halfedges (should be 2*n_edges())
 
size_t n_edges () const
 Returns number of edges.
 
size_t n_faces () const
 Returns number of faces.
 
bool vertices_empty () const
 Is the vertex container empty?
 
bool halfedges_empty () const
 Is the halfedge container empty (should be the same as edges_empty()).
 
bool edges_empty () const
 Is the edge container empty?
 
bool faces_empty () const
 Is the face container empty?
 
Vertex connectivity
HalfedgeHandle halfedge_handle (VertexHandle _vh) const
 Get an outgoing halfedge of a given vertex.
 
void set_halfedge_handle (VertexHandle _vh, HalfedgeHandle _heh)
 Set the outgoing halfedge handle of a given vertex.
 
const Pointpoint (VertexHandle _vh) const
 Get the coordinate of a vertex.
 
const Pointpoint (const Vertex &_v) const
 Get the coordinate of a vertex.
 
void set_point (VertexHandle _vh, const Point &_p)
 Set the coordinate of a vertex.
 
void set_point (Vertex &_v, const Point &_p)
 Set the coordinate of a vertex.
 
Halfedge connectivity
VertexHandle to_vertex_handle (HalfedgeHandle _heh) const
 Get the vertex the halfedge points to.
 
VertexHandle from_vertex_handle (HalfedgeHandle _heh) const
 Get the vertex the halfedge starts from (implemented as to-handle of the opposite halfedge, provided for convenience)
 
void set_vertex_handle (HalfedgeHandle _heh, VertexHandle _vh)
 Set the to-vertex-handle of the halfedge.
 
FaceHandle face_handle (HalfedgeHandle _heh) const
 Get the face the halfedge belongs to. More...
 
void set_face_handle (HalfedgeHandle _heh, FaceHandle _fh)
 Set the face the halfedge belongs to.
 
HalfedgeHandle next_halfedge_handle (HalfedgeHandle _heh) const
 Get the next halfedge handle.
 
void set_next_halfedge_handle (HalfedgeHandle _heh, HalfedgeHandle _nheh)
 Set the next halfedge handle. More...
 
HalfedgeHandle prev_halfedge_handle (HalfedgeHandle _heh) const
 Get the previous halfedge of the given halfedge. More...
 
HalfedgeHandle opposite_halfedge_handle (HalfedgeHandle _heh) const
 Get the opposite halfedge.
 
HalfedgeHandle ccw_rotated_halfedge_handle (HalfedgeHandle _heh) const
 Counter-clockwise rotate the given halfedge around its from vertex.
 
HalfedgeHandle cw_rotated_halfedge_handle (HalfedgeHandle _heh) const
 Clockwise rotate the given halfedge around its from vertex.
 
EdgeHandle edge_handle (HalfedgeHandle _heh) const
 Get the edge the current halfedge it contained in.
 
Edge connectivity
HalfedgeHandle halfedge_handle (EdgeHandle _eh, unsigned int _i) const
 Get the first or second halfedge of the given edge.
 
Face connectivity
HalfedgeHandle halfedge_handle (FaceHandle _fh) const
 Get a halfedge belonging to the face.
 
void set_halfedge_handle (FaceHandle _fh, HalfedgeHandle _heh)
 Set one halfedge of the face.
 
set/get value of a standard property
const Pointpoint (VertexHandle _vh) const
 Get position.
 
void set_point (VertexHandle _vh, const Point &_p)
 Set position.
 
Pointpoint (VertexHandle _vh)
 Convenience function.
 
const Normalnormal (VertexHandle _vh) const
 Get normal.
 
void set_normal (VertexHandle _vh, const Normal &_n)
 Set normal.
 
const Normalnormal (HalfedgeHandle _heh) const
 Get normal of the to vertex of the given Halfedge (per face per vertex normals)
 
void set_normal (HalfedgeHandle _heh, const Normal &_n)
 Set normal of the to vertex of the given Halfedge (per face per vertex normals)
 
const Colorcolor (VertexHandle _vh) const
 Get color.
 
void set_color (VertexHandle _vh, const Color &_c)
 Set color.
 
const TexCoord1D & texcoord1D (VertexHandle _vh) const
 Get texture coordinate.
 
void set_texcoord1D (VertexHandle _vh, const TexCoord1D &_t)
 Set texture coordinate.
 
const TexCoord2D & texcoord2D (VertexHandle _vh) const
 Get texture coordinate.
 
void set_texcoord2D (VertexHandle _vh, const TexCoord2D &_t)
 Set texture coordinate.
 
const TexCoord3D & texcoord3D (VertexHandle _vh) const
 Get texture coordinate.
 
void set_texcoord3D (VertexHandle _vh, const TexCoord3D &_t)
 Set texture coordinate.
 
const TexCoord1D & texcoord1D (HalfedgeHandle _hh) const
 Get texture coordinate of the to vertex for the current face (per face per vertex texcoords)
 
void set_texcoord1D (HalfedgeHandle _hh, const TexCoord1D &_t)
 Set texture coordinate of the to vertex of the given Halfedge (per face per vertex texcoords)
 
const TexCoord2D & texcoord2D (HalfedgeHandle _hh) const
 Get texture coordinate of the to vertex for the current face (per face per vertex texcoords)
 
void set_texcoord2D (HalfedgeHandle _hh, const TexCoord2D &_t)
 Set texture coordinate of the to vertex of the given Halfedge (per face per vertex texcoords)
 
const TexCoord3D & texcoord3D (HalfedgeHandle _hh) const
 Get texture coordinate of the to vertex for the current face (per face per vertex texcoords)
 
void set_texcoord3D (HalfedgeHandle _hh, const TexCoord3D &_t)
 Set texture coordinate of the to vertex of the given Halfedge (per face per vertex texcoords)
 
const StatusInfo & status (VertexHandle _vh) const
 Get status.
 
StatusInfo & status (VertexHandle _vh)
 Get status.
 
const StatusInfo & status (HalfedgeHandle _vh) const
 Get status.
 
StatusInfo & status (HalfedgeHandle _vh)
 Get status.
 
const Colorcolor (HalfedgeHandle _heh) const
 Get color.
 
void set_color (HalfedgeHandle _heh, const Color &_c)
 Set color.
 
const Colorcolor (EdgeHandle _eh) const
 Get color.
 
void set_color (EdgeHandle _eh, const Color &_c)
 Set color.
 
const StatusInfo & status (EdgeHandle _vh) const
 Get status.
 
StatusInfo & status (EdgeHandle _vh)
 Get status.
 
const Normalnormal (FaceHandle _fh) const
 Get normal.
 
void set_normal (FaceHandle _fh, const Normal &_n)
 Set normal.
 
const Colorcolor (FaceHandle _fh) const
 Get color.
 
void set_color (FaceHandle _fh, const Color &_c)
 Set color.
 
const StatusInfo & status (FaceHandle _vh) const
 Get status.
 
StatusInfo & status (FaceHandle _vh)
 Get status.
 
Dynamically add standard properties
void request_vertex_normals ()
 Request property.
 
void request_vertex_colors ()
 Request property.
 
void request_vertex_texcoords1D ()
 Request property.
 
void request_vertex_texcoords2D ()
 Request property.
 
void request_vertex_texcoords3D ()
 Request property.
 
void request_vertex_status ()
 Request property.
 
void request_halfedge_status ()
 Request property.
 
void request_halfedge_normals ()
 Request property.
 
void request_halfedge_colors ()
 Request property.
 
void request_halfedge_texcoords1D ()
 Request property.
 
void request_halfedge_texcoords2D ()
 Request property.
 
void request_halfedge_texcoords3D ()
 Request property.
 
void request_edge_status ()
 Request property.
 
void request_edge_colors ()
 Request property.
 
void request_face_normals ()
 Request property.
 
void request_face_colors ()
 Request property.
 
void request_face_status ()
 Request property.
 
void request_face_texture_index ()
 Request property.
 
Remove standard properties
void release_vertex_normals ()
 Remove property.
 
void release_vertex_colors ()
 Remove property.
 
void release_vertex_texcoords1D ()
 Remove property.
 
void release_vertex_texcoords2D ()
 Remove property.
 
void release_vertex_texcoords3D ()
 Remove property.
 
void release_vertex_status ()
 Remove property.
 
void release_halfedge_status ()
 Remove property.
 
void release_halfedge_normals ()
 Remove property.
 
void release_halfedge_colors ()
 Remove property.
 
void release_halfedge_texcoords1D ()
 Remove property.
 
void release_halfedge_texcoords2D ()
 Remove property.
 
void release_halfedge_texcoords3D ()
 Remove property.
 
void release_edge_status ()
 Remove property.
 
void release_edge_colors ()
 Remove property.
 
void release_face_normals ()
 Remove property.
 
void release_face_colors ()
 Remove property.
 
void release_face_status ()
 Remove property.
 
void release_face_texture_index ()
 Remove property.
 
Check availability of standard properties
bool has_vertex_normals () const
 Is property available?
 
bool has_vertex_colors () const
 Is property available?
 
bool has_vertex_texcoords1D () const
 Is property available?
 
bool has_vertex_texcoords2D () const
 Is property available?
 
bool has_vertex_texcoords3D () const
 Is property available?
 
bool has_vertex_status () const
 Is property available?
 
bool has_halfedge_status () const
 Is property available?
 
bool has_halfedge_normals () const
 Is property available?
 
bool has_halfedge_colors () const
 Is property available?
 
bool has_halfedge_texcoords1D () const
 Is property available?
 
bool has_halfedge_texcoords2D () const
 Is property available?
 
bool has_halfedge_texcoords3D () const
 Is property available?
 
bool has_edge_status () const
 Is property available?
 
bool has_edge_colors () const
 Is property available?
 
bool has_face_normals () const
 Is property available?
 
bool has_face_colors () const
 Is property available?
 
bool has_face_status () const
 Is property available?
 
bool has_face_texture_index () const
 Is property available?
 
Property management - add property

template<typename T >
void add_property ([VEHFM]PropHandleT< T > &_ph, const std::string &_name="")
 Add property. More...
 
Property management - remove property
template<typename T >
void remove_property ([VEHFM]PropHandleT< T > &)
 Remove property.
 
Property management - get property by name
template<typename T >
bool get_property_handle ([VEHFM]PropHandleT< T > &ph, const std::string &_n) const
 Get property handle by name.
 
Property management - get property
template<typename T >
PropertyT< T > & property ([VEHF]PropHandleT< T > _ph)
 Get property.
 
template<typename T >
const PropertyT< T > & property ([VEHF]PropHandleT< T > _ph) const
 Get property.
 
template<typename T >
PropertyT< T > & mproperty (MPropHandleT< T > _ph)
 Get property.
 
template<typename T >
const PropertyT< T > & mproperty (MPropHandleT< T > _ph) const
 Get property.
 
Property management - get property value for an item
template<typename T >
T & property (VPropHandleT< T > _ph, VertexHandle _vh)
 Get value for item represented by the handle.
 
template<typename T >
const T & property (VPropHandleT< T > _ph, VertexHandle _vh) const
 Get value for item represented by the handle.
 
template<typename T >
T & property (EPropHandleT< T > _ph, EdgeHandle _vh)
 Get value for item represented by the handle.
 
template<typename T >
const T & property (EPropHandleT< T > _ph, EdgeHandle _vh) const
 Get value for item represented by the handle.
 
template<typename T >
T & property (HPropHandleT< T > _ph, HalfedgeHandle _vh)
 Get value for item represented by the handle.
 
template<typename T >
const T & property (HPropHandleT< T > _ph, HalfedgeHandle _vh) const
 Get value for item represented by the handle.
 
template<typename T >
T & property (FPropHandleT< T > _ph, FaceHandle _vh)
 Get value for item represented by the handle.
 
template<typename T >
const T & property (FPropHandleT< T > _ph, FaceHandle _vh) const
 Get value for item represented by the handle.
 
template<typename T >
T & property (MPropHandleT< T > _ph)
 Get value for item represented by the handle.
 
template<typename T >
const T & property (MPropHandleT< T > _ph) const
 Get value for item represented by the handle.
 
Low-level adding new items
VertexHandle new_vertex ()
 Add a new (default) vertex. More...
 
VertexHandle new_vertex (const Point &_p)
 Add a new vertex with a given point coordinate. More...
 
VertexHandle new_vertex (const Vertex &_v)
 Add a new vertex (copied from the given one). More...
 
HalfedgeHandle new_edge (VertexHandle _start_vertex_handle, VertexHandle _end_vertex_handle)
 Add a new edge from _start_vertex_handle to _end_vertex_handle. More...
 
FaceHandle new_face ()
 Adding a new face. More...
 
FaceHandle new_face (const Face &_f)
 Adding a new face (copied from a _f). More...
 

Kernel item iterators

KernelVertexIter vertices_begin ()
 Kernel item iterator. More...
 
KernelConstVertexIter vertices_begin () const
 Kernel item iterator. More...
 
KernelVertexIter vertices_end ()
 Kernel item iterator. More...
 
KernelConstVertexIter vertices_end () const
 Kernel item iterator. More...
 
KernelEdgeIter edges_begin ()
 Kernel item iterator. More...
 
KernelConstEdgeIter edges_begin () const
 Kernel item iterator. More...
 
KernelEdgeIter edges_end ()
 Kernel item iterator. More...
 
KernelConstEdgeIter edges_end () const
 Kernel item iterator. More...
 
KernelFaceIter faces_begin ()
 Kernel item iterator. More...
 
KernelConstFaceIter faces_begin () const
 Kernel item iterator. More...
 
KernelFaceIter faces_end ()
 Kernel item iterator. More...
 
KernelConstFaceIter faces_end () const
 Kernel item iterator. More...
 

Detailed Description

template<class FinalMeshItems>
class OpenMesh::Concepts::KernelT< FinalMeshItems >

This class describes the minimum interface a mesh kernel has to implement (because the resulting mesh will rely on this interface).

This is the template class the actually holds the mesh kernel implementation. All functions marked as internal should only be used by the mesh class (that inherits the kernel). The mesh may then provide wrapper functions that provide the same functionality.

Todo:
Check, if the member list is complete.

Member Function Documentation

◆ add_property()

template<class FinalMeshItems >
template<typename T >
void OpenMesh::Concepts::KernelT< FinalMeshItems >::add_property ( [VEHFM] PropHandleT< T > &  _ph,
const std::string &  _name = "" 
)

Add property.

You should not use this function directly.

Instead, use the convenient PropertyManager wrapper and/or one of its helper functions such as makePropertyManagerFromNew, makePropertyManagerFromExisting, or makePropertyManagerFromExistingOrNew.

Adds a property

Depending on the property handle type a vertex, (half-)edge, face or mesh property is added to the mesh. If the action fails the handle is invalid. On success the handle must be used to access the property data with property().

Parameters
_phA property handle defining the data type to bind to mesh. On success the handle is valid else invalid.
_nameOptional name of property. Following restrictions apply to the name:
  1. Maximum length of name is 256 characters
  2. The prefixes matching "^[vhefm]:" are reserved for internal usage.
  3. The expression "^<.*>$" is reserved for internal usage.

◆ clean()

template<class FinalMeshItems >
void OpenMesh::Concepts::KernelT< FinalMeshItems >::clean ( )

Delete all items, i.e.

clear all item containers. The properties will be kept

◆ clear()

template<class FinalMeshItems >
void OpenMesh::Concepts::KernelT< FinalMeshItems >::clear ( )

Delete all items, i.e.

clear all item containers. The properties will also be removed from the mesh

◆ edges_begin() [1/2]

template<class FinalMeshItems >
KernelEdgeIter OpenMesh::Concepts::KernelT< FinalMeshItems >::edges_begin ( )

Kernel item iterator.

◆ edges_begin() [2/2]

template<class FinalMeshItems >
KernelConstEdgeIter OpenMesh::Concepts::KernelT< FinalMeshItems >::edges_begin ( ) const

Kernel item iterator.

◆ edges_end() [1/2]

template<class FinalMeshItems >
KernelEdgeIter OpenMesh::Concepts::KernelT< FinalMeshItems >::edges_end ( )

Kernel item iterator.

◆ edges_end() [2/2]

template<class FinalMeshItems >
KernelConstEdgeIter OpenMesh::Concepts::KernelT< FinalMeshItems >::edges_end ( ) const

Kernel item iterator.

◆ face_handle()

template<class FinalMeshItems >
FaceHandle OpenMesh::Concepts::KernelT< FinalMeshItems >::face_handle ( HalfedgeHandle  _heh) const

Get the face the halfedge belongs to.

Note
The handle is invalid if the halfedge is a boundary halfedge

◆ faces_begin() [1/2]

template<class FinalMeshItems >
KernelFaceIter OpenMesh::Concepts::KernelT< FinalMeshItems >::faces_begin ( )

Kernel item iterator.

◆ faces_begin() [2/2]

template<class FinalMeshItems >
KernelConstFaceIter OpenMesh::Concepts::KernelT< FinalMeshItems >::faces_begin ( ) const

Kernel item iterator.

◆ faces_end() [1/2]

template<class FinalMeshItems >
KernelFaceIter OpenMesh::Concepts::KernelT< FinalMeshItems >::faces_end ( )

Kernel item iterator.

◆ faces_end() [2/2]

template<class FinalMeshItems >
KernelConstFaceIter OpenMesh::Concepts::KernelT< FinalMeshItems >::faces_end ( ) const

Kernel item iterator.

◆ garbage_collection()

template<class FinalMeshItems >
void OpenMesh::Concepts::KernelT< FinalMeshItems >::garbage_collection ( )

Remove all items that are marked as deleted from the corresponding containers.

Note
All handles (and indices) to any entity (face, vertex, edge, halfedge) created before garbage collection will be out of sync with the mesh, do not use them anymore! See also Deleted Elements.
Needs the Attributes::Status attribute
This function may not be implemented for all kernels.

◆ new_edge()

template<class FinalMeshItems >
HalfedgeHandle OpenMesh::Concepts::KernelT< FinalMeshItems >::new_edge ( VertexHandle  _start_vertex_handle,
VertexHandle  _end_vertex_handle 
)

Add a new edge from _start_vertex_handle to _end_vertex_handle.

This method should add an edge (i.e. two opposite halfedges) and set the corresponding vertex handles of these halfedges.

◆ new_face() [1/2]

template<class FinalMeshItems >
FaceHandle OpenMesh::Concepts::KernelT< FinalMeshItems >::new_face ( )

Adding a new face.

◆ new_face() [2/2]

template<class FinalMeshItems >
FaceHandle OpenMesh::Concepts::KernelT< FinalMeshItems >::new_face ( const Face _f)

Adding a new face (copied from a _f).

◆ new_vertex() [1/3]

template<class FinalMeshItems >
VertexHandle OpenMesh::Concepts::KernelT< FinalMeshItems >::new_vertex ( )

Add a new (default) vertex.

◆ new_vertex() [2/3]

template<class FinalMeshItems >
VertexHandle OpenMesh::Concepts::KernelT< FinalMeshItems >::new_vertex ( const Point _p)

Add a new vertex with a given point coordinate.

◆ new_vertex() [3/3]

template<class FinalMeshItems >
VertexHandle OpenMesh::Concepts::KernelT< FinalMeshItems >::new_vertex ( const Vertex _v)

Add a new vertex (copied from the given one).

◆ prev_halfedge_handle()

template<class FinalMeshItems >
HalfedgeHandle OpenMesh::Concepts::KernelT< FinalMeshItems >::prev_halfedge_handle ( HalfedgeHandle  _heh) const

Get the previous halfedge of the given halfedge.

The implementation should take care of an existing OpenMesh::Attributes::PrevHalfedge attribute.

◆ remove_last_edge()

template<class FinalMeshItems >
void OpenMesh::Concepts::KernelT< FinalMeshItems >::remove_last_edge ( )
inline

Remove the last edge imidiately, i.e.

call pop_back() for the EdgeContainer. Used e.g. by the add_face() method of PolyMeshT

◆ remove_last_face()

template<class FinalMeshItems >
void OpenMesh::Concepts::KernelT< FinalMeshItems >::remove_last_face ( )
inline

Remove the last face imidiately, i.e.

call pop_back() for the FaceContainer. Used e.g. by the add_face() method of PolyMeshT

◆ remove_last_vertex()

template<class FinalMeshItems >
void OpenMesh::Concepts::KernelT< FinalMeshItems >::remove_last_vertex ( )
inline

Remove the last vertex imidiately, i.e.

call pop_back() for the VertexContainer.

◆ reserve()

template<class FinalMeshItems >
void OpenMesh::Concepts::KernelT< FinalMeshItems >::reserve ( size_t  _n_vertices,
size_t  _n_edges,
size_t  _n_faces 
)

Reserve memory for vertices, edges, faces.

Reserve memory for the mesh items vertices, edges, faces. Use this method if you can estimate the memory consumption, for instance in algorithm expanding the mesh. Depending on the underlying array type you might be better of using this method, then letting the array type decide when to increase the capacity. For instance the STL vector class std::vector (used in the supplied ArrayKernelT) doubles the capacity if it is exhausted. This might lead to an memory allocation exception, though an smaller increment would be enough.

◆ set_next_halfedge_handle()

template<class FinalMeshItems >
void OpenMesh::Concepts::KernelT< FinalMeshItems >::set_next_halfedge_handle ( HalfedgeHandle  _heh,
HalfedgeHandle  _nheh 
)

Set the next halfedge handle.

Note
If the previous halfedge is also stored (see OpenMesh::Attributes::PrevHalfedge) then this method also has to set this link)

◆ vertices_begin() [1/2]

template<class FinalMeshItems >
KernelVertexIter OpenMesh::Concepts::KernelT< FinalMeshItems >::vertices_begin ( )

Kernel item iterator.

◆ vertices_begin() [2/2]

template<class FinalMeshItems >
KernelConstVertexIter OpenMesh::Concepts::KernelT< FinalMeshItems >::vertices_begin ( ) const

Kernel item iterator.

◆ vertices_end() [1/2]

template<class FinalMeshItems >
KernelVertexIter OpenMesh::Concepts::KernelT< FinalMeshItems >::vertices_end ( )

Kernel item iterator.

◆ vertices_end() [2/2]

template<class FinalMeshItems >
KernelConstVertexIter OpenMesh::Concepts::KernelT< FinalMeshItems >::vertices_end ( ) const

Kernel item iterator.


The documentation for this class was generated from the following file:

Project OpenMesh, ©  Visual Computing Institute, RWTH Aachen. Documentation generated using doxygen .