OpenVolumeMesh
 All Classes Functions Variables Typedefs Pages
OpenVolumeMesh::TopologyKernel Class Reference
Inheritance diagram for OpenVolumeMesh::TopologyKernel:
OpenVolumeMesh::ResourceManager OpenVolumeMesh::HexahedralMeshTopologyKernel

Classes

class  CellCorrector
class  EdgeCorrector
class  FaceCorrector

Public Types

typedef OpenVolumeMeshEdge Edge
typedef OpenVolumeMeshFace Face
typedef OpenVolumeMeshCell Cell
- Public Types inherited from OpenVolumeMesh::ResourceManager
typedef std::vector
< BaseProperty * > 
Properties

Public Member Functions

VertexOHalfEdgeIter voh_iter (const VertexHandle &_h) const
HalfEdgeHalfFaceIter hehf_iter (const HalfEdgeHandle &_h) const
VertexCellIter vc_iter (const VertexHandle &_h) const
HalfEdgeCellIter hec_iter (const HalfEdgeHandle &_h) const
CellVertexIter cv_iter (const CellHandle &_h) const
CellCellIter cc_iter (const CellHandle &_h) const
HalfFaceVertexIter hfv_iter (const HalfFaceHandle &_h) const
BoundaryHalfFaceHalfFaceIter bhfhf_iter (const HalfFaceHandle &_ref_h) const
BoundaryFaceIter bf_iter () const
VertexIter v_iter () const
VertexIter vertices_begin () const
VertexIter vertices_end () const
EdgeIter e_iter () const
EdgeIter edges_begin () const
EdgeIter edges_end () const
HalfEdgeIter he_iter () const
HalfEdgeIter halfedges_begin () const
HalfEdgeIter halfedges_end () const
FaceIter f_iter () const
FaceIter faces_begin () const
FaceIter faces_end () const
HalfFaceIter hf_iter () const
HalfFaceIter halffaces_begin () const
HalfFaceIter halffaces_end () const
CellIter c_iter () const
CellIter cells_begin () const
CellIter cells_end () const
virtual unsigned int n_vertices () const
 Get number of vertices in mesh.
virtual unsigned int n_edges () const
 Get number of edges in mesh.
virtual unsigned int n_halfedges () const
 Get number of halfedges in mesh.
virtual unsigned int n_faces () const
 Get number of faces in mesh.
virtual unsigned int n_halffaces () const
 Get number of halffaces in mesh.
virtual unsigned int n_cells () const
 Get number of cells in mesh.
virtual VertexHandle add_vertex ()
 Add abstract vertex.
virtual EdgeHandle add_edge (const VertexHandle &_fromVertex, const VertexHandle &_toHandle, bool _allowDuplicates=false)
 Add edge.
virtual FaceHandle add_face (const std::vector< HalfEdgeHandle > &_halfedges, bool _topologyCheck=false)
 Add face via incident edges.
virtual FaceHandle add_face (const std::vector< VertexHandle > &_vertices)
 Add face via incident vertices.
virtual CellHandle add_cell (const std::vector< HalfFaceHandle > &_halffaces, bool _topologyCheck=false)
 Add cell via incident halffaces.
void set_edge (const EdgeHandle &_eh, const VertexHandle &_fromVertex, const VertexHandle &_toVertex)
 Set the vertices of an edge.
void set_face (const FaceHandle &_fh, const std::vector< HalfEdgeHandle > &_hes)
 Set the half-edges of a face.
void set_cell (const CellHandle &_ch, const std::vector< HalfFaceHandle > &_hfs)
 Set the half-faces of a cell.
const Edgeedge (const EdgeHandle &_edgeHandle) const
 Get edge with handle _edgeHandle.
const Faceface (const FaceHandle &_faceHandle) const
 Get face with handle _faceHandle.
const Cellcell (const CellHandle &_cellHandle) const
 Get cell with handle _cellHandle.
Edgeedge (const EdgeHandle &_edgeHandle)
 Get edge with handle _edgeHandle.
Faceface (const FaceHandle &_faceHandle)
 Get face with handle _faceHandle.
Cellcell (const CellHandle &_cellHandle)
 Get cell with handle _cellHandle.
const Edge halfedge (const HalfEdgeHandle &_halfEdgeHandle) const
 Get edge that corresponds to halfedge with handle _halfEdgeHandle.
const Face halfface (const HalfFaceHandle &_halfFaceHandle) const
 Get face that corresponds to halfface with handle _halfFaceHandle.
const Edge opposite_halfedge (const HalfEdgeHandle &_halfEdgeHandle) const
 Get opposite halfedge that corresponds to halfedge with handle _halfEdgeHandle.
const Face opposite_halfface (const HalfFaceHandle &_halfFaceHandle) const
 Get opposite halfface that corresponds to halfface with handle _halfFaceHandle.
const HalfEdgeHandle halfedge (const VertexHandle &_vh1, const VertexHandle &_vh2) const
const HalfFaceHandle halfface (const std::vector< VertexHandle > &_vs) const
const HalfFaceHandle halfface (const std::vector< HalfEdgeHandle > &_hes) const
const HalfEdgeHandle next_halfedge_in_halfface (const HalfEdgeHandle &_heh, const HalfFaceHandle &_hfh) const
 Get next halfedge within a halfface.
const HalfEdgeHandle prev_halfedge_in_halfface (const HalfEdgeHandle &_heh, const HalfFaceHandle &_hfh) const
 Get previous halfedge within a halfface.
unsigned int valence (const VertexHandle &_vh) const
 Get valence of vertex (number of incident edges)
unsigned int valence (const EdgeHandle &_eh) const
 Get valence of edge (number of incident faces)
unsigned int valence (const FaceHandle &_fh) const
 Get valence of face (number of incident edges)
unsigned int valence (const CellHandle &_ch) const
 Get valence of cell (number of incident faces)
virtual VertexIter delete_vertex (const VertexHandle &_h)
 Delete vertex from mesh.
virtual EdgeIter delete_edge (const EdgeHandle &_h)
 Delete edge from mesh.
virtual FaceIter delete_face (const FaceHandle &_h)
 Delete face from mesh.
virtual CellIter delete_cell (const CellHandle &_h)
 Delete cell from mesh.
CellIter delete_cell_range (const CellIter &_first, const CellIter &_last)
 Delete range of cells.
virtual void clear (bool _clearProps=true)
 Clear whole mesh.
void enable_bottom_up_incidences (bool _enable=true)
void enable_vertex_bottom_up_incidences (bool _enable=true)
void enable_edge_bottom_up_incidences (bool _enable=true)
void enable_face_bottom_up_incidences (bool _enable=true)
bool has_full_bottom_up_incidences () const
bool has_vertex_bottom_up_incidences () const
bool has_edge_bottom_up_incidences () const
bool has_face_bottom_up_incidences () const
HalfFaceHandle adjacent_halfface_in_cell (const HalfFaceHandle &_halfFaceHandle, const HalfEdgeHandle &_halfEdgeHandle) const
 Get halfface that is adjacent (w.r.t. a common halfedge) within the same cell.
CellHandle incident_cell (const HalfFaceHandle &_halfFaceHandle) const
 Get cell that is incident to the given halfface.
bool is_boundary (const HalfFaceHandle &_halfFaceHandle) const
bool is_boundary (const FaceHandle &_faceHandle) const
bool is_boundary (const EdgeHandle &_edgeHandle) const
bool is_boundary (const HalfEdgeHandle &_halfedgeHandle) const
bool is_boundary (const VertexHandle &_vertexHandle) const
unsigned int n_vertices_in_cell (const CellHandle &_ch) const
const Edge opposite_halfedge (const Edge &_edge) const
const Face opposite_halfface (const Face &_face) const
- Public Member Functions inherited from OpenVolumeMesh::ResourceManager
void resize_vprops (unsigned int _nv)
 Change size of stored vertex properties.
void resize_eprops (unsigned int _ne)
 Change size of stored edge properties.
void resize_fprops (unsigned int _nf)
 Change size of stored face properties.
void resize_cprops (unsigned int _nc)
 Change size of stored cell properties.
void clear_vertex_props ()
void clear_edge_props ()
void clear_halfedge_props ()
void clear_face_props ()
void clear_halfface_props ()
void clear_cell_props ()
void clear_mesh_props ()
template<class T >
VertexPropertyT< T > request_vertex_property (const std::string &_name=std::string(), const T _def=T())
template<class T >
EdgePropertyT< T > request_edge_property (const std::string &_name=std::string(), const T _def=T())
template<class T >
HalfEdgePropertyT< T > request_halfedge_property (const std::string &_name=std::string(), const T _def=T())
template<class T >
FacePropertyT< T > request_face_property (const std::string &_name=std::string(), const T _def=T())
template<class T >
HalfFacePropertyT< T > request_halfface_property (const std::string &_name=std::string(), const T _def=T())
template<class T >
CellPropertyT< T > request_cell_property (const std::string &_name=std::string(), const T _def=T())
template<class T >
MeshPropertyT< T > request_mesh_property (const std::string &_name=std::string(), const T _def=T())
unsigned int n_vertex_props () const
unsigned int n_edge_props () const
unsigned int n_halfedge_props () const
unsigned int n_face_props () const
unsigned int n_halfface_props () const
unsigned int n_cell_props () const
unsigned int n_mesh_props () const
template<class T >
void set_persistent (VertexPropertyT< T > &_prop, bool _flag=true)
template<class T >
void set_persistent (EdgePropertyT< T > &_prop, bool _flag=true)
template<class T >
void set_persistent (HalfEdgePropertyT< T > &_prop, bool _flag=true)
template<class T >
void set_persistent (FacePropertyT< T > &_prop, bool _flag=true)
template<class T >
void set_persistent (HalfFacePropertyT< T > &_prop, bool _flag=true)
template<class T >
void set_persistent (CellPropertyT< T > &_prop, bool _flag=true)
template<class T >
void set_persistent (MeshPropertyT< T > &_prop, bool _flag=true)
Properties::const_iterator vertex_props_begin () const
Properties::const_iterator vertex_props_end () const
Properties::const_iterator edge_props_begin () const
Properties::const_iterator edge_props_end () const
Properties::const_iterator halfedge_props_begin () const
Properties::const_iterator halfedge_props_end () const
Properties::const_iterator face_props_begin () const
Properties::const_iterator face_props_end () const
Properties::const_iterator halfface_props_begin () const
Properties::const_iterator halfface_props_end () const
Properties::const_iterator cell_props_begin () const
Properties::const_iterator cell_props_end () const
Properties::const_iterator mesh_props_begin () const
Properties::const_iterator mesh_props_end () const
template<class FullPropT , class PropIterT >
bool property_exists (const PropIterT &_begin, const PropIterT &_end, const std::string &_name) const
template<class PropT >
bool vertex_property_exists (const std::string &_name) const
template<class PropT >
bool edge_property_exists (const std::string &_name) const
template<class PropT >
bool halfedge_property_exists (const std::string &_name) const
template<class PropT >
bool face_property_exists (const std::string &_name) const
template<class PropT >
bool halfface_property_exists (const std::string &_name) const
template<class PropT >
bool cell_property_exists (const std::string &_name) const
template<class PropT >
bool mesh_property_exists (const std::string &_name) const

Static Public Member Functions

static HalfEdgeHandle halfedge_handle (const EdgeHandle &_h, const unsigned char _subIdx)
 Conversion function.
static HalfFaceHandle halfface_handle (const FaceHandle &_h, const unsigned char _subIdx)
 Conversion function.
static EdgeHandle edge_handle (const HalfEdgeHandle &_h)
 Handle conversion.
static FaceHandle face_handle (const HalfFaceHandle &_h)
static HalfEdgeHandle opposite_halfedge_handle (const HalfEdgeHandle &_h)
static HalfFaceHandle opposite_halfface_handle (const HalfFaceHandle &_h)

Static Public Attributes

static const VertexHandle InvalidVertexHandle = VertexHandle(-1)
static const EdgeHandle InvalidEdgeHandle = EdgeHandle(-1)
static const FaceHandle InvalidFaceHandle = FaceHandle(-1)
static const CellHandle InvalidCellHandle = CellHandle(-1)
static const HalfEdgeHandle InvalidHalfEdgeHandle = HalfEdgeHandle(-1)
static const HalfFaceHandle InvalidHalfFaceHandle = HalfFaceHandle(-1)

Protected Member Functions

virtual void delete_multiple_vertices (const std::vector< bool > &_tag)
virtual void delete_multiple_edges (const std::vector< bool > &_tag)
virtual void delete_multiple_faces (const std::vector< bool > &_tag)
virtual void delete_multiple_cells (const std::vector< bool > &_tag)
- Protected Member Functions inherited from OpenVolumeMesh::ResourceManager
void vertex_deleted (const VertexHandle &_h)
void edge_deleted (const EdgeHandle &_h)
void face_deleted (const FaceHandle &_h)
void cell_deleted (const CellHandle &_h)
void delete_multiple_vertex_props (const std::vector< bool > &_tags)
void delete_multiple_edge_props (const std::vector< bool > &_tags)
void delete_multiple_face_props (const std::vector< bool > &_tags)
void delete_multiple_cell_props (const std::vector< bool > &_tags)

Protected Attributes

std::vector< Edgeedges_
std::vector< Facefaces_
std::vector< Cellcells_

Friends

class StatusAttrib
class VertexOHalfEdgeIter
class HalfEdgeHalfFaceIter
class VertexCellIter
class HalfEdgeCellIter
class CellVertexIter
class CellCellIter
class HalfFaceVertexIter
class BoundaryHalfFaceHalfFaceIter
class BoundaryFaceIter
class VertexIter
class EdgeIter
class HalfEdgeIter
class FaceIter
class HalfFaceIter
class CellIter

Member Function Documentation

FaceHandle OpenVolumeMesh::TopologyKernel::add_face ( const std::vector< VertexHandle > &  _vertices)
virtual

Add face via incident vertices.

Add face via incident vertices Define the _vertices in counter-clockwise order (from the "outside")

Reimplemented in OpenVolumeMesh::HexahedralMeshTopologyKernel.

CellIter OpenVolumeMesh::TopologyKernel::delete_cell ( const CellHandle _h)
virtual

Delete cell from mesh.

After performing this operation, all cells following cell _h in the array will be accessible through their old handle decreased by one. These steps are performed:

1) Delete links in BU: HF -> C 2) Decrease all entries > c in BU: HF -> C 3) Delete cell from storage array 4) Delete property item

Parameters
_hA cell handle
CellIter OpenVolumeMesh::TopologyKernel::delete_cell_range ( const CellIter _first,
const CellIter _last 
)

Delete range of cells.

Deletes all cells in range [_first, _last].

Parameters
_firstIterator to first cell that is to be deleted
_lastIterator to last cell that is to be deleted
Returns
An iterator to the first cell after the deleted range
EdgeIter OpenVolumeMesh::TopologyKernel::delete_edge ( const EdgeHandle _h)
virtual

Delete edge from mesh.

After performing this operation, all edges following edge _h in the array will be accessible through their old handle decreased by one. This function directly fixes the edge links in all faces. These steps are performed:

1) Delete links in BU: V -> HE 2) Search all incident faces + decrease all half-edge handles > he in all incident faces 3) Delete item in BU: HE -> HF 4) Decrease all entries > he in BU: V -> HE 5) Delete edge from storage array 6) Delete property item 7) Delete incident faces

Parameters
_hAn edge handle
FaceIter OpenVolumeMesh::TopologyKernel::delete_face ( const FaceHandle _h)
virtual

Delete face from mesh.

After performing this operation, all faces following face _h in the array will be accessible through their old handle decreased by one. This function directly fixes the face links in all cells. These steps are performed:

1) Delete links in BU: HE -> HF 2) Search all incident cells + decrease all half-face handles > hf in all incident cells 3) Delete item in BU: HF -> C 4) Decrease all entries > hf in BU: HE -> HF 5) Delete face from storage array 6) Delete property item 7) Delete incident cells

Parameters
_hA face handle
VertexIter OpenVolumeMesh::TopologyKernel::delete_vertex ( const VertexHandle _h)
virtual

Delete vertex from mesh.

After performing this operation, all vertices following vertex _h in the array will be accessible through their old handle decreased by one. This function directly fixes the vertex links in all edges. These steps are performed:

1) Search all incident half-edges HE_v + Decrease all vertex handles in incident edges with index > v by 1 2) Delete entry in BU: V -> HF 3) Delete vertex itself (not necessary here since a vertex is only represented by a number) 4) Delete property entry 5) Delete incident edges

Parameters
_hA vertex handle
const OpenVolumeMeshEdge OpenVolumeMesh::TopologyKernel::halfedge ( const HalfEdgeHandle _halfEdgeHandle) const

Get edge that corresponds to halfedge with handle _halfEdgeHandle.

Otherwise return the opposite halfedge via opposite()


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