C3D Toolkit  Kernel - 118069, Vision - 2.16.7.1844
MbHalfedge Class Reference

Polygonal mesh topology represented as half edge. More...

#include <halfedge.h>

Public Member Functions

 MbHalfedge ()
 Default constructor.
 
virtual ~MbHalfedge ()
 Destructor.
 
size_t EdgeCount () const
 Get the number of edges in the mesh (including inactive ones).
 
MbHalfedgeEdge & Edge (size_t iEd)
 Get edge by index.
 
const MbHalfedgeEdge & Edge (size_t iEd) const
 Get edge by index.
 
size_t VertexCount () const
 Get the number of vertices in the mesh (including inactive ones).
 
MbHalfedgeVertex & Vertex (size_t iVx)
 Get vertex by index.
 
const MbHalfedgeVertex & Vertex (size_t iVx) const
 Get vertex by index.
 
size_t FacetCount () const
 Get the number of facets in the mesh (including inactive ones).
 
MbHalfedgeFacet & Facet (size_t iF)
 Get facet by index.
 
const MbHalfedgeFacet & Facet (size_t iF) const
 Get facet by index.
 
ActiveEdgesBegEndPair AllActiveEdges () const
 Range based for pair for all alive edges.
 
ActiveVerticesBegEndPair AllActiveVertices () const
 Range based for pair for all alive vertices.
 
ActiveFacetsBegEndPair AllActiveFacets () const
 Range based for pair for all alive vertices.
 
EdgesAroundFacetBegEndPair AllEdgesAroundFacet (size_t iF) const
 Range based for pair for all edges around the facet.
 
VerticesAroundFacetBegEndPair AllVerticesAroundFacet (size_t iF) const
 Range based for pair for all vertices around the facet.
 
EdgesAroundVertexBegEndPair AllEdgesAroundVertex (size_t iV) const
 Range based for pair for all edges in the vertex fan.
 
VerticesAroundVertexBegEndPair AllVerticesAroundVertex (size_t iV) const
 Range based for pair for all vertices around the vertex.
 
FacetsAroundVertexBegEndPair AllFacetsAroundVertex (size_t iV) const
 Range based for pair for all facets around the vertex.
 
size_t NextFanEdge (size_t iEd, bool bClockwise) const
 Get the next edge in the vertex fan clockwise or counterclockwise.
 
void NextFanEdgePair (size_t iEd, bool bClockwise, c3d::IndicesPair &pair) const
 Get the next edge pair (ingoing and outgoing twin if present) in the vertex fan clockwise or counterclockwise.
 
size_t FindMostClockwiseFanEdge (size_t iEd) const
 Get the last edge in the vertex fan in a clockwise direction.
 
bool GetTriangleVertices (size_t f, std::array< size_t, 3 > &vertices) const
 Get the indices of facet vertices if triangular one.
 
bool GetTriangleEdges (size_t f, std::array< size_t, 3 > &edges) const
 Get the indices of facet edges if triangular one.
 
void GetFacetEdges (size_t iF, c3d::IndicesVector &edges) const
 Get the sequence of facet edges.
 
void GetFacetVertices (size_t f, c3d::IndicesVector &vertices) const
 Get the sequence of facet vertices.
 
size_t AttrCount () const
 Get the number of associated attributes.
 
template<class T >
T * AddHalfedgeAttribute ()
 Add an attribute of the specified type.
 
template<class T >
T * GetHalfedgeAttribute ()
 Get an attribute of the specified type.
 
template<class T >
const T * GetHalfedgeAttribute () const
 Get an attribute of the specified type.
 
MbHalfedgeAttrBase * GetHalfedgeAttributeByIndex (size_t ind)
 Get an attribute by index.
 
const MbHalfedgeAttrBase * GetHalfedgeAttributeByIndex (size_t ind) const
 Get an attribute by index.
 
template<class T >
void DeleteHalfedgeAttribute ()
 Remove an attribute of the specified type.
 
void DeleteHalfedgeAttribute (MbHalfedgeAttrBase *pAttr)
 Remove the attribute.
 
void DeleteHalfedgeAttribute (size_t ind)
 Remove an attribute with the given index.
 

Protected Attributes

std::vector< std::unique_ptr< MbHalfedgeAttrBase > > _attributes
 Vertex, edge, and facet attributes associated with a mesh.
 
std::vector< MbHalfedgeVertex > _vertices
 Vertex array.
 
std::vector< MbHalfedgeEdge > _edges
 Edge array.
 
std::vector< MbHalfedgeFacet > _facets
 Facet array.
 

Detailed Description

Polygonal mesh topology represented as half edge.


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